Skip to content

Commit 6118e40

Browse files
committed
[arm64] Correct workflow
1 parent 79ac1b0 commit 6118e40

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/linux-build-and-test.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: rclnodejs - Linux Build and Test
32

43
on:
@@ -24,8 +23,21 @@ jobs:
2423
identify-ros-distro:
2524
uses: ./.github/workflows/identify-ros-distro.yml
2625

26+
matrix-prep:
27+
runs-on: ubuntu-latest
28+
outputs:
29+
arm64-matrix: ${{ steps.set-matrix.outputs.arm64-matrix }}
30+
steps:
31+
- id: set-matrix
32+
run: |
33+
if [[ "${{ github.ref }}" == "refs/heads/develop" ]]; then
34+
echo "arm64-matrix=[{\"architecture\":\"arm64\",\"node-version\":\"22.X\",\"ubuntu-version\":\"24.04-arm\"}]" >> $GITHUB_OUTPUT
35+
else
36+
echo "arm64-matrix=[]" >> $GITHUB_OUTPUT
37+
fi
38+
2739
build:
28-
needs: identify-ros-distro
40+
needs: [identify-ros-distro, matrix-prep]
2941
runs-on: ubuntu-${{ matrix.ubuntu-version }}
3042
container:
3143
image: ${{ needs.identify-ros-distro.outputs.linuxos }}
@@ -35,12 +47,8 @@ jobs:
3547
node-version: [20.X, 22.X, 24.X]
3648
architecture: [x64]
3749
ubuntu-version: [latest]
38-
# Add arm64 support for rolling.
39-
include:
40-
- architecture: arm64
41-
node-version: 22.X
42-
ubuntu-version: 24.04-arm
43-
exclude: ${{ !contains(github.ref, 'develop') }}
50+
# Include arm64 configuration from matrix-prep job
51+
include: ${{ fromJSON(needs.matrix-prep.outputs.arm64-matrix) }}
4452
steps:
4553
- name: Setup Node.js ${{ matrix.node-version }} on ${{ matrix.architecture }}
4654
uses: actions/setup-node@v4
@@ -84,4 +92,4 @@ jobs:
8492
uses: coverallsapp/github-action@v2
8593
with:
8694
github-token: ${{ secrets.GITHUB_TOKEN }}
87-
parallel-finished: true
95+
parallel-finished: true

0 commit comments

Comments
 (0)