Skip to content

Update tested upper bounds #225

Update tested upper bounds

Update tested upper bounds #225

Workflow file for this run

name: CI
on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
permissions:
contents: read
jobs:
test-ghc-os:
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ghc:
- "8.8.4"
- "8.10.7"
- "9.0.2"
- "9.2.8"
- "9.4.8"
- "9.6.6"
- "9.8.2"
- "9.10.1"
steps:
- name: "checkout"
uses: actions/checkout@v4
- name: "setup Haskell"
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: latest
cabal-update: false
enable-stack: true
stack-version: latest
- name: "update Cabal"
run: cabal update
- name: "setup environment"
run: |
GHC_VERSION=$(ghc --numeric-version)
CABAL_OPTS=""
if [ -f "cabal-${GHC_VERSION}.project" ] ; then
CABAL_OPTS="--project-file=cabal-${GHC_VERSION}.project"
fi
echo "CABAL_OPTS=${CABAL_OPTS}" | tee -a "${GITHUB_ENV}"
STACK_YAML="stack-${GHC_VERSION}.yaml"
echo "STACK_YAML=${STACK_YAML}" | tee -a "${GITHUB_ENV}"
TS_YYYYMM="$(date +%Y%m)"
echo "TS_YYYYMM=${TS_YYYYMM}" | tee -a "${GITHUB_ENV}"
- name: "cabal: configure build"
run: |
cabal configure $CABAL_OPTS --enable-tests --enable-benchmarks --disable-documentation
cabal build all --dry-run $CABAL_OPTS
- name: "cabal: restore cache"
uses: actions/cache/restore@v4
id: cache-cabal
env:
key: ${{ runner.os }}-${{ env.TS_YYYYMM }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-
- if: ${{ !steps.cache-cabal.outputs.cache-hit }}
name: "cabal: install dependencies"
run: cabal build all $CABAL_OPTS --only-dependencies
- if: ${{ !steps.cache-cabal.outputs.cache-hit }}
name: "cabal: save cache"
uses: actions/cache/save@v4
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache-cabal.outputs.cache-primary-key }}
- name: "cabal: ttc: build"
run: cabal build ttc $CABAL_OPTS
- name: "cabal: ttc: test"
run: cabal test ttc $CABAL_OPTS
- name: "cabal: ttc: haddock"
run: cabal haddock ttc $CABAL_OPTS
- name: "cabal: ttc: examples"
run: cabal build ttc-examples $CABAL_OPTS
- if: matrix.ghc == '8.8.4'
name: "ttc lower bounds: setup environment"
run: |
cabal clean
rm -rf ~/.cabal/store
CABAL_OPTS="--project-file=cabal-ttc-bounds-lower.project"
echo "CABAL_OPTS=${CABAL_OPTS}" | tee -a "${GITHUB_ENV}"
- if: matrix.ghc == '8.8.4'
name: "ttc lower bounds: configure build"
run: |
cabal configure $CABAL_OPTS --enable-tests --enable-benchmarks --disable-documentation
cabal build ttc ttc-examples --dry-run $CABAL_OPTS
- if: matrix.ghc == '8.8.4'
name: "ttc lower bounds: restore cache"
uses: actions/cache/restore@v4
id: cache-ttc-bounds-lower
env:
key: ${{ runner.os }}-${{ env.TS_YYYYMM }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}-ttc-bounds-lower
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-
- if: ${{ matrix.ghc == '8.8.4' && !steps.cache-ttc-bounds-lower.outputs.cache-hit }}
name: "ttc lower bounds: install dependencies"
run: cabal build ttc ttc-examples $CABAL_OPTS --only-dependencies
- if: ${{ matrix.ghc == '8.8.4' && !steps.cache-ttc-bounds-lower.outputs.cache-hit }}
name: "ttc lower bounds: save cache"
uses: actions/cache/save@v4
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache-ttc-bounds-lower.outputs.cache-primary-key }}
- if: matrix.ghc == '8.8.4'
name: "ttc lower bounds: build"
run: cabal build ttc $CABAL_OPTS
- if: matrix.ghc == '8.8.4'
name: "ttc lower bounds: test"
run: cabal test ttc $CABAL_OPTS
- if: matrix.ghc == '8.8.4'
name: "ttc lower bounds: haddock"
run: cabal haddock ttc $CABAL_OPTS
- if: matrix.ghc == '8.8.4'
name: "ttc lower bounds: examples"
run: cabal build ttc-examples $CABAL_OPTS
- if: matrix.ghc == '9.10.1'
name: "ttc upper bounds: setup environment"
run: |
cabal clean
rm -rf ~/.cabal/store
CABAL_OPTS="--project-file=cabal-ttc-bounds-upper.project"
echo "CABAL_OPTS=${CABAL_OPTS}" | tee -a "${GITHUB_ENV}"
- if: matrix.ghc == '9.10.1'
name: "ttc upper bounds: configure build"
run: |
cabal configure $CABAL_OPTS --enable-tests --enable-benchmarks --disable-documentation
cabal build ttc ttc-examples --dry-run $CABAL_OPTS
- if: matrix.ghc == '9.10.1'
name: "ttc upper bounds: restore cache"
uses: actions/cache/restore@v4
id: cache-ttc-bounds-upper
env:
key: ${{ runner.os }}-${{ env.TS_YYYYMM }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}-ttc-bounds-upper
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-
- if: ${{ matrix.ghc == '9.10.1' && !steps.cache-ttc-bounds-upper.outputs.cache-hit }}
name: "ttc upper bounds: install dependencies"
run: cabal build ttc ttc-examples $CABAL_OPTS --only-dependencies
- if: ${{ matrix.ghc == '9.10.1' && !steps.cache-ttc-bounds-upper.outputs.cache-hit }}
name: "ttc upper bounds: save cache"
uses: actions/cache/save@v4
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache-ttc-bounds-upper.outputs.cache-primary-key }}
- if: matrix.ghc == '9.10.1'
name: "ttc upper bounds: build"
run: cabal build ttc $CABAL_OPTS
- if: matrix.ghc == '9.10.1'
name: "ttc upper bounds: test"
run: cabal test ttc $CABAL_OPTS
- if: matrix.ghc == '9.10.1'
name: "ttc upper bounds: haddock"
run: cabal haddock ttc $CABAL_OPTS
- if: matrix.ghc == '9.10.1'
name: "ttc upper bounds: examples"
run: cabal build ttc-examples $CABAL_OPTS
- name: "stack: configure build"
run: stack --system-ghc ls dependencies json > stack-deps.json
- name: "stack: restore cache"
uses: actions/cache/restore@v4
id: cache-stack
env:
key: ${{ runner.os }}-${{ env.TS_YYYYMM }}-ghc-${{ steps.setup.outputs.ghc-version }}-stack
with:
path: ~/.stack
key: ${{ env.key }}-${{ hashFiles('stack-deps.json') }}
restore-keys: ${{ env.key }}-
- name: "stack: ttc: build"
run: stack build ttc --system-ghc --test --bench --no-run-tests --no-run-benchmarks
- name: "stack: ttc: test"
run: stack test ttc --system-ghc
- name: "stack: ttc: haddock"
run: stack haddock ttc --system-ghc
- name: "stack: ttc: examples"
run: stack build ttc-examples --system-ghc
- if: ${{ !steps.cache-stack.outputs.cache-hit }}
name: "stack: save cache"
uses: actions/cache/save@v4
with:
path: ~/.stack
key: ${{ steps.cache-stack.outputs.cache-primary-key }}
test-ghc884-cabal3000:
name: Cabal ${{ matrix.cabal }} (GHC ${{ matrix.ghc }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
ghc:
- "8.8.4"
cabal:
- "3.0.0.0"
steps:
- name: "checkout"
uses: actions/checkout@v4
- name: "setup Haskell"
uses: haskell-actions/setup@v2
id: setup
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
cabal-update: true
- name: "setup environment"
run: |
GHC_VERSION=$(ghc --numeric-version)
CABAL_OPTS=""
if [ -f "cabal-${GHC_VERSION}.project" ] ; then
CABAL_OPTS="--project-file=cabal-${GHC_VERSION}.project"
fi
echo "CABAL_OPTS=${CABAL_OPTS}" | tee -a "${GITHUB_ENV}"
TS_YYYYMM="$(date +%Y%m)"
echo "TS_YYYYMM=${TS_YYYYMM}" | tee -a "${GITHUB_ENV}"
- name: "configure build"
run: |
cabal v2-configure $CABAL_OPTS --enable-tests --enable-benchmarks --disable-documentation
cabal v2-build all --dry-run $CABAL_OPTS
- name: "restore cache"
uses: actions/cache/restore@v4
id: cache-cabal
env:
key: ${{ runner.os }}-${{ env.TS_YYYYMM }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }}
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ env.key }}-${{ hashFiles('**/plan.json') }}
restore-keys: ${{ env.key }}-
- if: ${{ !steps.cache-cabal.outputs.cache-hit }}
name: "install dependencies"
run: cabal v2-build all $CABAL_OPTS --only-dependencies
- if: ${{ !steps.cache-cabal.outputs.cache-hit }}
name: "save cache"
uses: actions/cache/save@v4
with:
path: ${{ steps.setup.outputs.cabal-store }}
key: ${{ steps.cache-cabal.outputs.cache-primary-key }}
- name: "ttc: build"
run: cabal v2-build ttc $CABAL_OPTS
- name: "ttc: test"
run: cabal v2-test ttc $CABAL_OPTS
- name: "ttc: haddock"
run: cabal v2-haddock ttc $CABAL_OPTS
- name: "ttc: examples"
run: cabal v2-build ttc-examples $CABAL_OPTS