From 4ab1847da40d2d8f7a6fd559b2c10a1b7064b20e Mon Sep 17 00:00:00 2001 From: David Mazarro Date: Wed, 6 Mar 2024 18:12:04 +0100 Subject: [PATCH] Added `kleidukos/get-tested` action to generate CI matrix #64 (#190) * Added `kleidukos/get-tested` action * chore: changed `tested-with` GHC versions From now on we will be officially supporting the latest minor versions of GHC 8.10, GHC 9.6 and GHC 9.8 * chore: Added `macos-latest` to matrix --- .github/workflows/build.yml | 24 ++++++++++++++++++------ dotenv.cabal | 2 +- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7068fee..5cf93e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,15 +14,27 @@ concurrency: cancel-in-progress: true jobs: + generate-matrix: + name: "Generate matrix from cabal" + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + runs-on: ubuntu-latest + steps: + - name: Extract the tested GHC versions + id: set-matrix + uses: kleidukos/get-tested@v0.1.6.0 + with: + cabal-file: dotenv.cabal + ubuntu: true + macos: true + version: 0.1.6.0 + build-and-test: + name: GHC ${{ matrix.ghc }} on ${{ matrix.os }} + needs: generate-matrix runs-on: ${{ matrix.os }} strategy: - matrix: - ghc: ["8.10", "9.0", "9.2", "9.4", "9.6"] - os: [ubuntu-latest] - include: - - os: macos-latest - ghc: "9.2" + matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} steps: - uses: actions/checkout@v3 diff --git a/dotenv.cabal b/dotenv.cabal index aff66e3..8403142 100644 --- a/dotenv.cabal +++ b/dotenv.cabal @@ -34,7 +34,7 @@ description: license: MIT license-file: LICENSE author: Justin Leitgeb -tested-with: ghc ==8.10 ghc ==9.0 ghc ==9.2 ghc ==9.4 ghc ==9.6 +tested-with: GHC==8.10, GHC==9.6, GHC==9.8 maintainer: hackage@stackbuilders.com copyright: 2015-Present Stack Builders Inc. category: Configuration