1616env :
1717 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
1818
19- # As of 6 May 2024 , ubuntu-latest and windows-latest come with Stack 2.15.5 and
20- # GHC 9.8.2 . However, macos-13 and macos-latest do not come with Haskell tools.
21- # windows-latest comes with NSIS 3.08 , for which the default value of the
19+ # As of 7 February 2025 , ubuntu-latest and windows-latest come with Stack 3.3.1
20+ # and GHC 9.12.1 . However, macos-13 and macos-latest do not come with Haskell
21+ # tools. windows-latest comes with NSIS 3.10 , for which the default value of the
2222# 'Unicode' installer attribute is 'true'. However, that is not the 'large
2323# strings' build of NSIS and creates installers that corrupt the PATH
2424# environment variable if the default string length of 1024 characters is
3535 - os : ubuntu-latest
3636 release-args : " --alpine"
3737 cache-bust : " 2024-05-17"
38+ # On public preview since 16 January 2025
39+ - os : ubuntu-24.04-arm
40+ # Stack's project-level configuration (stack.yaml) specifies the
41+ # multi-architecture (including Linux/Aarch64) Docker image published
42+ # by Oliver Benz (@benz0li, on GitHub). That image comes with
43+ # Stack 3.1.1. (Note that the online documentation for
44+ # '--docker-stack-exe image' specifies that the host Stack and image
45+ # Stack must have the same version number.)
46+ release-args : " --alpine --stack-args --docker-stack-exe=image"
47+ cache-bust : " 2025-02-07b"
3848 - os : windows-latest
3949 release-args : " "
4050 cache-bust : " 2024-05-17"
6878 run : |
6979 set -ex
7080
71- if [[ "${{ matrix.os }}" == "macos-13" || "${{ matrix.os }}" == "macos-latest" ]]
81+ if [[ "${{ matrix.os }}" == "ubuntu-24.04-arm" || "${{ matrix.os }}" == " macos-13" || "${{ matrix.os }}" == "macos-latest" ]]
7282 then
73- # macos-13 and macos-latest do not include Haskell tools as at 2024-05-06.
83+ # ubuntu-24.04-arm, macos-13 and macos-latest do not include Haskell
84+ # tools as at 2025-02-07.
7485 curl -sSL https://get.haskellstack.org/ | sh
7586 fi
7687
@@ -141,8 +152,12 @@ jobs:
141152 # information.
142153 df -h
143154
144- # Do this in the same step as installing deps to get relevant env var modifications
145- stack etc/scripts/release.hs check ${{ matrix.release-args }}
155+ # Skip checks for Linux/AArch64, given checks for Linux/x86-64
156+ if [[ "${{ matrix.os }}" != "ubuntu-24.04-arm" ]]
157+ then
158+ # Do this in the same step as installing deps to get relevant env var modifications
159+ stack etc/scripts/release.hs check ${{ matrix.release-args }}
160+ fi
146161
147162 # Report the file system disk space usage after checks, for information.
148163 df -h
@@ -160,81 +175,12 @@ jobs:
160175 name : ${{ runner.os }}-${{ runner.arch }}
161176 path : _release/stack-*
162177
163- configuration :
164- name : Check for self-hosted runners
165- runs-on : ubuntu-latest
166- env :
167- CAN_SIGN : ${{ secrets.RELEASE_SIGNING_KEY != '' }}
168- outputs :
169- arm64-runner : ${{ steps.runners.outputs.arm64 }}
170- can-sign : ${{ env.CAN_SIGN }}
171- test-arm64 : ${{ steps.runners.outputs.test-arm64 }}
172- steps :
173- - name : Check for hosted runners
174- id : runners
175- shell : bash
176- env :
177- SELF_HOSTED_RUNNERS : ${{ secrets.SELF_HOSTED_RUNNERS || (github.repository_owner == 'commercialhaskell' && 'arm64') }}
178- run : |
179- echo "runners=$SELF_HOSTED_RUNNERS" >> $GITHUB_OUTPUT
180- if echo "$SELF_HOSTED_RUNNERS" | grep -q 'arm64'; then
181- echo "arm64=['self-hosted', 'linux', 'ARM64']" >> $GITHUB_OUTPUT
182- echo "test-arm64=true" >> $GITHUB_OUTPUT
183- else
184- echo "arm64='ubuntu-latest'" >> $GITHUB_OUTPUT
185- echo "test-arm64=false" >> $GITHUB_OUTPUT
186- fi
187-
188- linux-arm64 :
189- name : Linux ARM64
190- runs-on : ${{ fromJSON(needs.configuration.outputs.arm64-runner) }}
191- needs : configuration
192- steps :
193- - name : Skipping ARM64
194- if : needs.configuration.outputs.test-arm64 == 'false'
195- shell : bash
196- run : |
197- 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'
198- - name : Clone project
199- if : needs.configuration.outputs.test-arm64 == 'true'
200- uses : actions/checkout@v4
201- - name : Install deps
202- shell : bash
203- run : |
204- set -ex
205-
206- # As of 9 December 2024, the self-hosted runner comes with Stack 3.1.1,
207- # but it is not on the PATH. Logging the version for information.
208- /usr/local/bin/stack --version
209-
210- set +ex
211- - name : Build bindist
212- if : needs.configuration.outputs.test-arm64 == 'true'
213- shell : bash
214- run : |
215- # Stack's project-level configuration (stack.yaml) specifies the
216- # multi-architecture (including Linux/Aarch64) Docker image published by
217- # Oliver Benz (@benz0li, on GitHub). That image comes with Stack 3.1.1.
218- # (Note that the online documentation for '--docker-stack-exe image'
219- # specifies that the host Stack and image Stack must have the same
220- # version number.)
221- /usr/local/bin/stack etc/scripts/release.hs build --alpine --stack-args --docker-stack-exe=image
222-
223- - name : Upload bindist
224- if : needs.configuration.outputs.test-arm64 == 'true'
225- uses : actions/upload-artifact@v4
226- with :
227- name : Linux-ARM64
228- path : _release/stack-*
229-
230178 github-release :
231179 name : Create GitHub release
232180 permissions :
233181 contents : write
234182 needs :
235- - configuration
236183 - integration-tests
237- - linux-arm64
238184 runs-on : ubuntu-latest
239185 if : startsWith(github.ref, 'refs/tags/')
240186 steps :
@@ -259,13 +205,11 @@ jobs:
259205 name : Windows-X64
260206 path : _release
261207 - name : Download Linux/AArch64 artifact
262- if : needs.configuration.outputs.test-arm64 == 'true'
263208 uses : actions/download-artifact@v4
264209 with :
265210 name : Linux-ARM64
266211 path : _release
267212 - name : Hash and sign assets
268- if : needs.configuration.outputs.can-sign == 'true'
269213 shell : bash
270214 env :
271215 RELEASE_SIGNING_KEY : ${{ secrets.RELEASE_SIGNING_KEY }}
0 commit comments