Skip to content

Commit 8966e50

Browse files
committed
Make build run on arm machines for arm variants, and try to run tests for all cpu types
1 parent 3e0d98b commit 8966e50

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@ on:
1313
jobs:
1414
build-image:
1515
name: Build the image
16-
runs-on: ubuntu-latest
16+
runs-on: ${{ matrix.run-on }}
1717
strategy:
1818
fail-fast: false
1919
max-parallel: 4
2020
matrix:
21-
platform: ["linux/386", "linux/amd64", "linux/arm/v6", "linux/arm/v7", "linux/arm64/v8", "linux/ppc64le", "linux/s390x", "linux/riscv64"]
21+
platform: ["linux/386", "linux/amd64", "linux/ppc64le", "linux/s390x", "linux/riscv64"]
22+
run-on: ["ubuntu-22.04"]
23+
includes:
24+
- { platform: "linux/arm/v6", run-on: "ubuntu-22.04-arm" }
25+
- { platform: "linux/arm/v7", run-on: "ubuntu-22.04-arm" }
26+
- { platform: "linux/arm64/v8", run-on: "ubuntu-22.04-arm" }
27+
2228
steps:
2329
- name: Checkout repository
2430
uses: actions/checkout@v4
@@ -35,5 +41,6 @@ jobs:
3541
PLATFORM: ${{ matrix.platform }}
3642

3743
- name: Test docker image
38-
if: ${{ matrix.platform == 'linux/amd64' }}
3944
run: make test-alpine
45+
env:
46+
DOCKER_DEFAULT_PLATFORM: ${{ matrix.platform }}

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ build-alpine:
4848
./alpine
4949

5050
test-alpine:
51+
@echo "Running on $(shell uname -m)"
5152
IMAGE_TAG="$(IMAGE_TAG)" \
5253
docker compose -f ./compose.test.yml up --exit-code-from sut --abort-on-container-exit

0 commit comments

Comments
 (0)