Skip to content

Commit

Permalink
Added kleidukos/get-tested action to generate CI matrix #64 (#190)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
DavidMazarro authored Mar 6, 2024
1 parent 4dc84d8 commit 4ab1847
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion dotenv.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4ab1847

Please sign in to comment.