Skip to content

Commit 4f1b8b0

Browse files
committed
add arm CI test
1 parent 4c6bdce commit 4f1b8b0

File tree

1 file changed

+149
-0
lines changed

1 file changed

+149
-0
lines changed

.github/workflows/nf-test-arm.yml

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: Run nf-test on ARM
2+
on:
3+
pull_request:
4+
paths-ignore:
5+
- "docs/**"
6+
- "**/meta.yml"
7+
- "**/*.md"
8+
- "**/*.png"
9+
- "**/*.svg"
10+
release:
11+
types: [published]
12+
workflow_dispatch:
13+
14+
# Cancel if a newer run is started
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
17+
cancel-in-progress: true
18+
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
NFT_VER: "0.9.3"
22+
NFT_WORKDIR: "~"
23+
NXF_ANSI_LOG: false
24+
NXF_SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity
25+
NXF_SINGULARITY_LIBRARYDIR: ${{ github.workspace }}/.singularity
26+
27+
jobs:
28+
nf-test-changes-arm:
29+
name: nf-test-changes
30+
runs-on: # use self-hosted runners
31+
- runs-on=${{ github.run_id }}-nf-test-changes
32+
- runner=4cpu-linux-arm64
33+
outputs:
34+
shard: ${{ steps.set-shards.outputs.shard }}
35+
total_shards: ${{ steps.set-shards.outputs.total_shards }}
36+
steps:
37+
- name: Clean Workspace # Purge the workspace in case it's running on a self-hosted runner
38+
run: |
39+
ls -la ./
40+
rm -rf ./* || true
41+
rm -rf ./.??* || true
42+
ls -la ./
43+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
44+
with:
45+
fetch-depth: 0
46+
47+
- name: get number of shards
48+
id: set-shards
49+
uses: ./.github/actions/get-shards
50+
env:
51+
NFT_VER: ${{ env.NFT_VER }}
52+
with:
53+
max_shards: 14
54+
55+
- name: debug
56+
run: |
57+
echo ${{ steps.set-shards.outputs.shard }}
58+
echo ${{ steps.set-shards.outputs.total_shards }}
59+
60+
nf-test-arm:
61+
name: "${{ matrix.profile }}-${{ matrix.archProfile }} | ${{ matrix.NXF_VER }} | ${{ matrix.shard }}/${{ needs.nf-test-changes.outputs.total_shards }}"
62+
needs: [nf-test-changes]
63+
if: ${{ needs.nf-test-changes.outputs.total_shards != '0' }}
64+
runs-on: # use self-hosted runners
65+
- runs-on=${{ github.run_id }}-nf-test
66+
- runner=4cpu-linux-arm64
67+
strategy:
68+
fail-fast: false
69+
matrix:
70+
shard: ${{ fromJson(needs.nf-test-changes.outputs.shard) }}
71+
archProfile: [arm64]
72+
profile: [conda, docker, singularity]
73+
isMain:
74+
- ${{ github.base_ref == 'master' || github.base_ref == 'main' }}
75+
# Exclude conda and singularity on dev
76+
exclude:
77+
- isMain: false
78+
profile: "conda"
79+
- isMain: false
80+
profile: "singularity"
81+
NXF_VER:
82+
- "25.04.0"
83+
- "latest-everything"
84+
env:
85+
NXF_ANSI_LOG: false
86+
TOTAL_SHARDS: ${{ needs.nf-test-changes.outputs.total_shards }}
87+
88+
steps:
89+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
90+
with:
91+
fetch-depth: 0
92+
93+
- name: Run nf-test
94+
id: run_nf_test
95+
uses: ./.github/actions/nf-test
96+
continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }}
97+
env:
98+
NFT_WORKDIR: ${{ env.NFT_WORKDIR }}
99+
SENTIEON_AUTH_MECH: "GitHub Actions - token"
100+
SENTIEON_ENCRYPTION_KEY: ${{ secrets.SENTIEON_ENCRYPTION_KEY }}
101+
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
102+
SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }}
103+
NXF_VERSION: ${{ matrix.NXF_VER }}
104+
with:
105+
profile: ${{ matrix.profile }},${{ matrix.archProfile }}
106+
shard: ${{ matrix.shard }}
107+
total_shards: ${{ env.TOTAL_SHARDS }}
108+
109+
- name: Report test status
110+
if: ${{ always() }}
111+
run: |
112+
if [[ "${{ steps.run_nf_test.outcome }}" == "failure" ]]; then
113+
echo "::error::Test with ${{ matrix.NXF_VER }} failed"
114+
# Add to workflow summary
115+
echo "## ❌ Test failed: ${{ matrix.profile }},${{ matrix.archProfile }} | ${{ matrix.NXF_VER }} | Shard ${{ matrix.shard }}/${{ env.TOTAL_SHARDS }}" >> $GITHUB_STEP_SUMMARY
116+
if [[ "${{ matrix.NXF_VER }}" == "latest-everything" ]]; then
117+
echo "::warning::Test with latest-everything failed but will not cause workflow failure. Please check if the error is expected or if it needs fixing."
118+
fi
119+
if [[ "${{ matrix.NXF_VER }}" != "latest-everything" ]]; then
120+
exit 1
121+
fi
122+
fi
123+
124+
confirm-pass-arm:
125+
needs: [nf-test-changes, nf-test-arm]
126+
if: always()
127+
runs-on: # use self-hosted runners
128+
- runs-on=${{ github.run_id }}-confirm-pass
129+
- runner=2cpu-linux-x64
130+
steps:
131+
- name: One or more tests failed (excluding latest-everything)
132+
if: ${{ contains(needs.*.result, 'failure') }}
133+
run: exit 1
134+
135+
- name: One or more tests cancelled
136+
if: ${{ contains(needs.*.result, 'cancelled') }}
137+
run: exit 1
138+
139+
- name: All tests ok
140+
if: ${{ contains(needs.*.result, 'success') }}
141+
run: exit 0
142+
143+
- name: debug-print
144+
if: always()
145+
run: |
146+
echo "::group::DEBUG: needs Contents"
147+
echo "DEBUG: toJSON(needs) = ${{ toJSON(needs) }}"
148+
echo "DEBUG: toJSON(needs.*.result) = ${{ toJSON(needs.*.result) }}"
149+
echo "::endgroup::"

0 commit comments

Comments
 (0)