diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 76cc97d7d3..051780b7ff 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -177,20 +177,36 @@ jobs: shell: bash run: | 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' - - name: Clone project if: needs.configuration.outputs.test-arm64 == 'true' uses: actions/checkout@v3 + - name: Install deps + shell: bash + run: | + set -ex + # The release.hs script depends on digest, and digest requires + # pkg-config. TO DO: Perhaps the self-hosted runner's software should + # include pkg-config. + sudo apt-get update + sudo apt-get install -y pkg-config + + # As of 19 August 2023, the self-hosted runner comes with Stack 2.11.1, + # but it is not on the PATH. Logging the version for information. + /usr/local/bin/stack --version + + set +ex - name: Build bindist if: needs.configuration.outputs.test-arm64 == 'true' shell: bash run: | - set -ex - docker build . -f etc/dockerfiles/arm64.Dockerfile -t stack --build-arg USERID=$(id -u) --build-arg GROUPID=$(id -g) - rm -rf _release - mkdir -p _release - docker run --rm -v $(pwd):/src -w /src stack bash -c "/home/stack/release build" + # Stack's project-level configuration (stack.yaml) specifies the + # multi-architecture (including Linux/Aarch64) Docker image published by + # Oliver Benz (@benz0li, on GitHub). That image comes with Stack 2.11.1. + # (Note that the online documentation for '--docker-stack-exe image' + # specifies that the host Stack and image Stack must have the same + # version number.) + /usr/local/bin/stack etc/scripts/release.hs build --alpine --build-args --docker-stack-exe=image - name: Upload bindist if: needs.configuration.outputs.test-arm64 == 'true' diff --git a/ChangeLog.md b/ChangeLog.md index aced558d0f..f14dca9eff 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,6 +6,7 @@ Release notes: * Further to the release notes for Stack 2.3.1, the `-static` suffix has been removed from the statically linked Linux/x86_64 binaries. +* The binaries for Linux/Aarch64 are now statically linked. **Changes since v2.11.1:** diff --git a/etc/dockerfiles/arm64.Dockerfile b/etc/dockerfiles/arm64.Dockerfile index 2797576e81..adac83d85a 100644 --- a/etc/dockerfiles/arm64.Dockerfile +++ b/etc/dockerfiles/arm64.Dockerfile @@ -1,3 +1,18 @@ +# This Dockerfile was previously used to build dynamically-linked Stack for +# Linux/Aarch64. It was used with the following step in the GitHub Actions CI: +# +# run: | +# set -ex +# docker build . -f etc/dockerfiles/arm64.Dockerfile -t stack --build-arg USERID=$(id -u) --build-arg GROUPID=$(id -g) +# rm -rf _release +# mkdir -p _release +# docker run --rm -v $(pwd):/src -w /src stack bash -c "/home/stack/release build" +# +# However, after Stack 2.11.1, it was replaced with a step that makes use of +# https://gitlab.com/benz0li/ghc-musl. +# +# ------------------------------------------------------------------------------ +# # Stack is built with GHC 9.2.8. GHC 9.2.8 for Linux/AArch64 says it was made on # a Debian 10 system and requires GMP 6.1. Debian 10 is codename 'buster' and # includes libc6 (2.28-10+deb10u1).