on 354f337 help sign in
88 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: "c022dc444757aa89dd85eba4b1ad3714897d6ea2"
28 BUILD: ${{ matrix.build }}
29 GHCVER: ${{ matrix.ghc_version }}
30 CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }}
31 CABAL_PROJECT: ${{ matrix.cabal_project }}
32 DISABLE_DOCS: ${{ matrix.disable_docs }}
34 runs-on: ubuntu-latest
35 strategy:
36 fail-fast: false
37 matrix:
38 name: [8.8.3+inspection+Werror, 8.6.5+streamk, 8.6.5+fusion-plugin, 8.4.4+debug]
39 cabal_version: ["3.2"]
40 include:
41 - name: 8.8.3+inspection+Werror
42 ghc_version: 8.8.3
43 build: cabal-v2
44 cabal_project: cabal.project.ci
45 - name: 8.6.5+streamk
46 ghc_version: 8.6.5
47 build: cabal-v2
48 cabal_build_options: "--flags streamk"
49 - name: 8.6.5+fusion-plugin
50 ghc_version: 8.6.5
51 build: cabal-v2
52 cabal_build_options: "--flags fusion-plugin"
53 # haddock generation does not work with 8.6.5+fusion-plugin
54 disable_docs: "y"
55 - name: 8.4.4+debug
56 ghc_version: 8.4.4
57 build: cabal-v2
58 cabal_build_options: "--flag debug"
60 steps:
61 - uses: actions/checkout@v2
63 - uses: actions/setup-haskell@v1
64 with:
65 ghc-version: ${{ matrix.ghc_version }}
66 cabal-version: ${{ matrix.cabal_version }}
68 - uses: actions/cache@v1
69 name: Cache ~/.cabal
70 with:
71 path: ~/.cabal
72 key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal
74 - name: Download packcheck
75 run: |
76 # If a custom stack-yaml is specified, replace the default with that
77 if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
78 unset STACK_YAML
80 # Get packcheck if needed
81 CURL=$(which curl)
82 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
83 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
84 chmod +x $PACKCHECK_LOCAL_PATH
86 - name: Run packcheck
87 run: |
88 bash -c "$PACKCHECK_LOCAL_PATH $BUILD"