Skip to content

Commit 51feab4

Browse files
author
GHC GitLab CI
committed
ci: add dynamic build/test matrix (DYNAMIC=0/1) and restrict push trigger to stable-ghc-9.14
1 parent 8d5d42a commit 51feab4

File tree

1 file changed

+37
-22
lines changed

1 file changed

+37
-22
lines changed

.github/workflows/nix-ci.yml

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,45 @@
1-
name: CI
1+
name: Nix CI
22

3-
# Trigger the workflow on push or pull request, but only for the master branch
43
on:
54
pull_request:
6-
types:
7-
- opened
8-
- synchronize
5+
types: [opened, synchronize]
96
push:
10-
branches: [master]
11-
7+
branches: [stable-ghc-9.14]
128
workflow_dispatch:
139

1410
jobs:
1511
cabal:
16-
name: ${{ matrix.plat }} / ghc ${{ matrix.ghc }}
17-
runs-on: "${{ fromJSON('{\"x86_64-linux\": \"ubuntu-24.04\", \"aarch64-linux\": \"ubuntu-24.04-arm\", \"x86_64-darwin\": \"macos-latest\", \"aarch64-darwin\": \"macos-latest\"}')[matrix.plat] }}"
18-
1912
strategy:
2013
fail-fast: false
2114
matrix:
22-
plat:
23-
- x86_64-linux
24-
# - aarch64-linux # disabled: waiting for devx images to be fixed
25-
# - x86_64-darwin # disabled: waiting for devx images to be fixed
26-
- aarch64-darwin
27-
ghc: ['98'] # bootstrapping compiler
15+
include:
16+
- plat: x86_64-linux
17+
runner: ubuntu-24.04
18+
ghc: '98'
19+
dynamic: 0
20+
- plat: x86_64-linux
21+
runner: ubuntu-24.04
22+
ghc: '98'
23+
dynamic: 1
24+
# - plat: aarch64-linux # disabled: waiting for devx images to be fixed
25+
# runner: ubuntu-24.04-arm
26+
# ghc: '98'
27+
# dynamic: 0
28+
# - plat: aarch64-linux
29+
# runner: ubuntu-24.04-arm
30+
# ghc: '98'
31+
# dynamic: 1
32+
- plat: aarch64-darwin
33+
runner: macos-latest
34+
ghc: '98'
35+
dynamic: 0
36+
- plat: aarch64-darwin
37+
runner: macos-latest
38+
ghc: '98'
39+
dynamic: 1
40+
41+
name: "${{ matrix.plat }} / ghc ${{ matrix.ghc }} / dynamic=${{ matrix.dynamic }}"
42+
runs-on: ${{ matrix.runner }}
2843

2944
steps:
3045
- uses: actions/checkout@v4
@@ -50,25 +65,25 @@ jobs:
5065
# shell: devx {0}
5166
# run: ./configure
5267

53-
- name: Build the bindist
68+
- name: Build the bindist (dynamic=${{ matrix.dynamic }})
5469
shell: devx {0}
55-
run: make CABAL=$PWD/_build/stage0/bin/cabal
70+
run: make CABAL=$PWD/_build/stage0/bin/cabal DYNAMIC=${{ matrix.dynamic }}
5671

5772
- name: Upload artifacts
5873
uses: actions/upload-artifact@v4
5974
with:
60-
name: ${{ matrix.plat }}-bindist
75+
name: ${{ matrix.plat }}-dynamic${{ matrix.dynamic }}-bindist
6176
path: _build/bindist
6277

63-
- name: Run the testsuite
78+
- name: Run the testsuite (dynamic=${{ matrix.dynamic }})
6479
shell: devx {0}
65-
run: make test CABAL=$PWD/_build/stage0/bin/cabal
80+
run: make test CABAL=$PWD/_build/stage0/bin/cabal DYNAMIC=${{ matrix.dynamic }}
6681

6782
- name: Upload test results
6883
uses: actions/upload-artifact@v4
6984
if: ${{ !cancelled() }} # upload test results even if the testsuite failed to pass
7085
with:
71-
name: ${{ matrix.plat }}-testsuite-results
86+
name: ${{ matrix.plat }}-dynamic${{ matrix.dynamic }}-testsuite-results
7287
path: |
7388
_build/test-perf.csv
7489
_build/test-summary.txt

0 commit comments

Comments
 (0)