11 name: GHC ${{matrix.name}}
13 # packcheck environment variables
15 BUILD: ${{ matrix.build }}
16 GHCVER: ${{ matrix.ghc_version }}
17 DISABLE_DOCS: ${{ matrix.disable_docs }}
18 DISABLE_TEST: ${{ matrix.disable_test }}
19 DISABLE_BENCH: ${{ matrix.disable_bench }}
20 DISABLE_DIST_CHECKS: ${{ matrix.disable_dist_checks }}
21 SDIST_OPTIONS: ${{ matrix.sdist_options }}
22 DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
25 CABAL_REINIT_CONFIG: y
26 # Github has machines with 2 CPUS and 6GB memory so the cabal jobs
27 # default (ncpus) is good, this can be checked from the packcheck
28 # output in case it changes.
29 CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} --flag limit-build-mem
30 CABAL_BUILD_TARGETS: ${{ matrix.cabal_build_targets }}
31 CABAL_PROJECT: ${{ matrix.cabal_project }}
36 RESOLVER: ${{ matrix.resolver }}
37 STACK_YAML: ${{ matrix.stack_yaml }}
38 STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }}
40 # packcheck location and revision
41 PACKCHECK_LOCAL_PATH: "./packcheck.sh"
42 PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
43 PACKCHECK_GITHUB_COMMIT: "075e13ab716c67d2110db4905ae42b0280af046d"
45 # Pull token from "secrets" setting of the github repo
46 COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
47 COVERAGE: ${{ matrix.coverage }}
48 DOCTEST: ${{ matrix.doctest }}
50 runs-on: ${{ matrix.runner }}
51 continue-on-error: ${{ matrix.ignore_error }}
55 # The order is important to optimize fail-fast.
57 - 8.10.7-sdist-fusion-inspection-Werror
61 # Note: if cabal.project is not specified benchmarks and tests won't
62 # run. But we need at least one test where we test without
63 # cabal.project because that is how hackage would build it.
70 cabal_project: cabal.project.ghc-head
71 disable_sdist_build: "y"
77 cabal_project: cabal.project
79 disable_sdist_build: "y"
86 cabal_project: cabal.project
93 cabal_project: cabal.project
94 disable_sdist_build: "y"
96 - name: 8.10.7-sdist-stack
100 stack_yaml: stack.yaml
101 sdist_options: "--ignore-check"
102 stack_build_options: "--flag streamly-benchmarks:-opt"
110 cabal_project: cabal.project
111 disable_sdist_build: "y"
113 # - name: 8.10.7-coverage
114 # ghc_version: 8.10.7
115 # runner: ubuntu-latest
118 # ignore_error: false
119 - name: 8.10.7-sdist-fusion-inspection-Werror
121 runner: ubuntu-latest
124 cabal_project: cabal.project.Werror
125 cabal_build_options: "--flag fusion-plugin --flag inspection"
127 - name: 8.8.4-sdist-fusion
129 runner: ubuntu-latest
132 cabal_project: cabal.project
133 cabal_build_options: "--flag fusion-plugin"
135 - name: 8.6.5-sdist-streamk-unoptimized
137 runner: ubuntu-latest
140 cabal_project: cabal.project
141 cabal_build_options: "--flag streamk --flag -opt"
143 - name: 8.6.5-sdist-debug-unoptimized
145 runner: ubuntu-latest
148 cabal_project: cabal.project
149 cabal_build_options: "--flag debug --flag -opt"
153 runner: ubuntu-latest
156 cabal_project: cabal.project
160 - uses: actions/checkout@v2
162 - uses: actions/cache@v1
166 # Bump the key version to clear the cache
167 key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal-v1
169 - name: Download packcheck
171 # Get packcheck if needed
173 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
174 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
175 chmod +x $PACKCHECK_LOCAL_PATH
179 "Linux x86_64") GHCUP_ARCH="x86_64-linux" ;;
180 "Darwin x86_64") GHCUP_ARCH="x86_64-apple-darwin" ;;
181 *) echo "Unknown OS/Arch: $os"; exit 1;;
184 $CURL -sL -o ./ghcup https://downloads.haskell.org/~ghcup/0.1.17.4/${GHCUP_ARCH}-ghcup-0.1.17.4
186 if test "$GHCVER" = "head"
188 ./ghcup install ghc -u https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-deb10-linux-integer-simple.tar.xz?job=validate-x86_64-linux-deb10-integer-simple head
190 ./ghcup install ghc $GHCVER
192 ./ghcup set ghc $GHCVER
196 if test -n "$DOCTEST"
198 mkdir -p $HOME/.cabal/bin
199 curl -sL https://github.com/phadej/cabal-extras/releases/download/cabal-docspec-0.0.0.20210111/cabal-docspec-0.0.0.20210111.xz > cabal-docspec.xz
200 echo '0829bd034fba901cbcfe491d98ed8b28fd54f9cb5c91fa8e1ac62dc4413c9562 cabal-docspec.xz' | sha256sum -c -
201 xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
202 rm -f cabal-docspec.xz
203 chmod a+x $HOME/.cabal/bin/cabal-docspec
206 $HOME/.cabal/bin/cabal-docspec --version
207 $HOME/.cabal/bin/cabal-docspec --timeout 60 --check-properties --property-variables xs
208 elif test -z "$COVERAGE"
210 export TOOLS_DIR=/opt
211 # /usr/local/opt/curl/bin for macOS
212 export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin
213 bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
216 if test -n "$COVERAGE"
218 # Run tests with coverage
220 # Build hpc-coveralls if needed
221 sudo apt-get install -y libcurl4-gnutls-dev
222 export PATH=$HOME/.cabal/bin:$PATH
223 which hpc-coveralls 2>/dev/null || cabal install --project-file cabal.project.hpc-coveralls hpc-coveralls
224 # Run tests and upload results to coveralls.io
225 bin/test.sh --coverage --raw
226 # XXX Uncomment this and fix it properly later
227 # hpc-coveralls --repo-token="$COVERALLS_TOKEN" --coverage-mode=StrictlyFullLines
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list