Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate CI matrix from cabal file with get-tested - issue 328 #329

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
23 changes: 16 additions & 7 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,26 @@ defaults:
shell: bash

jobs:
generateMatrix:
name: "Generate matrix from cabal"
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout base repo
uses: actions/checkout@v2
- name: Extract the tested GHC versions
id: set-matrix
run: |
wget https://github.com/Kleidukos/get-tested/releases/download/v0.1.5.0/get-tested-0.1.5.0-linux-amd64 -O get-tested
chmod +x get-tested
./get-tested --ubuntu scotty.cabal >> $GITHUB_OUTPUT
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
needs: generateMatrix
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- { cabal: "3.10", os: ubuntu-latest, ghc: "8.10.7" }
- { cabal: "3.10", os: ubuntu-latest, ghc: "9.0.2" }
- { cabal: "3.10", os: ubuntu-latest, ghc: "9.2.8" }
- { cabal: "3.10", os: ubuntu-latest, ghc: "9.4.6", allow-failure: true }
- { cabal: "3.10", os: ubuntu-latest, ghc: "9.6.2", allow-failure: true }
matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }}
fail-fast: false

steps:
Expand Down
Loading