diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 81af29c001856d47e8953943ae2accccdc1da50b..bc53a95dc02f27decbc8a34dd985d85fdded13ac 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -1,6 +1,6 @@ # This GitHub workflow config has been generated by a script via # -# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project' +# haskell-ci 'github' '--config=cabal.haskell-ci' 'cabal.project' '--doctest' # # To regenerate the script (for example after adjusting tested-with) run # @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.11.20210222 +# version: 0.13.20210525 # -# REGENDATA ("0.11.20210222",["github","--config=cabal.haskell-ci","cabal.project"]) +# REGENDATA ("0.13.20210525",["github","--config=cabal.haskell-ci","cabal.project","--doctest"]) # name: Haskell-CI on: @@ -22,39 +22,39 @@ on: - master jobs: linux: - name: Haskell-CI - Linux - GHC ${{ matrix.ghc }} + name: Haskell-CI - Linux - ${{ matrix.compiler }} runs-on: ubuntu-18.04 container: - image: buildpack-deps:bionic + image: buildpack-deps:xenial continue-on-error: ${{ matrix.allow-failure }} strategy: matrix: include: - - ghc: 9.0.1 + - compiler: ghc-9.0.1 allow-failure: false - - ghc: 8.10.4 + - compiler: ghc-8.10.4 allow-failure: false - - ghc: 8.8.4 + - compiler: ghc-8.8.4 allow-failure: false - - ghc: 8.6.5 + - compiler: ghc-8.6.5 allow-failure: false - - ghc: 8.4.4 + - compiler: ghc-8.4.4 allow-failure: false - - ghc: 8.2.2 + - compiler: ghc-8.2.2 allow-failure: false - - ghc: 8.0.2 + - compiler: ghc-8.0.2 allow-failure: false - - ghc: 7.10.3 + - compiler: ghc-7.10.3 allow-failure: false - - ghc: 7.8.4 + - compiler: ghc-7.8.4 allow-failure: false - - ghc: 7.6.3 + - compiler: ghc-7.6.3 allow-failure: false - - ghc: 7.4.2 + - compiler: ghc-7.4.2 allow-failure: false - - ghc: 7.2.2 + - compiler: ghc-7.2.2 allow-failure: false - - ghc: 7.0.4 + - compiler: ghc-7.0.4 allow-failure: false fail-fast: false steps: @@ -64,29 +64,31 @@ jobs: apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common apt-add-repository -y 'ppa:hvr/ghc' apt-get update - apt-get install -y ghc-$GHC_VERSION cabal-install-3.4 + apt-get install -y $CC cabal-install-3.4 env: - GHC_VERSION: ${{ matrix.ghc }} + CC: ${{ matrix.compiler }} - name: Set PATH and environment variables run: | echo "$HOME/.cabal/bin" >> $GITHUB_PATH echo "LANG=C.UTF-8" >> $GITHUB_ENV echo "CABAL_DIR=$HOME/.cabal" >> $GITHUB_ENV echo "CABAL_CONFIG=$HOME/.cabal/config" >> $GITHUB_ENV - HC=/opt/ghc/$GHC_VERSION/bin/ghc + HCDIR=$(echo "/opt/$CC" | sed 's/-/\//') + HCNAME=ghc + HC=$HCDIR/bin/$HCNAME echo "HC=$HC" >> $GITHUB_ENV - echo "HCPKG=/opt/ghc/$GHC_VERSION/bin/ghc-pkg" >> $GITHUB_ENV - echo "HADDOCK=/opt/ghc/$GHC_VERSION/bin/haddock" >> $GITHUB_ENV + echo "HCPKG=$HCDIR/bin/$HCNAME-pkg" >> $GITHUB_ENV + echo "HADDOCK=$HCDIR/bin/haddock" >> $GITHUB_ENV echo "CABAL=/opt/cabal/3.4/bin/cabal -vnormal+nowrap" >> $GITHUB_ENV HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') echo "HCNUMVER=$HCNUMVER" >> $GITHUB_ENV echo "ARG_TESTS=--enable-tests" >> $GITHUB_ENV if [ $((HCNUMVER >= 70600)) -ne 0 ] ; then echo "ARG_BENCH=--enable-benchmarks" >> $GITHUB_ENV ; else echo "ARG_BENCH=--disable-benchmarks" >> $GITHUB_ENV ; fi echo "HEADHACKAGE=false" >> $GITHUB_ENV - echo "ARG_COMPILER=--ghc --with-compiler=$HC" >> $GITHUB_ENV + echo "ARG_COMPILER=--$HCNAME --with-compiler=$HC" >> $GITHUB_ENV echo "GHCJSARITH=0" >> $GITHUB_ENV env: - GHC_VERSION: ${{ matrix.ghc }} + CC: ${{ matrix.compiler }} - name: env run: | env @@ -121,7 +123,7 @@ jobs: - name: cache (tools) uses: actions/cache@v2.1.5 with: - key: ${{ runner.os }}-${{ matrix.ghc }}-tools-2f29a7e3 + key: ${{ runner.os }}-${{ matrix.compiler }}-tools-8139d618 path: ~/.haskell-ci-tools - name: install cabal-plan run: | @@ -175,9 +177,9 @@ jobs: - name: cache uses: actions/cache@v2.1.5 with: - key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }} + key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} path: ~/.cabal/store - restore-keys: ${{ runner.os }}-${{ matrix.ghc }}- + restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- - name: build w/o tests run: | $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all