Skip to content

Commit e879d29

Browse files
committed
Replace AppVeyor for GitHub Actions workflow for Windows builds
Note AppVeyor will need turning off in settings too or the tests will start and fail due to the removal of the config file.
1 parent 921d59b commit e879d29

File tree

4 files changed

+56
-53
lines changed

4 files changed

+56
-53
lines changed

.appveyor.yml

-52
This file was deleted.

.ci_helpers/clone

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ref=''
1818
[ -z "$ref" ] && repository='https://github.com/samtools/htslib.git'
1919

2020
set -x
21-
git clone --recurse-submodules --shallow-submodules --depth=1 ${ref:+--branch="$branch"} "$repository" "$localdir"
21+
git clone --recurse-submodules --shallow-submodules --depth=2 ${ref:+--branch="$branch"} "$repository" "$localdir"
2222

2323
# NB: "samtools" as the owner/organisation, not the repo name
2424
if [ "x$owner" = "xsamtools" -a -z "$ref" -a "x$htslib_PR" != "x" ]

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
.git* export-ignore
1111
.ci_helpers export-ignore
1212
README.md export-ignore
13+
14+
# Prevent Windows cr-lf endings.
15+
test/** -text

.github/workflows/windows-build.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Windows/MinGW-W64 CI
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build:
6+
runs-on: windows-latest
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v4
10+
with:
11+
ref: ${{ github.event.pull_request.head.sha }}
12+
- name: Set up MSYS2 MinGW-W64
13+
uses: msys2/setup-msys2@v2
14+
with:
15+
msystem: mingw64
16+
update: false
17+
install: >-
18+
mingw-w64-x86_64-toolchain
19+
mingw-w64-x86_64-autotools
20+
mingw-w64-x86_64-curl
21+
mingw-w64-x86_64-libdeflate
22+
mingw-w64-x86_64-tools-git
23+
mingw-w64-x86_64-zlib
24+
mingw-w64-x86_64-bzip2
25+
mingw-w64-x86_64-xz
26+
- name: Clone htslib
27+
shell: msys2 {0}
28+
run: |
29+
export PATH="$PATH:/mingw64/bin:/c/Program Files/Git/bin"
30+
export MSYSTEM=MINGW64
31+
htslib_pr=`git log -2 --format='%s' | sed -n 's/.*htslib#\([0-9]*\).*/\1/p'`
32+
.ci_helpers/clone ${GITHUB_REPOSITORY_OWNER} htslib htslib ${GITHUB_HEAD_REF:-$GITHUB_REF_NAME} $htslib_pr
33+
pushd .
34+
cd htslib
35+
autoreconf -i
36+
popd
37+
- name: Compile bcftools
38+
shell: msys2 {0}
39+
run: |
40+
export PATH="$PATH:/mingw64/bin:/c/Program Files/Git/bin"
41+
export MSYSTEM=MINGW64
42+
autoheader
43+
autoconf -Wno-syntax
44+
./configure --enable-werror
45+
make -j4
46+
- name: Check bcftools
47+
shell: msys2 {0}
48+
run: |
49+
export PATH="$PATH:/mingw64/bin:/c/Program Files/Git/bin"
50+
export MSYSTEM=MINGW64
51+
make check
52+

0 commit comments

Comments
 (0)