Skip to content

Commit d5aec9e

Browse files
committed
Replace AppVeyor for GitHub Actions workflow for Windows builds
1 parent 921d59b commit d5aec9e

File tree

4 files changed

+96
-53
lines changed

4 files changed

+96
-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

+43
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,46 @@
1010
.git* export-ignore
1111
.ci_helpers export-ignore
1212
README.md export-ignore
13+
14+
# Prevent Windows cr-lf endings
15+
test/** -text
16+
test/**.out text
17+
test/**.bed text
18+
test/**.vcf text
19+
test/**.sam text
20+
test/**.c text
21+
test/**.pl text
22+
test/**.sh text
23+
test/**.reg text
24+
test/**.23andme text
25+
test/**.chain text
26+
test/**.cmd text
27+
test/**.chk text
28+
test/**.fa text
29+
test/**.fai text
30+
test/**.gen text
31+
test/**.gen6 text
32+
test/**.gff text
33+
test/**.gff3 text
34+
test/**.hap text
35+
test/**.haps text
36+
test/**.hdr text
37+
test/**.legend text
38+
test/**.ori text
39+
test/**.pairs text
40+
test/**.ped text
41+
test/**.ploidy text
42+
test/**.ref text
43+
test/**.rev text
44+
test/**.rgs text
45+
test/**.sample text
46+
test/**.samples text
47+
test/**.samples[234] text
48+
test/**.smpl text
49+
test/**.tab text
50+
test/**.tsv text
51+
test/**.txt text
52+
test/create-bam-test text
53+
test/csq/make-csq-test text
54+
test/csq/make-csq-test-by-region text
55+
test/csq/sort-csq 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)