Skip to content

Commit

Permalink
Add Windows CI via github actions
Browse files Browse the repository at this point in the history
Also amend .gitattributes file for more Windows text-mode removal as
for some reason the GitHub Actions git is much more likely to use
CR-LF line endings.

Added libdeflate to the windows build.

Corrected test/header_syms.pl to work on windows line endings.
  • Loading branch information
jkbonfield authored and daviesrob committed Jul 4, 2024
1 parent 1b4cda6 commit 624e95b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,14 @@ test/index_dos.sam -text
# Remove the text attribute from various faidx test files
test/faidx/faidx*.fa* -text
test/faidx/fastqs*.fq* -text
test/fastq/*.fa -text
test/fastq/*.fq -text
*.tst -text
*.out -text
*.crai -text
*.bai -text
*.csi -text
*.gzi -text
*.bcf -text
*.sam -text
*.sam.gz -text
40 changes: 40 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Windows/MinGW-W64 CI
on: [push, pull_request]

jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Set up MSYS2 MinGW-W64
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: false
install: >-
git
zlib-devel
libbz2-devel
liblzma-devel
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-autotools
mingw-w64-x86_64-tools-git
mingw-w64-x86_64-libdeflate
- name: Compile htslib
shell: msys2 {0}
run: |
export PATH=/mingw64/bin:$PATH
export MSYSTEM=MINGW64
autoreconf -i
./configure
make -j6
- name: Check Htslib
shell: msys2 {0}
run: |
export PATH=/mingw64/bin:$PATH
export MSYSTEM=MINGW64
make test-shlib-exports && make check
1 change: 1 addition & 0 deletions test/header_syms.pl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ sub extract_symbols {

open(my $f, '<', $file) || die "Couldn't open $file : $!\n";
my $text = <$f>;
$text =~ tr/\r//d;
close($f) || die "Error reading $file : $!\n";

# Get rid of comments
Expand Down

0 comments on commit 624e95b

Please sign in to comment.