on 500d187 help sign in
87 lines 2.7 kB history raw
1name: Haskell CI
3on:
4 push:
5 branches:
6 - master
7 pull_request:
9jobs:
10 build:
11 name: GHC ${{ matrix.name }}
12 env:
13 CABAL_REINIT_CONFIG: y
14 LC_ALL: C.UTF-8
16 ENABLE_INSTALL: "n"
18 STACK_UPGRADE: "y"
20 CABAL_CHECK_RELAX: y
21 CABAL_NO_SANDBOX: y
22 CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com
24 PACKCHECK_LOCAL_PATH: "./packcheck.sh"
25 PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
26 PACKCHECK_GITHUB_COMMIT: "b8d39c9cf336e4627e12eb4b1f5827bb7b6afc91"
28 BUILD: ${{ matrix.build }}
29 GHCVER: ${{ matrix.ghc_version }}
30 CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }}
31 DISABLE_DOCS: ${{ matrix.disable_docs }}
33 runs-on: ubuntu-latest
34 strategy:
35 fail-fast: false
36 matrix:
37 name: [8.10.1+inspection+Werror, 8.8.3+inspection+Werror, 8.6.5+streamk, 8.6.5+fusion-plugin]
38 cabal_version: ["3.2"]
39 include:
40 - name: 8.10.1+inspection+Werror
41 ghc_version: 8.10.1
42 build: cabal-v2
43 cabal_build_options: "--project-file=cabal.project.ci"
44 - name: 8.8.3+inspection+Werror
45 ghc_version: 8.8.3
46 build: cabal-v2
47 cabal_build_options: "--project-file=cabal.project.ci"
48 - name: 8.6.5+streamk
49 ghc_version: 8.6.5
50 build: cabal-v2
51 cabal_build_options: "--flags streamk"
52 - name: 8.6.5+fusion-plugin
53 ghc_version: 8.6.5
54 build: cabal-v2
55 cabal_build_options: "--flags fusion-plugin"
56 # haddock generation does not work with 8.6.5+fusion-plugin
57 disable_docs: "y"
59 steps:
60 - uses: actions/checkout@v2
62 - uses: actions/setup-haskell@v1
63 with:
64 ghc-version: ${{ matrix.ghc_version }}
65 cabal-version: ${{ matrix.cabal_version }}
67 - uses: actions/cache@v1
68 name: Cache ~/.cabal
69 with:
70 path: ~/.cabal
71 key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal
73 - name: Download packcheck
74 run: |
75 # If a custom stack-yaml is specified, replace the default with that
76 if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
77 unset STACK_YAML
79 # Get packcheck if needed
80 CURL=$(which curl)
81 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
82 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
83 chmod +x $PACKCHECK_LOCAL_PATH
85 - name: Run packcheck
86 run: |
87 bash -c "$PACKCHECK_LOCAL_PATH $BUILD"