on 796bb22 help sign in
124 lines 4.3 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 RESOLVER: ${{ matrix.resolver }}
31 CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} --flag limit-build-mem
32 CABAL_BUILD_TARGETS: ${{ matrix.cabal_build_targets }}
33 CABAL_PROJECT: ${{ matrix.cabal_project }}
34 STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }}
35 DISABLE_DOCS: ${{ matrix.disable_docs }}
36 SDIST_OPTIONS: ${{ matrix.sdist_options }}
37 DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
38 DISABLE_DIST_CHECKS: ${{ matrix.disable_dist_checks }}
40 runs-on: ${{ matrix.runner }}
41 strategy:
42 fail-fast: false
43 matrix:
44 name: [8.10.2+macOS, 8.8.3+inspection+fusion-plugin+Werror, 8.8+stack+lts-16.2, 8.6.5+fusion-plugin, 8.6.5+streamk, 8.4.4+debug, doctests]
45 cabal_version: ["3.2"]
46 include:
47 #- name: 9.0.1+no-bench
48 # ghc_version: 9.0.1
49 # build: cabal-v2
50 # cabal_build_options: "--allow-newer=hsc2hs"
51 # cabal_build_targets: "streamly streamly-tests"
52 # disable_sdist_build: "y"
53 # runner: ubuntu-latest
54 - name: 8.10.2+macOS
55 ghc_version: 8.10.2
56 build: cabal-v2
57 disable_sdist_build: "y"
58 runner: macos-latest
59 - name: 8.8.3+inspection+fusion-plugin+Werror
60 ghc_version: 8.8.3
61 build: cabal-v2
62 cabal_project: cabal.project.ci
63 cabal_build_options: "--flag fusion-plugin --flag inspection"
64 runner: ubuntu-latest
65 - name: 8.8+stack+lts-16.2
66 build: stack
67 resolver: lts-16.12
68 sdist_options: "--ignore-check"
69 stack_build_options: "--flag streamly-benchmarks:-opt"
70 runner: ubuntu-latest
71 - name: 8.6.5+streamk
72 ghc_version: 8.6.5
73 build: cabal-v2
74 cabal_build_options: "--flag streamk --flag -opt"
75 runner: ubuntu-latest
76 - name: 8.6.5+fusion-plugin
77 ghc_version: 8.6.5
78 build: cabal-v2
79 cabal_build_options: "--flag fusion-plugin"
80 # haddock generation does not work with 8.6.5+fusion-plugin
81 disable_docs: "y"
82 runner: ubuntu-latest
83 - name: 8.4.4+debug
84 ghc_version: 8.4.4
85 build: cabal-v2
86 cabal_build_options: "--flag debug --flag -opt"
87 runner: ubuntu-latest
88 - name: doctests
89 ghc_version: 8.8.3
90 build: cabal-v2
91 cabal_build_options: "--flag doctests"
92 disable_dist_checks: "y"
93 cabal_build_targets: doctests
94 runner: ubuntu-latest
96 steps:
97 - uses: actions/checkout@v2
99 - uses: haskell/actions/setup@v1
100 with:
101 ghc-version: ${{ matrix.ghc_version }}
102 cabal-version: ${{ matrix.cabal_version }}
104 - uses: actions/cache@v1
105 name: Cache ~/.cabal
106 with:
107 path: ~/.cabal
108 key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal
110 - name: Download packcheck
111 run: |
112 # If a custom stack-yaml is specified, replace the default with that
113 if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
114 unset STACK_YAML
116 # Get packcheck if needed
117 CURL=$(which curl)
118 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
119 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
120 chmod +x $PACKCHECK_LOCAL_PATH
122 - name: Run packcheck
123 run: |
124 bash -c "$PACKCHECK_LOCAL_PATH $BUILD"