From cc30e4e5de9933627cc3c00f56df4095599d272f Mon Sep 17 00:00:00 2001 From: DavidMazarro Date: Tue, 16 Apr 2024 13:06:49 +0200 Subject: [PATCH] chore: Use get-tested GH Action to generate runner matrix --- .github/workflows/build.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e1b3750..e94e0b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,12 +13,26 @@ concurrency: cancel-in-progress: true jobs: - haskell: + generate-matrix: + name: "Generate matrix from cabal" + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} runs-on: ubuntu-latest - strategy: - matrix: - ghc: ['8.2', '8.4', '8.6', '8.8', '8.10', '9.0', '9.2', '9.4', '9.6', '9.8'] + steps: + - name: Extract the tested GHC versions + id: set-matrix + uses: kleidukos/get-tested@v0.1.7.0 + with: + cabal-file: get-tested.cabal + ubuntu-version: latest + version: 0.1.7.0 + build-and-test: + name: ${{ matrix.ghc }} on ${{ matrix.os }} + needs: generate-matrix + strategy: + matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} + runs-on: ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3