Skip to content

Commit 6fed95e

Browse files
committed
feat: native ARM64 builders
1 parent 0beea79 commit 6fed95e

File tree

1 file changed

+22
-37
lines changed

1 file changed

+22
-37
lines changed

.github/workflows/debian.yml

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -66,65 +66,50 @@ jobs:
6666
- name: run official-images tests
6767
run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-${{ matrix.deb }}
6868

69-
emulated-architecture-tests:
69+
arm64-tests:
7070
timeout-minutes: 60
71-
runs-on: ubuntu-24.04
72-
name: ${{ matrix.arch }}-${{ matrix.ghc }}-${{ matrix.deb }}
71+
runs-on: ubuntu-24.04-arm
72+
name: arm64-${{ matrix.ghc }}-${{ matrix.deb }}
7373
strategy:
7474
fail-fast: false
7575
matrix:
7676
ghc: ['9.6.7', '9.8.4', '9.10.2', '9.12.2']
77-
# uraimo/run-on-arch-action does not support debian slim variants
77+
# native arm runner; still avoid slim variants here
7878
deb: ['bullseye']
79-
arch: ['aarch64']
8079
include:
8180
# bookworm (debian 12)
8281
- ghc: '9.12.2'
8382
ghc_minor: '9.12'
8483
deb: 'bookworm'
85-
arch: 'aarch64'
86-
docker_platform: arm64
8784
# bullseye (debian 11)
8885
- ghc: '9.10.2'
8986
ghc_minor: '9.10'
90-
docker_platform: arm64
9187
- ghc: '9.8.4'
9288
ghc_minor: '9.8'
93-
docker_platform: arm64
9489
- ghc: '9.6.7'
9590
ghc_minor: '9.6'
96-
docker_platform: arm64
9791
exclude:
9892
- ghc: '9.12.2'
9993
deb: 'bullseye'
10094

10195
steps:
10296
- uses: actions/checkout@v4
103-
- name: docker build [ ${{ matrix.arch }} ${{ matrix.ghc }}]
104-
uses: uraimo/[email protected]
97+
- name: docker build and test [arm64 ${{ matrix.ghc }}]
98+
run: |
99+
docker build --pull --progress=plain \
100+
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
101+
${{ matrix.ghc_minor }}/${{ matrix.deb }} \
102+
--build-arg "BUILDKIT_DOCKERFILE_CHECK=skip=SecretsUsedInArgOrEnv;error=true"
103+
echo 'testing..'
104+
docker run \
105+
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
106+
bash -c "cabal update && cabal install --lib primitive"
107+
docker run \
108+
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
109+
bash -c "echo | ghci"
110+
- uses: actions/checkout@v4
105111
with:
106-
arch: ${{ matrix.arch }}
107-
distro: ${{ matrix.deb }}
108-
githubToken: ${{ github.token }}
109-
install: |
110-
apt-get update
111-
apt-get install -y curl
112-
curl -fsSL https://get.docker.com | sh
113-
run: |
114-
docker build --pull --progress=plain \
115-
--platform "linux/${{ matrix.docker_platform }}" \
116-
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
117-
${{ matrix.ghc_minor }}/${{ matrix.deb }} \
118-
--build-arg "BUILDKIT_DOCKERFILE_CHECK=skip=SecretsUsedInArgOrEnv;error=true"
119-
echo 'testing..'
120-
docker run \
121-
--platform "linux/${{ matrix.docker_platform }}" \
122-
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
123-
bash -c "cabal update && cabal install --lib primitive"
124-
docker run \
125-
--platform "linux/${{ matrix.docker_platform }}" \
126-
-t haskell:${{ matrix.ghc }}-${{ matrix.deb }} \
127-
bash -c "echo | ghci"
128-
129-
# Running the official tests does not work as we need to hardcode the plaform due to the emulated nature.
130-
# This solution is fairly hacky, but gets us most of benefit of the official tests.
112+
repository: docker-library/official-images
113+
path: official-images
114+
- name: run official-images tests
115+
run: ./official-images/test/run.sh haskell:${{ matrix.ghc }}-${{ matrix.deb }}

0 commit comments

Comments
 (0)