Skip to content

Commit

Permalink
ci: cabal cache
Browse files Browse the repository at this point in the history
  • Loading branch information
seanhess committed Feb 4, 2025
1 parent 1601e20 commit 4ff2f83
Showing 1 changed file with 33 additions and 14 deletions.
47 changes: 33 additions & 14 deletions .github/workflows/haskell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,45 @@ on:
permissions:
contents: read

steps: &cabal-test
- uses: actions/checkout@v4

- name: Cache Cabal
id: cache-cabal
uses: actions/cache@v4
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks
- name: Build
run: cabal build --enable-tests --enable-benchmarks all
- name: Test
run: cabal test



jobs:
build:

build-982:
runs-on: ubuntu-latest

container:
image: haskell:9.8.2
steps: *cabal-test

build-966:
runs-on: ubuntu-latest
container:
image: haskell:9.6.6
steps: *cabal-test

steps:
- uses: actions/checkout@v4

# - uses: actions/setup-haskell@v1
# with:
Expand All @@ -36,13 +65,3 @@ jobs:
# ${{ runner.os }}-build-${{ env.cache-name }}-
# ${{ runner.os }}-build-
# ${{ runner.os }}-

- name: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks
- name: Build
run: cabal build --enable-tests --enable-benchmarks all
- name: Test
run: cabal test

0 comments on commit 4ff2f83

Please sign in to comment.