more parallelize env #138
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Haskell CI | |
on: | |
push: | |
branches: | |
- "*" | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-22.04 ] | |
haskell: [ 9.4.7 ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check Haskell version | |
run: | | |
ghcup --version | |
ghc --version | |
- name: Install Haskell ${{ matrix.haskell }} | |
run: | | |
ghcup install ghc ${{ matrix.haskell }} | |
ghcup set ghc ${{ matrix.haskell }} | |
- name: Check Haskell version | |
run: ghc --version | |
- name: Cache | |
uses: actions/cache@v3 | |
env: | |
# increment when you want to rebuild the cache | |
cache-name: cache-cabal-v6 | |
with: | |
path: /home/runner/.local/state/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: Run tests | |
run: cabal test all | |