-
Notifications
You must be signed in to change notification settings - Fork 184
139 lines (123 loc) · 3.73 KB
/
ci.yml
File metadata and controls
139 lines (123 loc) · 3.73 KB
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
130
131
132
133
134
135
136
137
138
139
name: CI
on:
push:
branches:
- "**"
workflow_dispatch:
permissions:
contents: read
jobs:
precheck:
runs-on: ubuntu-latest
outputs:
run_ci: ${{ steps.decide.outputs.run_ci }}
steps:
- id: decide
shell: bash
run: |
set -euo pipefail
msg="$(jq -r '.head_commit.message // ""' "$GITHUB_EVENT_PATH")"
ref="${GITHUB_REF#refs/heads/}"
run_ci=false
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
run_ci=true
fi
if [[ "$ref" == "main" ]]; then
run_ci=true
fi
if [[ "$msg" == *"[run-ci]"* ]]; then
run_ci=true
fi
{
echo "run_ci=$run_ci"
} >> "$GITHUB_OUTPUT"
build-test:
needs: precheck
if: ${{ needs.precheck.outputs.run_ci == 'true' }}
runs-on: ${{ matrix.os }}
timeout-minutes: 120
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
target_id: linux-x86_64
build_parallel: 2
- os: ubuntu-24.04-arm
target_id: linux-aarch64
build_parallel: 2
- os: macos-15-intel
target_id: macos-x86_64
build_parallel: 3
- os: macos-14
target_id: macos-arm64
build_parallel: 3
steps:
- uses: actions/checkout@v4
- name: Install Linux Build Dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
git \
curl \
libcurl4-openssl-dev \
libbz2-dev \
liblzma-dev
- name: Configure
run: |
cmake -S . -B build-ci \
-DCMAKE_BUILD_TYPE=Release \
-DSALMON_ENABLE_TESTS=ON \
-DSALMON_USE_SYSTEM_DEPS=OFF \
-DSALMON_FETCH_MISSING_DEPS=ON \
-DSALMON_BOOST_USE_STATIC_LIBS=ON
- name: Build
run: cmake --build build-ci --target salmon unitTests --parallel ${{ matrix.build_parallel }}
- name: Run Unit Tests
run: ./build-ci/src/unitTests
- name: CLI Smoke
run: ./build-ci/src/salmon -h
- name: Prepare Sample Data
shell: bash
run: |
set -euo pipefail
if [[ ! -d sample_data ]]; then
tar -xzf sample_data.tgz
fi
- name: Sample Data Smoke (Mapping)
run: |
./build-ci/src/salmon index \
-t sample_data/transcripts.fasta \
-i build-ci/sample_index
./build-ci/src/salmon quant \
-l A \
-i build-ci/sample_index \
-1 sample_data/reads_1.fastq \
-2 sample_data/reads_2.fastq \
-o build-ci/sample_quant_mapping
- name: Sample Data Smoke (Alignment)
run: |
./build-ci/src/salmon quant \
-l A \
-t sample_data/transcripts.fasta \
-a sample_data/sample_alignments.bam \
-o build-ci/sample_quant_alignment
- name: Package Binary Artifact
shell: bash
run: |
set -euo pipefail
pkg_dir="release/salmon-${{ matrix.target_id }}"
mkdir -p "$pkg_dir/bin"
cp build-ci/src/salmon "$pkg_dir/bin/"
cp LICENSE "$pkg_dir/"
cp README.md "$pkg_dir/"
tar -C release -czf "salmon-${{ matrix.target_id }}.tar.gz" "salmon-${{ matrix.target_id }}"
- name: Upload Binary Artifact
uses: actions/upload-artifact@v4
with:
name: salmon-${{ matrix.target_id }}
path: salmon-${{ matrix.target_id }}.tar.gz
if-no-files-found: error