Disable "analysis" flag for gauge package #21
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: Build and Test | |
on: | |
push: | |
branches: [ master ] | |
env: | |
project-cabal-file: trie-simple.cabal | |
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/[email protected] | |
with: | |
cabal-file: ${{ env.project-cabal-file }} | |
ubuntu-version: "latest" | |
version: 0.1.7.0 | |
tests: | |
name: ${{ matrix.ghc }} on ${{ matrix.os }} | |
needs: generate-matrix | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: ${{ fromJSON(needs.generate-matrix.outputs.matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Haskell | |
uses: haskell-actions/[email protected] | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: '3.10' | |
- name: Restore build and dependency cache | |
uses: actions/cache/restore@v4 | |
id: restore-build-cache | |
with: | |
key: build-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(env.project-cabal-file) }} | |
restore-keys: | | |
build-${{ matrix.os }}-${{ matrix.ghc }}- | |
path: | | |
~/.cabal/config | |
~/.cabal/packages | |
~/.cabal/store | |
dist-newstyle | |
- name: (debug) ls cache dir | |
run: | | |
echo "---- global cache ----" | |
ls ~/.cabal/store/ghc-${{ matrix.ghc }}/ || echo ":P)" | |
echo "---- local cache ----" | |
ls dist-newstyle/packagedb/ghc-${{ matrix.ghc }}/ || echo ":P)" | |
- name: Build dependencies | |
run: | | |
cabal update | |
cabal v2-build all --enable-tests --enable-benchmarks --only-dependencies | |
- name: Build | |
run: cabal v2-build all --enable-tests --enable-benchmarks | |
- name: Run test | |
run: cabal v2-test all | |
- name: (debug) ls cache dir | |
run: | | |
echo "---- global cache ----" | |
ls ~/.cabal/store/ghc-${{ matrix.ghc }}/ || echo ":P)" | |
echo "---- local cache ----" | |
ls dist-newstyle/packagedb/ghc-${{ matrix.ghc }}/ || echo ":P)" | |
- uses: actions/cache/save@v4 | |
if: always() | |
with: | |
key: ${{ steps.restore-build-cache.outputs.cache-primary-key }} | |
path: | | |
~/.cabal/config | |
~/.cabal/packages | |
~/.cabal/store | |
dist-newstyle |