Skip to content

Commit 8c53ece

Browse files
authored
[chore] test both amd64 and arm64 archs (#131)
* [chore] test both archs * use a base image with .NET 9 installed * add debug * more fixes * wip * Exclude dotnet from running arm64
1 parent de78c74 commit 8c53ece

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,15 @@ jobs:
6868
path: ./instrumentation/dist/*.${{ matrix.SYS_PACKAGE }}
6969

7070
packaging-integration-tests:
71-
runs-on: ubuntu-24.04
7271
strategy:
7372
matrix:
7473
SYS_PACKAGE: [ "deb", "rpm" ]
7574
lang: [ "java", "nodejs", "dotnet" ]
75+
arch: [ "amd64", "arm64" ]
76+
exclude:
77+
- lang: "dotnet"
78+
arch: "arm64"
79+
runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-24.04' || 'ubuntu-24.04-arm' }}
7680
steps:
7781
- name: Check out the codebase.
7882
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
@@ -82,8 +86,8 @@ jobs:
8286
# in the step "Build ${{ matrix.ARCH }} ${{ matrix.SYS_PACKAGE }} package", and once here in the context of
8387
# running the packacking integration tests. We should run the packaging integration tests for both CPU
8488
# architectures (instead of only amd64), but ideally only build each combination of CPU arch & SYS_PACKAGE once.
85-
- name: Run packaging integration tests for ${{ matrix.SYS_PACKAGE }}/${{ matrix.lang }}
86-
run: make packaging-integration-test-${{ matrix.SYS_PACKAGE }}-${{ matrix.lang }}
89+
- name: Run packaging integration tests for ${{ matrix.SYS_PACKAGE }}/${{ matrix.lang }}/${{ matrix.arch }}
90+
run: ARCH=${{ matrix.arch }} make packaging-integration-test-${{ matrix.SYS_PACKAGE }}-${{ matrix.lang }}
8791

8892
publish-stable:
8993
runs-on: ubuntu-24.04

packaging/tests/rpm/dotnet/run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ set -euo pipefail
55
arch="${ARCH:-amd64}"
66
if [ "$arch" = arm64 ]; then
77
docker_platform=linux/arm64
8+
rpm_arch=aarch64
89
elif [ "$arch" = amd64 ]; then
910
docker_platform=linux/amd64
11+
rpm_arch=x86_64
1012
else
1113
echo "The architecture $arch is not supported."
1214
exit 1
@@ -18,6 +20,7 @@ cd "$SCRIPT_DIR/../../../.."
1820
docker build \
1921
--platform "$docker_platform" \
2022
--build-arg "ARCH=$arch" \
23+
--build-arg "RPM_ARCH=$rpm_arch" \
2124
-t "instrumentation-dotnet-$arch" \
2225
-f packaging/tests/rpm/dotnet/Dockerfile \
2326
.

packaging/tests/rpm/nodejs/run.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ set -euo pipefail
55
arch="${ARCH:-amd64}"
66
if [ "$arch" = arm64 ]; then
77
docker_platform=linux/arm64
8+
rpm_arch=aarch64
89
elif [ "$arch" = amd64 ]; then
910
docker_platform=linux/amd64
11+
rpm_arch=x86_64
1012
else
1113
echo "The architecture $arch is not supported."
1214
exit 1
@@ -18,6 +20,7 @@ cd "$SCRIPT_DIR/../../../.."
1820
docker build \
1921
--platform "$docker_platform" \
2022
--build-arg "ARCH=$arch" \
23+
--build-arg "RPM_ARCH=$rpm_arch" \
2124
-t "instrumentation-nodejs-$arch" \
2225
-f packaging/tests/rpm/nodejs/Dockerfile \
2326
.

0 commit comments

Comments
 (0)