-
Notifications
You must be signed in to change notification settings - Fork 18
129 lines (122 loc) · 4.27 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
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 (paired-end)
run: tests/compare-baseline.sh
- name: Validate with Picard
run: |
PicardCommandLine ValidateSamFile IGNORE=RECORD_MISSING_READ_GROUP IGNORE=MISSING_READ_GROUP I=head.bam
- name: Compare to baseline (single-end)
run: tests/compare-baseline.sh -s
- name: Validate with Picard
run: |
PicardCommandLine ValidateSamFile IGNORE=RECORD_MISSING_READ_GROUP IGNORE=MISSING_READ_GROUP I=head.bam