name: Haskell CI on: push: branches: - master pull_request: jobs: build: name: GHC ${{ matrix.name }} env: CABAL_REINIT_CONFIG: y LC_ALL: C.UTF-8 ENABLE_INSTALL: "n" STACK_UPGRADE: "y" CABAL_CHECK_RELAX: y CABAL_NO_SANDBOX: y CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com PACKCHECK_LOCAL_PATH: "./packcheck.sh" PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck" PACKCHECK_GITHUB_COMMIT: "563702bd02c41343dcd3dfcfef0845ca428a9240" BUILD: ${{ matrix.build }} GHCVER: ${{ matrix.ghc_version }} CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} CABAL_PROJECT: ${{ matrix.cabal_project }} DISABLE_DOCS: ${{ matrix.disable_docs }} DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }} runs-on: ${{ matrix.runner }} strategy: fail-fast: false matrix: name: [8.10.2+macOS, 8.8.3+inspection+fusion-plugin+Werror, 8.6.5+fusion-plugin, 8.6.5+streamk, 8.4.4+debug] cabal_version: ["3.2"] include: - name: 8.10.2+macOS ghc_version: 8.10.2 build: cabal-v2 disable_sdist_build: "y" runner: macos-latest - name: 8.8.3+inspection+fusion-plugin+Werror ghc_version: 8.8.3 build: cabal-v2 cabal_project: cabal.project.ci runner: ubuntu-latest - name: 8.6.5+streamk ghc_version: 8.6.5 build: cabal-v2 cabal_build_options: "--flag streamk --flag -opt" runner: ubuntu-latest - name: 8.6.5+fusion-plugin ghc_version: 8.6.5 build: cabal-v2 cabal_build_options: "--flag fusion-plugin" # haddock generation does not work with 8.6.5+fusion-plugin disable_docs: "y" runner: ubuntu-latest - name: 8.4.4+debug ghc_version: 8.4.4 build: cabal-v2 cabal_build_options: "--flag debug --flag -opt" runner: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: haskell/actions/setup@v1 with: ghc-version: ${{ matrix.ghc_version }} cabal-version: ${{ matrix.cabal_version }} - uses: actions/cache@v1 name: Cache ~/.cabal with: path: ~/.cabal key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal - name: Download packcheck run: | # If a custom stack-yaml is specified, replace the default with that if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi unset STACK_YAML # Get packcheck if needed CURL=$(which curl) PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi; chmod +x $PACKCHECK_LOCAL_PATH - name: Run packcheck run: | bash -c "$PACKCHECK_LOCAL_PATH $BUILD"