Skip to content

Commit

Permalink
Github Actions basic setup
Browse files Browse the repository at this point in the history
  • Loading branch information
kozross committed Jan 21, 2025
1 parent c700005 commit ea6fc8b
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/covenant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: covenant

on:
pull_request:
push:

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.7.1
with:
cabal-file: covenant.cabal
ubuntu-version: "latest"
macos-version: "latest"
windows-version: "latest"
version: 0.1.7.1
tests:
name: ${{ matrix.ghc }} on ${{ matrix.os }}
needs: generate-matrix
runs-on: ${{ matrix.os }}
strategy:
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }}
steps:
- name: Checkout base repo
uses: actions/checkout@v3
- name: Set up Haskell
id: setup-haskell
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: latest
- name: Freeze
run: cabal freeze
- name: Cache
uses: actions/cache@v3.3.1
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: ${{ runner.os}}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
- name: Build
run: cabal build

0 comments on commit ea6fc8b

Please sign in to comment.