11 name: GHC ${{matrix.name}}
13 # packcheck environment variables
15 BUILD: ${{ matrix.build }}
16 GHCVER: ${{ matrix.ghc_version }}
17 CABALVER: ${{ matrix.cabal_version }}
18 DISABLE_DOCS: ${{ matrix.disable_docs }}
19 DISABLE_TEST: ${{ matrix.disable_test }}
20 DISABLE_BENCH: ${{ matrix.disable_bench }}
21 DISABLE_DIST_CHECKS: ${{ matrix.disable_dist_checks }}
22 SDIST_OPTIONS: ${{ matrix.sdist_options }}
23 DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
26 CABAL_REINIT_CONFIG: y
27 # Github has machines with 2 CPUS and 6GB memory so the cabal jobs
28 # default (ncpus) is good, this can be checked from the packcheck
29 # output in case it changes.
30 CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }} --flag limit-build-mem
31 CABAL_BUILD_TARGETS: ${{ matrix.cabal_build_targets }}
32 CABAL_PROJECT: ${{ matrix.cabal_project }}
37 RESOLVER: ${{ matrix.resolver }}
38 STACK_YAML: ${{ matrix.stack_yaml }}
39 STACK_BUILD_OPTIONS: ${{ matrix.stack_build_options }}
41 # packcheck location and revision
42 PACKCHECK_LOCAL_PATH: "./packcheck.sh"
43 PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
44 PACKCHECK_GITHUB_COMMIT: "a302772c8f3791c477edd1764b82f8d1f5b22fdf"
46 # Pull token from "secrets" setting of the github repo
47 COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
48 COVERAGE: ${{ matrix.coverage }}
49 DOCTEST: ${{ matrix.doctest }}
51 runs-on: ${{ matrix.runner }}
52 continue-on-error: ${{ matrix.ignore_error }}
56 # The order is important to optimize fail-fast.
62 # Note: if cabal.project is not specified benchmarks and tests won't
63 # run. But we need at least one test where we test without
64 # cabal.project because that is how hackage would build it.
70 cabal_version: 3.8.1.0
71 cabal_project: cabal.project.ghc-head
72 disable_sdist_build: "y"
74 - name: 9.4.2-fusion-inspection
78 cabal_version: 3.8.1.0
79 disable_sdist_build: "y"
80 cabal_project: cabal.project
81 cabal_build_options: "--flag fusion-plugin --flag inspection"
87 cabal_project: cabal.project
88 cabal_version: 3.6.2.0
89 disable_sdist_build: "y"
95 cabal_version: 3.6.2.0
96 cabal_project: cabal.project
97 disable_sdist_build: "y"
99 - name: 9.0.2-streamly-sdist
101 runner: ubuntu-latest
103 cabal_version: 3.6.2.0
104 cabal_project: cabal.project.streamly
106 - name: 8.10.7-streamly-sdist-stack
107 runner: ubuntu-latest
110 stack_yaml: stack.yaml
111 sdist_options: "--ignore-check"
112 stack_build_options: "--flag streamly-benchmarks:-opt"
113 cabal_version: 3.6.2.0
119 cabal_version: 3.6.2.0
120 cabal_project: cabal.project
121 disable_sdist_build: "y"
123 # - name: 8.10.7-coverage
124 # ghc_version: 8.10.7
125 # runner: ubuntu-latest
127 # cabal_version: 3.6.2.0
128 # ignore_error: false
129 - name: 8.10.7-Werror
131 runner: ubuntu-latest
133 cabal_version: 3.6.2.0
134 cabal_project: cabal.project.Werror
135 disable_sdist_build: "y"
139 runner: ubuntu-latest
141 cabal_version: 3.6.2.0
142 cabal_project: cabal.project
143 disable_sdist_build: "y"
145 - name: 8.6.5-no-fusion-unoptimized
147 runner: ubuntu-latest
149 cabal_version: 3.6.2.0
150 cabal_project: cabal.project
151 cabal_build_options: "--flag no-fusion --flag -opt"
152 disable_sdist_build: "y"
154 - name: 8.6.5-debug-unoptimized
156 runner: ubuntu-latest
158 cabal_version: 3.6.2.0
159 cabal_project: cabal.project
160 cabal_build_options: "--flag debug --flag -opt"
161 disable_sdist_build: "y"
165 - uses: actions/checkout@v2
167 - uses: actions/cache@v1
171 # Bump the key version to clear the cache
172 key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal-v2
174 - name: Download packcheck
176 # Get packcheck if needed
178 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
179 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
180 chmod +x $PACKCHECK_LOCAL_PATH
184 "Linux x86_64") GHCUP_ARCH="x86_64-linux" ;;
185 "Darwin x86_64") GHCUP_ARCH="x86_64-apple-darwin" ;;
186 *) echo "Unknown OS/Arch: $os"; exit 1;;
189 # Check available versions here: https://downloads.haskell.org/~ghcup/
191 $CURL -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/${GHCUP_ARCH}-ghcup-$GHCUP_VER
193 if test "$GHCVER" = "head"
195 # The URL may change, to find a working URL go to https://gitlab.haskell.org/ghc/ghc/-/jobs/
196 # Find a debian10 job, click on a passed/failed job, at the
197 # end of the output you will find the tar.xz name, put that after
198 # "raw/", and put the job name after "job=".
199 # Also see https://github.com/mpickering/ghc-artefact-nix/blob/master/gitlab-artifact.nix
200 ./ghcup install ghc -u https://gitlab.haskell.org/ghc/ghc/-/jobs/artifacts/master/raw/ghc-x86_64-linux-deb10-int_native-validate.tar.xz?job=x86_64-linux-deb10-int_native-validate head
202 ./ghcup install ghc $GHCVER
204 ./ghcup install cabal $CABALVER
205 ./ghcup set ghc $GHCVER
206 ./ghcup set cabal $CABALVER
210 if test -n "$DOCTEST"
212 mkdir -p $HOME/.cabal/bin
213 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
214 echo '0829bd034fba901cbcfe491d98ed8b28fd54f9cb5c91fa8e1ac62dc4413c9562 cabal-docspec.xz' | sha256sum -c -
215 xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
216 rm -f cabal-docspec.xz
217 chmod a+x $HOME/.cabal/bin/cabal-docspec
219 cabal build --project-file cabal.project.doctest all
220 $HOME/.cabal/bin/cabal-docspec --version
221 $HOME/.cabal/bin/cabal-docspec --timeout 60 --check-properties --property-variables xs
222 elif test -n "$COVERAGE"
224 # Run tests with coverage
226 # Build hpc-coveralls if needed
227 sudo apt-get install -y libcurl4-gnutls-dev
228 export PATH=$HOME/.cabal/bin:$PATH
229 which hpc-coveralls 2>/dev/null || cabal install --project-file cabal.project.hpc-coveralls hpc-coveralls
230 # Run tests and upload results to coveralls.io
231 bin/test.sh --coverage --raw
232 # XXX Uncomment this and fix it properly later
233 # hpc-coveralls --repo-token="$COVERALLS_TOKEN" --coverage-mode=StrictlyFullLines
235 export TOOLS_DIR=/opt
236 # /usr/local/opt/curl/bin for macOS
237 export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin
238 bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
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