refactoring the Lower envelope stuff #23
Workflow file for this run
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: Get-Tested | |
on: | |
- push | |
- pull_request | |
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: hgeometry/hgeometry.cabal | |
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: | |
- name: Checkout base repo | |
uses: actions/checkout@v4 | |
- name: Set up Haskell | |
id: setup-haskell | |
uses: haskell-actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: 'latest' | |
- name: Configure | |
run: | | |
ARCHITECTURE=$(uname -m) | |
echo "ARCH=$ARCHITECTURE" >> $GITHUB_ENV | |
echo ${{ env.ARCH }} | |
cabal configure --enable-tests --enable-benchmarks | |
- name: Install dependencies | |
run: cabal build --dependencies-only -j2 hgeometry | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.setup-haskell.outputs.cabal-store }} | |
key: ${{ runner.os }}-ghc-${{ matrix.ghc }}-${{ hashFiles('**/plan.json') }} | |
restore-keys: ${{ runner.os }}-ghc-${{ matrix.ghc }}- | |
- name: Build | |
run: cabal build all | |
- name: Test | |
run: cabal test all --test-show-details=direct | |
- name: cabal check | |
run: | | |
cd $GITHUB_WORKSPACE/hgeometry-combinatorial | |
cabal -vnormal check | |
cd $GITHUB_WORKSPACE/hgeometry | |
cabal -vnormal check | |
- name: haddock | |
run: | | |
cabal haddock all |