Skip to content

Commit 692b6a0

Browse files
authored
Merge pull request #1641 from mashehu/add-arm-ci-tests
2 parents e8fce2d + 441cf47 commit 692b6a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+831
-663
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-arm
30+
runs-on: # use self-hosted runners
31+
- runs-on=${{ github.run_id }}-nf-test-changes-arm
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+
# Skip sentieon tests - no ARM containers available
53+
SKIP_SENTIEON: true
54+
with:
55+
max_shards: 14
56+
57+
- name: debug
58+
run: |
59+
echo ${{ steps.set-shards.outputs.shard }}
60+
echo ${{ steps.set-shards.outputs.total_shards }}
61+
62+
nf-test-arm:
63+
name: "${{ matrix.profile }}-${{ matrix.archProfile }} | ${{ matrix.NXF_VER }} | ${{ matrix.shard }}/${{ needs.nf-test-changes-arm.outputs.total_shards }}"
64+
needs: [nf-test-changes-arm]
65+
if: ${{ needs.nf-test-changes-arm.outputs.total_shards != '0' }}
66+
runs-on: # use self-hosted runners
67+
- runs-on=${{ github.run_id }}-nf-test
68+
- runner=4cpu-linux-arm64
69+
strategy:
70+
fail-fast: false
71+
matrix:
72+
shard: ${{ fromJson(needs.nf-test-changes-arm.outputs.shard) }}
73+
archProfile: [arm64]
74+
profile: [conda, docker, singularity]
75+
isMain:
76+
- ${{ github.base_ref == 'master' || github.base_ref == 'main' }}
77+
# Exclude conda and singularity on dev
78+
exclude:
79+
- isMain: false
80+
profile: "conda"
81+
- isMain: false
82+
profile: "singularity"
83+
NXF_VER:
84+
- "25.04.0"
85+
- "latest-everything"
86+
env:
87+
NXF_ANSI_LOG: false
88+
TOTAL_SHARDS: ${{ needs.nf-test-changes-arm.outputs.total_shards }}
89+
90+
steps:
91+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
92+
with:
93+
fetch-depth: 0
94+
95+
- name: Run nf-test
96+
id: run_nf_test
97+
uses: ./.github/actions/nf-test
98+
continue-on-error: ${{ matrix.NXF_VER == 'latest-everything' }}
99+
env:
100+
NFT_WORKDIR: ${{ env.NFT_WORKDIR }}
101+
NXF_VERSION: ${{ matrix.NXF_VER }}
102+
# Skip sentieon tests - no ARM containers available
103+
SKIP_SENTIEON: true
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-arm, 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::"

.github/workflows/nf-test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ jobs:
4343
uses: ./.github/actions/get-shards
4444
env:
4545
NFT_VER: ${{ env.NFT_VER }}
46+
# Skip sentieon tests on fork PRs where secrets are not available
47+
SKIP_SENTIEON: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'nf-core/rnaseq' }}
4648
with:
4749
max_shards: 14
4850

@@ -94,6 +96,8 @@ jobs:
9496
SENTIEON_LICENSE_MESSAGE: ${{ secrets.SENTIEON_LICENSE_MESSAGE }}
9597
SENTIEON_LICSRVR_IP: ${{ secrets.SENTIEON_LICSRVR_IP }}
9698
NXF_VERSION: ${{ matrix.NXF_VER }}
99+
# Skip sentieon tests on fork PRs where secrets are not available
100+
SKIP_SENTIEON: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != 'nf-core/rnaseq' }}
97101
with:
98102
profile: ${{ matrix.profile }}
99103
shard: ${{ matrix.shard }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Enhancements and fixes
1111

1212
- [PR #1640](https://github.com/nf-core/rnaseq/pull/1640) - Bump version after release 3.22.0
13+
- [PR #1641](https://github.com/nf-core/rnaseq/pull/1641) - Add arm-based CI tests and fix arm-related issues
1314

1415
## [[3.22.0](https://github.com/nf-core/rnaseq/releases/tag/3.22.0)] - 2025-11-26
1516

0 commit comments

Comments
 (0)