Skip to content

Commit b508140

Browse files
authored
Added kleidukos/get-tested action to generate CI matrix (#64)
1 parent 98ed20d commit b508140

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

.github/workflows/main.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,33 @@ concurrency:
1818
cancel-in-progress: true
1919

2020
jobs:
21-
build:
21+
generate-matrix:
22+
name: "Generate matrix from cabal"
23+
outputs:
24+
matrix: ${{ steps.set-matrix.outputs.matrix }}
2225
runs-on: ubuntu-latest
26+
steps:
27+
- name: Extract the tested GHC versions
28+
id: set-matrix
29+
uses: kleidukos/get-tested@v0.1.6.0
30+
with:
31+
cabal-file: rollbar-client/rollbar-client.cabal
32+
ubuntu: true
33+
version: 0.1.6.0
34+
build:
35+
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
36+
needs: generate-matrix
37+
runs-on: ${{ matrix.os }}
2338
strategy:
24-
matrix:
25-
ghc-version:
26-
- '8.8'
27-
- '8.10'
28-
- '9.4'
39+
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
2940
steps:
3041
- name: Checkout code
3142
uses: actions/checkout@v4
3243
- name: Setup Haskell tools
3344
uses: haskell-actions/setup@v2
3445
id: setup
3546
with:
36-
ghc-version: ${{ matrix.ghc-version }}
47+
ghc-version: ${{ matrix.ghc }}
3748
cabal-version: 'latest'
3849
cabal-update: true
3950
- name: Configure the build

0 commit comments

Comments
 (0)