Skip to content

Commit

Permalink
Update the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexirp committed Oct 27, 2024
1 parent 0da768e commit 916834b
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 284 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# The file was created by Hexirp based on [1]. [1] is created by GitHub Inc. and many contributors. [1] is The MIT License.
#
# [1]: https://github.com/haskell-actions/setup/blob/dd344bc1cec854a369df8814ce17ef337d6e6170/README.md
name: build
on:
push:
jobs:
build:
name: GHC ${{ matrix.ghc-version }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ghc-version:
- '9.4.8'
- '9.2.8'
- '9.0.2'
- '8.10.7'
- '8.8.4'
steps:
- uses: actions/checkout@v4
- name: set up GHC ${{ matrix.ghc-version }}
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc-version }}
cabal-version: 'latest'
cabal-update: true
- name: configure the build
run: |
cabal configure --enable-tests --enable-benchmarks --disable-documentation
cabal build all --dry-run
- name: restore cached dependencies
uses: actions/cache/restore@v4
id: cache
env:
key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-
- name: install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: cabal build all --only-dependencies
- name: save cached dependencies
uses: actions/cache/save@v4
if: steps.cache.outputs.cache-hit != 'true'
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache.outputs.cache-primary-key }}
- name: build
run: cabal build all
- name: run tests
run: cabal test all
- name: check cabal file
run: cabal check
- name: build documentation
run: cabal haddock all
284 changes: 0 additions & 284 deletions .github/workflows/haskell-ci.yml

This file was deleted.

0 comments on commit 916834b

Please sign in to comment.