on c0ec60a help sign in
98 lines 3.1 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: "563702bd02c41343dcd3dfcfef0845ca428a9240"
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 }}
33 DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
35 runs-on: ${{ matrix.runner }}
36 strategy:
37 fail-fast: false
38 matrix:
39 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]
40 cabal_version: ["3.2"]
41 include:
42 - name: 8.10.2+macOS
43 ghc_version: 8.10.2
44 build: cabal-v2
45 disable_sdist_build: "y"
46 runner: macos-latest
47 - name: 8.8.3+inspection+fusion-plugin+Werror
48 ghc_version: 8.8.3
49 build: cabal-v2
50 cabal_project: cabal.project.ci
51 runner: ubuntu-latest
52 - name: 8.6.5+streamk
53 ghc_version: 8.6.5
54 build: cabal-v2
55 cabal_build_options: "--flag streamk --flag -opt"
56 runner: ubuntu-latest
57 - name: 8.6.5+fusion-plugin
58 ghc_version: 8.6.5
59 build: cabal-v2
60 cabal_build_options: "--flag fusion-plugin"
61 # haddock generation does not work with 8.6.5+fusion-plugin
62 disable_docs: "y"
63 runner: ubuntu-latest
64 - name: 8.4.4+debug
65 ghc_version: 8.4.4
66 build: cabal-v2
67 cabal_build_options: "--flag debug --flag -opt"
68 runner: ubuntu-latest
70 steps:
71 - uses: actions/checkout@v2
73 - uses: haskell/actions/setup@v1
74 with:
75 ghc-version: ${{ matrix.ghc_version }}
76 cabal-version: ${{ matrix.cabal_version }}
78 - uses: actions/cache@v1
79 name: Cache ~/.cabal
80 with:
81 path: ~/.cabal
82 key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal
84 - name: Download packcheck
85 run: |
86 # If a custom stack-yaml is specified, replace the default with that
87 if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
88 unset STACK_YAML
90 # Get packcheck if needed
91 CURL=$(which curl)
92 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
93 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
94 chmod +x $PACKCHECK_LOCAL_PATH
96 - name: Run packcheck
97 run: |
98 bash -c "$PACKCHECK_LOCAL_PATH $BUILD"