Skip to content

test

test #63

Workflow file for this run

name: test
on:
push:
pull_request:
schedule:
- cron: "51 3 * * 6" # Runs at 03:51, only on Saturday
jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "macos", "windows"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: crystal-lang/install-crystal@v1
with:
crystal: latest
- name: Install dependencies
run: shards install --without-development --release
- name: Run specs
run: crystal spec
- name: Build executable
run: shards build --release -Dpreview_mt
- uses: actions/upload-artifact@v4
with:
name: sdust-${{ matrix.os }}
path: bin/${{ matrix.os == 'windows' && 'sdust.exe' || 'sdust' }}
- name: Download chrM
run: curl -L https://hgdownload.cse.ucsc.edu/goldenpath/hg38/chromosomes/chrM.fa.gz -o chrM.fa.gz
- name: Install original sdust and compare results
run: |
curl -L https://github.com/lh3/sdust/archive/refs/tags/v0.1.tar.gz -o v0.1.tar.gz
tar -xzf v0.1.tar.gz
cd sdust-0.1
make
cd ..
./sdust-0.1/sdust -t 19 -w 63 chrM.fa.gz > original_sdust.out
./bin/sdust -t 19 -w 63 -@ 2 chrM.fa.gz > crystal_sdust.out
diff original_sdust.out crystal_sdust.out