Skip to content

Commit 024ca5d

Browse files
committed
Support arm64 arch
1 parent 5e98a20 commit 024ca5d

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,27 @@ jobs:
2626

2727
build:
2828
needs: identify-ros-distro
29-
runs-on: ubuntu-latest
29+
# Use different runners based on the architecture (x64 or arm64)
30+
runs-on: ubuntu-${{ matrix.ubuntu-version }}
3031
container:
3132
image: ${{ needs.identify-ros-distro.outputs.linuxos }}
3233
strategy:
3334
fail-fast: false
3435
matrix:
3536
node-version: [20.X, 22.X, 24.X]
37+
architecture: [x64]
38+
ubuntu-version: [latest]
39+
# Add arm64 support with a specific runner
40+
include:
41+
- architecture: arm64
42+
node-version: 20.X
43+
ubuntu-version: latest-arm64
3644
steps:
37-
- name: Setup Node.js ${{ matrix.node-version }}
45+
- name: Setup Node.js ${{ matrix.node-version }} on ${{ matrix.architecture }}
3846
uses: actions/setup-node@v4
3947
with:
4048
node-version: ${{ matrix.node-version }}
49+
architecture: ${{ matrix.architecture }}
4150

4251
- name: Setup ROS2
4352
uses: ros-tooling/[email protected]
@@ -54,6 +63,7 @@ jobs:
5463
- name: Build and test rclnodejs
5564
run: |
5665
source /opt/ros/${{ needs.identify-ros-distro.outputs.distro }}/setup.bash
66+
echo "Building and testing rclnodejs on ${{ matrix.architecture }} architecture"
5767
npm i
5868
npm run lint
5969
npm test
@@ -63,7 +73,7 @@ jobs:
6373
uses: coverallsapp/github-action@v2
6474
with:
6575
github-token: ${{ secrets.GITHUB_TOKEN }}
66-
flag-name: run-${{ matrix.node-version}}
76+
flag-name: run-${{ matrix.node-version }}-${{ matrix.architecture }}
6777
parallel: true
6878

6979
finish:

0 commit comments

Comments
 (0)