Skip to content

Updated README.md file #19

Updated README.md file

Updated README.md file #19

Workflow file for this run

name: Haskell CI
on:
pull_request:
push:
branches: ['master']
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.0.2", "9.2.8", "9.4.5", "9.6.2"]
os: [ubuntu-latest]
steps:
- name: Install Haskell
uses: haskell/actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 3.8.1.0
- name: Select build directory
run: |
if [ "$RUNNER_OS" == Windows ]; then
CABAL_BUILDDIR="D:\\a\\_temp\\dist"
else
CABAL_BUILDDIR="dist-newstyle"
fi
echo "CABAL_BUILDDIR=$CABAL_BUILDDIR"
echo "CABAL_BUILDDIR=$CABAL_BUILDDIR" >> $GITHUB_ENV
- name: Set cache version
run: echo "CACHE_VERSION=9w76Z3Q" >> $GITHUB_ENV
- name: Set up temp directory
env:
RUNNER_TEMP: ${{ runner.temp }}
run: |
echo "TMPDIR=$RUNNER_TEMP" >> $GITHUB_ENV
echo "TMP=$RUNNER_TEMP" >> $GITHUB_ENV
- uses: actions/checkout@v3
- name: Record dependencies
id: record-deps
run: |
cabal build all --dry-run
cat dist-newstyle/cache/plan.json | jq -r '."install-plan"[].id' | sort | uniq > dependencies.txt
- name: Cache `cabal store`
uses: actions/cache@v3
with:
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: cabal-store-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('dependencies.txt') }}
restore-keys: cabal-store-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}
- name: Cache `dist-newstyle`
uses: actions/cache@v3
with:
path: |
dist-newstyle
!dist-newstyle/**/.git
key: cache-dist-${{ env.CACHE_VERSION }}-${{ runner.os }}-${{ matrix.ghc }}
- name: Use cabal.project.local
run: |
cat .github/workflows/cabal.project.local >> ./cabal.project.local
cat ./cabal.project.local
- name: Build dependencies
run: cabal --builddir="$CABAL_BUILDDIR" build --only-dependencies all
- name: Build projects [build]
run: cabal --builddir="$CABAL_BUILDDIR" build all
- name: Run tests
run: cabal --builddir="$CABAL_BUILDDIR" run free-algebras:test-free-algebras