Allow references with up to 2**31 contigs #1860
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash # For -o pipefail | |
jobs: | |
lint: | |
# Run for PRs only if they come from a forked repo (avoids duplicate runs) | |
if: >- | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check for tab characters | |
run: "! grep -P -R '\\t' src/ tests/*.{cpp,py}" | |
build: | |
if: >- | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get install libisal-dev | |
- name: Install macOS dependencies | |
if: runner.os == 'macOS' | |
run: brew install isa-l | |
- name: Build | |
run: | | |
cmake -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo | |
cmake --build build -j 3 | |
cmake --install build | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get install samtools | |
- name: Install macOS dependencies | |
if: runner.os == 'macOS' | |
run: brew install samtools | |
- name: Run | |
run: tests/run.sh | |
# Test building with a downloaded ISA-L | |
externalisal: | |
if: >- | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get install nasm | |
- name: Install macOS dependencies | |
if: runner.os == 'macOS' | |
run: brew install nasm | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: | | |
cmake -B build -DISAL=download | |
cmake --build build -j3 | |
pythonbindings: | |
if: >- | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get install libisal-dev | |
- name: Install macOS dependencies | |
if: runner.os == 'macOS' | |
run: brew install isa-l | |
- name: Install Python dependencies | |
run: pip install pytest | |
- name: Install Python bindings | |
run: pip install . | |
- name: Run tests | |
run: pytest tests | |
compare: | |
if: >- | |
github.event_name != 'pull_request' || | |
github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Baseline comparison needs older commits | |
- name: Install Linux dependencies | |
if: runner.os == 'Linux' | |
run: sudo apt-get install samtools python3-pysam picard-tools libisal-dev | |
- name: Install macOS dependencies | |
if: runner.os == 'macOS' | |
run: brew install samtools pysam picard-tools isa-l | |
- name: Cache test dataset | |
uses: actions/cache@v4 | |
with: | |
key: test-data-${{ hashFiles('tests/download.sh') }} | |
path: tests/drosophila/ | |
- name: Cache baseline BAM | |
id: cache-baseline-bam | |
uses: actions/cache@v4 | |
with: | |
key: baseline-bam-${{ hashFiles('tests/baseline-commit.txt') }} | |
path: baseline/bam/ | |
- name: Compare to baseline | |
run: tests/compare-baseline.sh | |
- name: Validate with Picard | |
run: | | |
PicardCommandLine ValidateSamFile IGNORE=RECORD_MISSING_READ_GROUP IGNORE=MISSING_READ_GROUP I=head.bam |