@@ -19,16 +19,17 @@ jobs:
19
19
20
20
strategy :
21
21
matrix :
22
- os : ['windows-latest', 'ubuntu-latest', 'macos-12']
22
+ os : ['windows-latest', 'ubuntu-latest', 'macos-12', 'macos-latest' ]
23
23
include :
24
24
- os : ubuntu-latest
25
25
os-name : Linux
26
26
container : fossa/haskell-static-alpine:ghc-9.4.8
27
27
project-file : cabal.project.ci.linux
28
28
ghc : ' 9.4.8'
29
29
30
+ # macos-latest pointed at macos-12 this before it was changed to ARM.
30
31
- os : macos-12
31
- os-name : macOS
32
+ os-name : macOS-intel
32
33
project-file : cabal.project.ci.macos
33
34
ghc : ' 9.4.8'
34
35
37
38
project-file : cabal.project.ci.windows
38
39
ghc : ' 9.4.8'
39
40
41
+ - os : macos-latest
42
+ os-name : macOS-arm64
43
+ project-file : cabal.project.ci.macos
44
+ ghc : ' 9.4.8'
45
+
40
46
steps :
41
47
42
48
- uses : actions/checkout@v4
@@ -134,22 +140,22 @@ jobs:
134
140
name : Cache cabal store
135
141
with :
136
142
path : ${{ steps.setup-haskell.outputs.cabal-store || '~/.local/state/cabal' }}
137
- key : ${{ runner .os }}-${{ matrix.ghc }}-cabal-cache-${{ steps.compute-cache-key.outputs.cabal-cache-key }}
143
+ key : ${{ matrix .os-name }}-${{ matrix.ghc }}-cabal-cache-${{ steps.compute-cache-key.outputs.cabal-cache-key }}
138
144
restore-keys : |
139
- ${{ runner .os }}-${{ matrix.ghc }}-cabal-cache-
140
- ${{ runner .os }}-${{ matrix.ghc }}-
141
- ${{ runner .os }}-
145
+ ${{ matrix .os-name }}-${{ matrix.ghc }}-cabal-cache-
146
+ ${{ matrix .os-name }}-${{ matrix.ghc }}-
147
+ ${{ matrix .os-name }}-
142
148
143
149
- uses : actions/cache@v4
144
150
name : Cache dist-newstyle
145
151
with :
146
152
path : ${{ github.workspace }}/dist-newstyle
147
- key : ${{ runner .os }}-${{ env.GHC_VERSION }}-dist-newstyle-${{ github.sha }}
153
+ key : ${{ matrix .os-name }}-${{ env.GHC_VERSION }}-dist-newstyle-${{ github.sha }}
148
154
restore-keys : |
149
- ${{ runner .os }}-${{ env.GHC_VERSION }}-dist-newstyle-${{ env.parent_commit }}
150
- ${{ runner .os }}-${{ env.GHC_VERSION }}-dist-newstyle-
151
- ${{ runner .os }}-${{ env.GHC_VERSION }}-
152
- ${{ runner .os }}-
155
+ ${{ matrix .os-name }}-${{ env.GHC_VERSION }}-dist-newstyle-${{ env.parent_commit }}
156
+ ${{ matrix .os-name }}-${{ env.GHC_VERSION }}-dist-newstyle-
157
+ ${{ matrix .os-name }}-${{ env.GHC_VERSION }}-
158
+ ${{ matrix .os-name }}-
153
159
154
160
- name : Update vendored binaries
155
161
run : |
@@ -224,6 +230,7 @@ jobs:
224
230
APPLE_NOTARIZATION_DEV_PASS : ${{ secrets.APPLE_NOTARIZATION_DEV_PASS }}
225
231
APPLE_NOTARIZATION_DEV_ID : ${{ secrets.APPLE_NOTARIZATION_DEV_ID }}
226
232
APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
233
+ OS_NAME : ${{ matrix.os-name }}
227
234
run : |
228
235
# create variables
229
236
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
@@ -241,10 +248,18 @@ jobs:
241
248
security import $CERTIFICATE_PATH -P "$MACOS_BUILD_CERT_P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
242
249
security list-keychain -d user -s $KEYCHAIN_PATH
243
250
251
+
244
252
chmod +x release/*
245
253
# '--options runtime' enables the hardened runtime: https://developer.apple.com/documentation/security/hardened_runtime
254
+ # On Apple Silicon there doesn't seem to be a default liblzma, and the one installed via homebrew is rejected.
255
+ # The entitlement line will relax that check.
246
256
# The hardened runtime is required for notarization.
247
- codesign --options runtime -s 'FOSSA, Inc.' release/fossa
257
+ if [ "$OS_NAME" = "macOS-arm64" ] ; then
258
+ codesign --entitlements .github/entitlements.plist --options runtime -s 'FOSSA, Inc.' release/fossa
259
+ else
260
+ # Intel does not need the entitlement to run liblzma, which is included in the base system.
261
+ codesign --options runtime -s 'FOSSA, Inc.' release/fossa
262
+ fi
248
263
codesign --options runtime -s 'FOSSA, Inc.' release/diagnose
249
264
codesign --options runtime -s 'FOSSA, Inc.' release/millhone
250
265
@@ -260,7 +275,7 @@ jobs:
260
275
261
276
- uses : actions/upload-artifact@v4
262
277
with :
263
- name : ${{ runner .os }}-binaries
278
+ name : ${{ matrix .os-name }}-binaries
264
279
path : release
265
280
266
281
create-release :
@@ -367,10 +382,14 @@ jobs:
367
382
gzip "$LINUX_DIAGNOSE_TAR_PATH"
368
383
gzip "$LINUX_MILLHONE_TAR_PATH"
369
384
370
- chmod +x macOS-binaries/*
371
- zip -j release/fossa_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/fossa
372
- zip -j release/diagnose_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/diagnose
373
- zip -j release/millhone_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-binaries/millhone
385
+ chmod +x macOS-intel-binaries/*
386
+ zip -j release/fossa_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-intel-binaries/fossa
387
+ zip -j release/diagnose_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-intel-binaries/diagnose
388
+ zip -j release/millhone_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip macOS-intel-binaries/millhone
389
+ chmod +x macOS-arm64-binaries/*
390
+ zip -j release/fossa_${{ steps.get-version.outputs.VERSION }}_darwin_arm64.zip macOS-arm64-binaries/fossa
391
+ zip -j release/diagnose_${{ steps.get-version.outputs.VERSION }}_darwin_arm64.zip macOS-arm64-binaries/diagnose
392
+ zip -j release/millhone_${{ steps.get-version.outputs.VERSION }}_darwin_arm64.zip macOS-arm64-binaries/millhone
374
393
375
394
chmod +x Windows-binaries/*
376
395
zip -j release/fossa_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip Windows-binaries/fossa.exe
@@ -384,6 +403,7 @@ jobs:
384
403
sha256sum --binary "fossa_${{ steps.get-version.outputs.VERSION }}_linux_amd64.zip" > "fossa_${{ steps.get-version.outputs.VERSION }}_linux_amd64.zip.sha256"
385
404
sha256sum --binary "fossa_${{ steps.get-version.outputs.VERSION }}_linux_amd64.tar.gz" > "fossa_${{ steps.get-version.outputs.VERSION }}_linux_amd64.tar.gz.sha256"
386
405
sha256sum --binary "fossa_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip" > "fossa_${{ steps.get-version.outputs.VERSION }}_darwin_amd64.zip.sha256"
406
+ sha256sum --binary "fossa_${{ steps.get-version.outputs.VERSION }}_darwin_arm64.zip" > "fossa_${{ steps.get-version.outputs.VERSION }}_darwin_arm64.zip.sha256"
387
407
sha256sum --binary "fossa_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip" > "fossa_${{ steps.get-version.outputs.VERSION }}_windows_amd64.zip.sha256"
388
408
389
409
echo "Sanity-checking the checksums."
0 commit comments