-
Notifications
You must be signed in to change notification settings - Fork 1k
203 lines (188 loc) · 7.4 KB
/
nf-test-gpu.yml
File metadata and controls
203 lines (188 loc) · 7.4 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
name: Run GPU nf-tests
on:
push:
branches:
# https://docs.renovatebot.com/key-concepts/automerge/#branch-vs-pr-automerging
- "renovate/**" # branches Renovate creates
paths-ignore:
- "**/meta.yml"
pull_request:
branches: [master]
paths-ignore:
- "**/meta.yml"
merge_group:
types: [checks_requested]
branches: [master]
paths-ignore:
- "**/meta.yml"
workflow_dispatch:
# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# renovate: datasource=github-releases depName=askimed/nf-test versioning=semver
NFT_VER: "0.9.5"
NXF_ANSI_LOG: false
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
# renovate: datasource=github-releases depName=nextflow-io/nextflow versioning=semver
NXF_VER: "25.10.4"
jobs:
nf-test-changes:
name: nf-test-changes
runs-on:
- runs-on=${{ github.run_id }}-nf-test-changes-gpu
- runner=4cpu-linux-x64
- image=ubuntu22-full-x64
outputs:
# gpu tag outputs
gpu_paths: ${{ steps.list-gpu.outputs.components }}
gpu_shard: ${{ steps.shards-gpu.outputs.shard }}
gpu_total_shards: ${{ steps.shards-gpu.outputs.total_shards }}
# gpu_highmem tag outputs
gpu_highmem_paths: ${{ steps.list-gpu-highmem.outputs.components }}
gpu_highmem_shard: ${{ steps.shards-gpu-highmem.outputs.shard }}
gpu_highmem_total_shards: ${{ steps.shards-gpu-highmem.outputs.total_shards }}
steps:
- name: Clean Workspace
run: |
ls -la ./
rm -rf ./* || true
rm -rf ./.??* || true
ls -la ./
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
# Detect gpu and gpu_highmem tests separately
- name: List gpu test files
id: list-gpu
uses: adamrtalbot/detect-nf-test-changes@de3c3c8e113031b4f15a3c1104b5f135e8346997 # v0.0.6
with:
head: ${{ github.sha }}
base: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || 'origin/master' }}
n_parents: 0
tags: "gpu"
- name: List gpu_highmem test files
id: list-gpu-highmem
uses: adamrtalbot/detect-nf-test-changes@de3c3c8e113031b4f15a3c1104b5f135e8346997 # v0.0.6
with:
head: ${{ github.sha }}
base: ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha || 'origin/master' }}
n_parents: 0
tags: "gpu_highmem"
# Shard each tag independently
- name: Get gpu shards
id: shards-gpu
if: ${{ steps.list-gpu.outputs.components != '[]' }}
uses: ./.github/actions/get-shards
env:
NFT_VER: ${{ env.NFT_VER }}
with:
max_shards: 2
paths: "${{ join(fromJson(steps.list-gpu.outputs.components), ' ') }}"
tags: "gpu"
- name: Get gpu_highmem shards
id: shards-gpu-highmem
if: ${{ steps.list-gpu-highmem.outputs.components != '[]' }}
uses: ./.github/actions/get-shards
env:
NFT_VER: ${{ env.NFT_VER }}
with:
max_shards: 2
paths: "${{ join(fromJson(steps.list-gpu-highmem.outputs.components), ' ') }}"
tags: "gpu_highmem"
# Standard GPU tests (g4dn.xlarge - 4 vCPU, 16 GB RAM, T4 GPU)
# Runs tests tagged "gpu" (20+ modules: parabricks, amulety, cellpose, etc.)
nf-test-gpu:
runs-on: "runs-on=${{ github.run_id }}/family=g4dn.xlarge/image=ubuntu24-gpu-x64"
name: "GPU Test | g4dn.xlarge | ${{ matrix.profile }} | ${{ matrix.shard }}"
needs: [nf-test-changes]
if: ${{ needs.nf-test-changes.outputs.gpu_total_shards != '0' && needs.nf-test-changes.outputs.gpu_total_shards != '' }}
strategy:
fail-fast: false
matrix:
shard: ${{ fromJson(needs.nf-test-changes.outputs.gpu_shard) }}
profile: [docker, singularity]
env:
NXF_ANSI_LOG: false
TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.gpu_total_shards }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: test cuda
run: |
nvidia-smi -L
- name: Run nf-test Action
uses: ./.github/actions/nf-test-action
env:
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }}
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }}
SENTIEON_AUTH_MECH: "GitHub Actions - token"
with:
profile: ${{ matrix.profile }},gpu
shard: ${{ matrix.shard }}
total_shards: ${{ env.TOTAL_SHARDS }}
paths: "${{ join(fromJson(needs.nf-test-changes.outputs.gpu_paths), ' ') }}"
tags: gpu
# High-memory GPU tests (g4dn.2xlarge - 8 vCPU, 32 GB RAM, T4 GPU)
# Runs tests tagged "gpu_highmem" (currently only parabricks/rnafq2bam,
# which requires >16 GB system RAM)
nf-test-gpu-highmem:
runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=ubuntu24-gpu-x64"
name: "GPU Test | g4dn.2xlarge | ${{ matrix.profile }} | ${{ matrix.shard }}"
needs: [nf-test-changes]
if: ${{ needs.nf-test-changes.outputs.gpu_highmem_total_shards != '0' && needs.nf-test-changes.outputs.gpu_highmem_total_shards != '' }}
strategy:
fail-fast: false
matrix:
shard: ${{ fromJson(needs.nf-test-changes.outputs.gpu_highmem_shard) }}
profile: [docker, singularity]
env:
NXF_ANSI_LOG: false
TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.gpu_highmem_total_shards }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- name: test cuda
run: |
nvidia-smi -L
- name: Run nf-test Action
uses: ./.github/actions/nf-test-action
env:
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }}
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }}
SENTIEON_AUTH_MECH: "GitHub Actions - token"
with:
profile: ${{ matrix.profile }},gpu
shard: ${{ matrix.shard }}
total_shards: ${{ env.TOTAL_SHARDS }}
paths: "${{ join(fromJson(needs.nf-test-changes.outputs.gpu_highmem_paths), ' ') }}"
tags: gpu_highmem
confirm-pass-gpu:
runs-on:
- runs-on=${{ github.run_id }}-confirm-pass-gpu
- runner=2cpu-linux-x64
- image=ubuntu22-full-x64
needs: [nf-test-gpu, nf-test-gpu-highmem]
if: always()
steps:
- name: One or more tests failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: One or more tests cancelled
if: ${{ contains(needs.*.result, 'cancelled') }}
run: exit 1
- name: All tests ok
if: ${{ contains(needs.*.result, 'success') || (needs.nf-test-gpu.result == 'skipped' && needs.nf-test-gpu-highmem.result == 'skipped') }}
run: exit 0
- name: debug-print
if: always()
run: |
echo "toJSON(needs) = ${{ toJSON(needs) }}"
echo "toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}"