Skip to content

Commit 6cf98bb

Browse files
committed
Fix #6142 Build statically-linked Linux/Aarch64 Stack
1 parent 459dd7e commit 6cf98bb

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

.github/workflows/integration-tests.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,20 +177,36 @@ jobs:
177177
shell: bash
178178
run: |
179179
echo '::notice title=ARM64 skipped::To build ARM64, a self-hosted runner needs to be configured and the SELF_HOSTED_RUNNERS secret must contain arm64'
180-
181180
- name: Clone project
182181
if: needs.configuration.outputs.test-arm64 == 'true'
183182
uses: actions/checkout@v3
183+
- name: Install deps
184+
shell: bash
185+
run: |
186+
set -ex
184187
188+
# The release.hs script depends on digest, and digest requires
189+
# pkg-config. TO DO: Perhaps the self-hosted runner's software should
190+
# include pkg-config.
191+
sudo apt-get update
192+
sudo apt-get install -y pkg-config
193+
194+
# As of 19 August 2023, the self-hosted runner comes with Stack 2.11.1,
195+
# but it is not on the PATH. Logging the version for information.
196+
/usr/local/bin/stack --version
197+
198+
set +ex
185199
- name: Build bindist
186200
if: needs.configuration.outputs.test-arm64 == 'true'
187201
shell: bash
188202
run: |
189-
set -ex
190-
docker build . -f etc/dockerfiles/arm64.Dockerfile -t stack --build-arg USERID=$(id -u) --build-arg GROUPID=$(id -g)
191-
rm -rf _release
192-
mkdir -p _release
193-
docker run --rm -v $(pwd):/src -w /src stack bash -c "/home/stack/release build"
203+
# Stack's project-level configuration (stack.yaml) specifies the
204+
# multi-architecture (including Linux/Aarch64) Docker image published by
205+
# Oliver Benz (@benz0li, on GitHub). That image comes with Stack 2.11.1.
206+
# (Note that the online documentation for '--docker-stack-exe image'
207+
# specifies that the host Stack and image Stack must have the same
208+
# version number.)
209+
/usr/local/bin/stack etc/scripts/release.hs build --alpine --build-args --docker-stack-exe=image
194210
195211
- name: Upload bindist
196212
if: needs.configuration.outputs.test-arm64 == 'true'

0 commit comments

Comments
 (0)