Skip to content

Add tests for BAM writing and reading functionality #471

Add tests for BAM writing and reading functionality

Add tests for BAM writing and reading functionality #471

Workflow file for this run

name: test
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "macos", "windows"]
steps:
- uses: actions/checkout@v5
- uses: crystal-lang/install-crystal@v1
if: matrix.os != 'windows'
- name: Install Crystal (MinGW64)
if: matrix.os == 'windows'
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
git
mingw-w64-x86_64-crystal
mingw-w64-x86_64-shards
mingw-w64-x86_64-htslib
mingw-w64-x86_64-samtools
mingw-w64-x86_64-bcftools
- name: Install latest HTSLib (ubuntu)
if: ${{ matrix.os == 'ubuntu' }}
run: |
sudo apt update -y
sudo apt install -yq samtools bcftools
sudo apt install -yq libcurl4-openssl-dev liblzma-dev libbz2-dev libdeflate-dev pkg-config
git clone --recurse-submodules https://github.com/samtools/htslib
cd htslib && autoreconf -i && make -j4 && sudo make install
- name: Install HTSLib (macos)
if: ${{ matrix.os == 'macos' }}
run: |
brew install htslib samtools bcftools pkg-config
- name: Install dependencies
if: matrix.os != 'windows'
run: shards install
- name: Install dependencies (MinGW64)
if: matrix.os == 'windows'
shell: msys2 {0}
run: shards install
- name: Run tests
if: matrix.os != 'windows'
run: |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
crystal test/run_all.cr -- --chaos --paralel 4 --verbose
- name: Run tests (MinGW64)
if: matrix.os == 'windows'
shell: msys2 {0}
run: |
crystal test/run_all.cr -- --chaos --paralel 4 --verbose