-
Notifications
You must be signed in to change notification settings - Fork 740
654 lines (592 loc) · 20.9 KB
/
Copy pathreusable-release.yml
File metadata and controls
654 lines (592 loc) · 20.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
name: Build and release
on:
workflow_call:
inputs:
branches:
required: true
type: string
ghc:
type: string
default: 9.10.3
# speed up installation by skipping docs
# starting with GHC 9.10.x, we also need to pass the 'install_extra' target
ghc_targets:
type: string
default: "install_bin install_lib update_package_db install_extra"
cabal:
type: string
default: 3.14.2.0
test:
type: boolean
default: true
env:
GHC_VERSION: ${{ inputs.ghc }}
GHC_TARGETS: ${{ inputs.ghc_targets }}
# This shouldn't be necessary, but cabal developers want to build with 9.10.3,
# which causes test failures when used as runtime GHC version as well. For
# more detail, please see the note and link to the issue in
# .github/scripts/test.bash
GHC_TEST_VERSION: 9.6.7
GHC_TEST_TARGETS: "install_bin install_lib update_package_db"
CABAL_VERSION: ${{ inputs.cabal }}
BOOTSTRAP_HASKELL_NONINTERACTIVE: 1
BOOTSTRAP_HASKELL_MINIMAL: 1
DEBIAN_FRONTEND: noninteractive
TZ: Asia/Singapore
jobs:
tool-output:
runs-on: ubuntu-latest
outputs:
apt_tools: ${{ steps.gen_output.outputs.apt_tools }}
apt_tools_ncurses6: ${{ steps.gen_output.outputs.apt_tools_ncurses6 }}
rpm_tools: ${{ steps.gen_output.outputs.rpm_tools }}
apk_tools: ${{ steps.gen_output.outputs.apk_tools }}
xbps_tools: ${{ steps.gen_output.outputs.xbps_tools }}
env:
APT: "groff-base libnuma-dev zlib1g-dev libgmp-dev libgmp10 libssl-dev liblzma-dev libbz2-dev git wget lsb-release software-properties-common gnupg2 apt-transport-https gcc autoconf automake build-essential curl ghc gzip libffi-dev libncurses-dev patchelf"
RPM: "groff-base autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils-libs findutils gcc gcc-c++ git gmp gmp-devel jq lbzip2 make ncurses ncurses-compat-libs ncurses-devel openssh-clients patch perl pxz python3 sqlite sudo wget which xz zlib-devel patchelf"
APK: "groff binutils-gold curl gcc g++ gmp-dev libc-dev libffi-dev make musl-dev ncurses-dev perl tar xz autoconf automake bzip2 coreutils elfutils-dev findutils git jq bzip2-dev patch python3 sqlite sudo wget which zlib-dev patchelf zlib zlib-dev zlib-static"
XBPS: "groff ncurses-libtinfo-libs autoconf automake binutils bzip2 coreutils curl elfutils-devel elfutils findutils gcc gmp gmp-devel jq lbzip2 make ncurses ncurses-devel openssh patch perl python3 sqlite sudo wget which xz tar zlib-devel patchelf gzip"
steps:
- name: Generate output
id: gen_output
run: |
echo apt_tools="${{ env.APT }} libncurses5 libtinfo5" >> "$GITHUB_OUTPUT"
echo apt_tools_ncurses6="${{ env.APT }} libncurses6 libtinfo6" >> "$GITHUB_OUTPUT"
echo rpm_tools="${{ env.RPM }}" >> "$GITHUB_OUTPUT"
echo apk_tools="${{ env.APK }}" >> "$GITHUB_OUTPUT"
echo xbps_tools="${{ env.XBPS }}" >> "$GITHUB_OUTPUT"
build-linux:
name: Build linux binaries
runs-on: ubuntu-latest
needs: ["tool-output"]
env:
TARBALL_EXT: tar.xz
ARCH: 64
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
platform: [ { image: "alpine:3.21"
, installCmd: "apk update && apk add"
, toolRequirements: "${{ needs.tool-output.outputs.apk_tools }}"
, DISTRO: "Unknown"
, ARTIFACT: "x86_64-linux-unknown"
, ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
}
]
container:
image: ${{ matrix.platform.image }}
steps:
- name: Install requirements
shell: sh
run: |
${{ matrix.platform.installCmd }} curl bash git ${{ matrix.platform.toolRequirements }}
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- name: Run build
run: |
bash .github/scripts/build.bash
env:
ARTIFACT: ${{ matrix.platform.ARTIFACT }}
DISTRO: ${{ matrix.platform.DISTRO }}
ADD_CABAL_ARGS: ${{ matrix.platform.ADD_CABAL_ARGS }}
- if: always()
name: Upload artifact
uses: ./.github/actions/upload
with:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ matrix.platform.ARTIFACT }}-${{ matrix.branch }}
path: |
./out/*
build-linux-32bit:
name: Build linux binaries (32bit)
needs: ["tool-output"]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
env:
TARBALL_EXT: tar.xz
ARCH: 32
DISTRO: "Unknown"
ARTIFACT: "i386-linux-unknown"
ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- name: Run build (32 bit linux)
uses: docker://i386/alpine:3.21
with:
args: sh -c "apk update && apk add curl bash git ${{ needs.tool-output.outputs.apk_tools }} && export PATH=$HOME/.ghcup/bin:$PATH && curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh && ghcup install cabal ${{ env.CABAL_VERSION }} && bash .github/scripts/build.bash"
- if: always()
name: Upload artifact
uses: ./.github/actions/upload
with:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: |
./out/*
build-arm:
name: Build ARM binary
needs: ["tool-output"]
runs-on: ubuntu-22.04-arm
env:
TARBALL_EXT: tar.xz
ADD_CABAL_ARGS: ""
ARCH: ARM64
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
platform: [ { ARCH: "ARM64"
, DISTRO: "Alpine"
, ARTIFACT: "aarch64-linux-unknown"
}
]
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- uses: docker://arm64v8/alpine:3.21
name: Run build (aarch64 linux alpine)
with:
args: sh -c "apk update && apk add curl bash git ${{ needs.tool-output.outputs.apk_tools }} && export PATH=$HOME/.ghcup/bin:$PATH && curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh && ghcup install cabal ${{ env.CABAL_VERSION }} && bash .github/scripts/build.bash"
env:
ARTIFACT: ${{ matrix.platform.ARTIFACT }}
DISTRO: ${{ matrix.platform.DISTRO }}
ADD_CABAL_ARGS: "--enable-split-sections --enable-executable-static"
- if: always()
name: Upload artifact
uses: ./.github/actions/upload
with:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ matrix.platform.ARTIFACT }}-${{ matrix.branch }}
path: |
./out/*
build-mac-x86_64:
name: Build binary (Mac x86_64)
runs-on: macOS-15-intel
env:
MACOSX_DEPLOYMENT_TARGET: 10.13
ADD_CABAL_ARGS: ""
ARTIFACT: "x86_64-apple-darwin"
ARCH: 64
TARBALL_EXT: tar.xz
DISTRO: na
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- name: Run build
run: |
bash .github/scripts/build.bash
- if: always()
name: Upload artifact
uses: ./.github/actions/upload
with:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: |
./out/*
build-mac-aarch64:
name: Build binary (Mac aarch64)
runs-on: macos-latest
env:
MACOSX_DEPLOYMENT_TARGET: 10.13
ADD_CABAL_ARGS: ""
ARTIFACT: "aarch64-apple-darwin"
ARCH: ARM64
TARBALL_EXT: tar.xz
DISTRO: na
HOMEBREW_CHANGE_ARCH_TO_ARM: 1
GHCUP_INSTALL_BASE_PREFIX: ${{ github.workspace }}
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- name: Run build
run: |
bash .github/scripts/build.bash
- if: always()
name: Upload artifact
uses: ./.github/actions/upload
with:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: |
./out/*
build-win:
name: Build binary (Win)
runs-on: windows-latest
env:
ADD_CABAL_ARGS: ""
ARTIFACT: "x86_64-mingw64"
ARCH: 64
TARBALL_EXT: "zip"
DISTRO: na
CABAL_DIR: "C:\\Users\\runneradmin\\AppData\\Roaming\\cabal"
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- name: install windows deps
shell: pwsh
run: |
# https://www.msys2.org/docs/updating/
C:\msys64\usr\bin\bash -lc "pacman --disable-download-timeout --noconfirm -Syuu"
C:\msys64\usr\bin\bash -lc "pacman --disable-download-timeout --noconfirm -Syuu"
C:\msys64\usr\bin\bash -lc "pacman --disable-download-timeout --noconfirm -S make mingw-w64-x86_64-clang curl autoconf mingw-w64-x86_64-pkgconf ca-certificates base-devel gettext autoconf make libtool automake python p7zip patch unzip zip git"
taskkill /F /FI "MODULES eq msys-2.0.dll"
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- name: Run build (windows)
run: |
$env:CHERE_INVOKING = 1
$env:MSYS2_PATH_TYPE = "inherit"
$ErrorActionPreference = "Stop"
C:\msys64\usr\bin\bash -lc "bash .github/scripts/build.bash"
shell: pwsh
- if: always()
name: Upload artifact
uses: ./.github/actions/upload
with:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: |
./out/*
build-freebsd-x86_64:
if: ${{ vars.ENABLE_PRIVATE_RUNNERS == 1 }}
name: Build FreeBSD x86_64
runs-on: [self-hosted, FreeBSD, X64]
env:
ADD_CABAL_ARGS: ""
ARTIFACT: "x86_64-portbld-freebsd"
ARCH: 64
TARBALL_EXT: tar.xz
DISTRO: na
RUNNER_OS: FreeBSD
CABAL_DIR: ${{ github.workspace }}/.cabal
GHCUP_INSTALL_BASE_PREFIX: ${{ github.workspace }}
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- name: Run build
run: |
sudo sed -i.bak -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
sudo pkg install -y curl gcc gmp gmake ncurses perl5 pkgconf libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x
sudo tzsetup Etc/GMT
sudo adjkerntz -a
bash .github/scripts/build.bash
- if: always()
name: Upload artifact
uses: ./.github/actions/upload
with:
if-no-files-found: error
retention-days: 2
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: |
./out/*
test-linux:
name: Test linux binaries
runs-on: ubuntu-latest
needs: ["tool-output", "build-linux"]
if: ${{ inputs.test }}
env:
TARBALL_EXT: tar.xz
ARCH: 64
ADD_CABAL_ARGS: ""
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
platform: [ { image: "alpine:3.21"
, installCmd: "apk update && apk add"
, toolRequirements: "${{ needs.tool-output.outputs.apk_tools }}"
, DISTRO: "Unknown"
, ARTIFACT: "x86_64-linux-unknown"
}
]
container:
image: ${{ matrix.platform.image }}
steps:
- name: Install requirements
shell: sh
run: |
${{ matrix.platform.installCmd }} curl bash git ${{ matrix.platform.toolRequirements }}
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
# Test suite uses 'git' to find the test files. That appears
# to cause problems in CI. A similar hack is employed in the validate
# pipeline.
- name: git clone fix
run: git config --system --add safe.directory $GITHUB_WORKSPACE
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- uses: ./.github/actions/download
with:
name: artifacts-${{ matrix.platform.ARTIFACT }}-${{ matrix.branch }}
path: ./out
- name: Run test
run: |
bash .github/scripts/test.bash
env:
ARTIFACT: ${{ matrix.platform.ARTIFACT }}
DISTRO: ${{ matrix.platform.DISTRO }}
ADD_CABAL_ARGS: ${{ matrix.platform.ADD_CABAL_ARGS }}
# TODO: https://github.com/haskell/cabal/issues/11049
# test-linux-32bit:
# name: Test linux binaries (32bit)
# runs-on: ubuntu-latest
# needs: ["build-linux-32bit"]
# if: $ {{ inputs.test }}
# env:
# TARBALL_EXT: tar.xz
# ARCH: 32
# DISTRO: "Unknown"
# ARTIFACT: "i386-linux-unknown"
# ADD_CABAL_ARGS: ""
# strategy:
# fail-fast: false
# matrix:
# branch: ${{ fromJSON(inputs.branches) }}
# steps:
# - uses: actions/checkout@v6
# with:
# ref: ${{ matrix.branch }}
#
# - uses: ./.github/actions/download
# with:
# name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
# path: ./out
#
# - name: Run build (32 bit linux)
# uses: docker://i386/alpine:3.21
# with:
# args: sh -c "apk update && apk add curl bash git ${{ needs.tool-output.outputs.apk_tools }} groff && git config --system --add safe.directory $GITHUB_WORKSPACE && export PATH=$HOME/.ghcup/bin:$PATH && curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh && ghcup install cabal ${{ env.CABAL_VERSION }} && bash .github/scripts/build.bash"
test-arm:
name: Test ARM binary
runs-on: ubuntu-22.04-arm
needs: ["tool-output", "build-arm"]
if: ${{ inputs.test }}
env:
ADD_CABAL_ARGS: ""
TARBALL_EXT: tar.xz
ARCH: ARM64
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
platform: [ { ARCH: "ARM64"
, DISTRO: "Alpine"
, ARTIFACT: "aarch64-linux-unknown"
}
]
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- uses: ./.github/actions/download
with:
name: artifacts-${{ matrix.platform.ARTIFACT }}-${{ matrix.branch }}
path: ./out
- uses: docker://arm64v8/alpine:3.21
name: Run build (aarch64 linux alpine)
with:
args: sh -c "apk update && apk add curl bash git groff ${{ needs.tool-output.outputs.apk_tools }} && git config --system --add safe.directory $GITHUB_WORKSPACE && export PATH=$HOME/.ghcup/bin:$PATH && curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh && ghcup install cabal ${{ env.CABAL_VERSION }} && bash .github/scripts/test.bash"
env:
ARTIFACT: ${{ matrix.platform.ARTIFACT }}
DISTRO: ${{ matrix.platform.DISTRO }}
test-mac-x86_64:
name: Test binary (Mac x86_64)
runs-on: macOS-15-intel
needs: ["build-mac-x86_64"]
if: ${{ inputs.test }}
env:
ADD_CABAL_ARGS: ""
MACOSX_DEPLOYMENT_TARGET: 10.13
ARTIFACT: "x86_64-apple-darwin"
ARCH: 64
TARBALL_EXT: tar.xz
DISTRO: na
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- uses: ./.github/actions/download
with:
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: ./out
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- name: Run test
run: |
# cabal-testsuite/PackageTests/Configure/cabal.test.hs needs it
# and it doesn't appear pre-installed here
brew install autoconf automake
bash .github/scripts/test.bash
test-mac-aarch64:
name: Test binary (Mac aarch64)
runs-on: macos-latest
needs: ["build-mac-aarch64"]
if: ${{ inputs.test }}
env:
ADD_CABAL_ARGS: ""
MACOSX_DEPLOYMENT_TARGET: 10.13
ARTIFACT: "aarch64-apple-darwin"
ARCH: ARM64
TARBALL_EXT: tar.xz
DISTRO: na
HOMEBREW_CHANGE_ARCH_TO_ARM: 1
GHCUP_INSTALL_BASE_PREFIX: ${{ github.workspace }}
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- uses: ./.github/actions/download
with:
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: ./out
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- name: Run test
run: |
bash .github/scripts/test.bash
test-win:
name: Test binary (Win)
runs-on: windows-latest
needs: ["build-win"]
if: ${{ inputs.test }}
env:
ADD_CABAL_ARGS: ""
ARTIFACT: "x86_64-mingw64"
ARCH: 64
TARBALL_EXT: "zip"
DISTRO: na
CABAL_DIR: "C:\\Users\\runneradmin\\AppData\\Roaming\\cabal"
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- name: install windows deps
shell: pwsh
run: |
C:\msys64\usr\bin\bash -lc "pacman --disable-download-timeout --noconfirm -Syuu"
C:\msys64\usr\bin\bash -lc "pacman --disable-download-timeout --noconfirm -Syuu"
C:\msys64\usr\bin\bash -lc "pacman --disable-download-timeout --noconfirm -S make mingw-w64-x86_64-clang curl autoconf mingw-w64-x86_64-pkgconf ca-certificates base-devel gettext autoconf make libtool automake python p7zip patch unzip zip git"
taskkill /F /FI "MODULES eq msys-2.0.dll"
- uses: ./.github/actions/download
with:
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: ./out
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- name: Run test (windows)
run: |
$env:CHERE_INVOKING = 1
$env:MSYS2_PATH_TYPE = "inherit"
$ErrorActionPreference = "Stop"
C:\msys64\usr\bin\bash -lc "bash .github/scripts/test.bash"
shell: pwsh
test-freebsd-x86_64:
name: Test FreeBSD x86_64
runs-on: [self-hosted, FreeBSD, X64]
needs: ["build-freebsd-x86_64"]
if: ${{ inputs.test && vars.ENABLE_PRIVATE_RUNNERS == 1 }}
env:
ADD_CABAL_ARGS: ""
ARTIFACT: "x86_64-portbld-freebsd"
ARCH: 64
TARBALL_EXT: tar.xz
DISTRO: na
RUNNER_OS: FreeBSD
CABAL_DIR: ${{ github.workspace }}/.cabal
GHCUP_INSTALL_BASE_PREFIX: ${{ github.workspace }}
strategy:
fail-fast: false
matrix:
branch: ${{ fromJSON(inputs.branches) }}
steps:
- uses: actions/checkout@v6
with:
ref: ${{ matrix.branch }}
- uses: ./.github/actions/download
with:
name: artifacts-${{ env.ARTIFACT }}-${{ matrix.branch }}
path: ./out
- name: Install GHCup
uses: haskell/ghcup-setup@v1
with:
cabal: ${{ env.CABAL_VERSION }}
- name: Run test
run: |
sudo sed -i.bak -e 's/quarterly/latest/' /etc/pkg/FreeBSD.conf
sudo pkg install -y curl gcc gmp gmake ncurses perl5 pkgconf libffi libiconv git bash misc/compat10x misc/compat11x misc/compat12x groff autoconf automake
sudo tzsetup Etc/GMT
sudo adjkerntz -a
bash .github/scripts/test.bash