16
16
env :
17
17
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
18
18
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
22
22
# 'Unicode' installer attribute is 'true'. However, that is not the 'large
23
23
# strings' build of NSIS and creates installers that corrupt the PATH
24
24
# environment variable if the default string length of 1024 characters is
35
35
- os : ubuntu-latest
36
36
release-args : " --alpine"
37
37
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"
38
48
- os : windows-latest
39
49
release-args : " "
40
50
cache-bust : " 2024-05-17"
68
78
run : |
69
79
set -ex
70
80
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" ]]
72
82
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.
74
85
curl -sSL https://get.haskellstack.org/ | sh
75
86
fi
76
87
@@ -141,8 +152,12 @@ jobs:
141
152
# information.
142
153
df -h
143
154
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
146
161
147
162
# Report the file system disk space usage after checks, for information.
148
163
df -h
@@ -160,81 +175,12 @@ jobs:
160
175
name : ${{ runner.os }}-${{ runner.arch }}
161
176
path : _release/stack-*
162
177
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
-
230
178
github-release :
231
179
name : Create GitHub release
232
180
permissions :
233
181
contents : write
234
182
needs :
235
- - configuration
236
183
- integration-tests
237
- - linux-arm64
238
184
runs-on : ubuntu-latest
239
185
if : startsWith(github.ref, 'refs/tags/')
240
186
steps :
@@ -259,13 +205,11 @@ jobs:
259
205
name : Windows-X64
260
206
path : _release
261
207
- name : Download Linux/AArch64 artifact
262
- if : needs.configuration.outputs.test-arm64 == 'true'
263
208
uses : actions/download-artifact@v4
264
209
with :
265
210
name : Linux-ARM64
266
211
path : _release
267
212
- name : Hash and sign assets
268
- if : needs.configuration.outputs.can-sign == 'true'
269
213
shell : bash
270
214
env :
271
215
RELEASE_SIGNING_KEY : ${{ secrets.RELEASE_SIGNING_KEY }}
0 commit comments