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 }}
52 SUBDIR: ${{ matrix.subdir }}
54 runs-on: ${{ matrix.runner }}
55 continue-on-error: ${{ matrix.ignore_error }}
59 # The order is important to optimize fail-fast.
65 # Note: if cabal.project is not specified benchmarks and tests won't
66 # run. But we need at least one test where we test without
67 # cabal.project because that is how hackage would build it.
73 cabal_version: 3.8.1.0
74 cabal_project: cabal.project.ghc-head
75 disable_sdist_build: "y"
81 cabal_version: 3.10.1.0
82 disable_sdist_build: "y"
83 cabal_project: cabal.project
89 cabal_version: 3.8.1.0
90 disable_sdist_build: "y"
91 cabal_project: cabal.project.Werror
93 - name: 9.4.4-fusion-inspection
97 cabal_version: 3.8.1.0
98 disable_sdist_build: "y"
99 cabal_project: cabal.project
100 cabal_build_options: "--flag fusion-plugin --flag inspection"
104 runner: ubuntu-latest
106 cabal_project: cabal.project
107 cabal_version: 3.6.2.0
108 disable_sdist_build: "y"
110 - name: 9.2.7-docspec
112 runner: ubuntu-latest
114 cabal_version: 3.6.2.0
115 cabal_project: cabal.project
116 disable_sdist_build: "y"
118 - name: 9.0.2-streamly-sdist
120 runner: ubuntu-latest
122 cabal_version: 3.6.2.0
123 cabal_project: cabal.project.streamly
125 - name: 9.0.2-streamly-core-sdist
127 runner: ubuntu-latest
129 cabal_version: 3.6.2.0
132 - name: 8.10.7-streamly-sdist-stack
133 runner: ubuntu-latest
136 stack_yaml: stack.yaml
137 sdist_options: "--ignore-check"
138 stack_build_options: "--flag streamly-benchmarks:-opt"
139 cabal_version: 3.6.2.0
145 cabal_version: 3.6.2.0
146 cabal_project: cabal.project
147 disable_sdist_build: "y"
149 # - name: 8.10.7-coverage
150 # ghc_version: 8.10.7
151 # runner: ubuntu-latest
153 # cabal_version: 3.6.2.0
154 # ignore_error: false
157 runner: ubuntu-latest
159 cabal_version: 3.6.2.0
160 cabal_project: cabal.project
161 disable_sdist_build: "y"
163 - name: 8.6.5-no-fusion-unoptimized
165 runner: ubuntu-latest
167 cabal_version: 3.6.2.0
168 cabal_project: cabal.project
169 cabal_build_options: "--flag no-fusion --flag -opt"
170 disable_sdist_build: "y"
172 - name: 8.6.5-debug-unoptimized
174 runner: ubuntu-latest
176 cabal_version: 3.6.2.0
177 cabal_project: cabal.project
178 cabal_build_options: "--flag debug --flag -opt"
179 disable_sdist_build: "y"
183 - uses: actions/checkout@v2
185 - uses: actions/cache@v1
189 # Bump the key version to clear the cache
190 key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal-v2
192 - name: Download packcheck
194 # Get packcheck if needed
196 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
197 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
198 chmod +x $PACKCHECK_LOCAL_PATH
202 "Linux x86_64") GHCUP_ARCH="x86_64-linux" ;;
203 "Darwin x86_64") GHCUP_ARCH="x86_64-apple-darwin" ;;
204 *) echo "Unknown OS/Arch: $os"; exit 1;;
207 # Check available versions here: https://downloads.haskell.org/~ghcup/
209 $CURL -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/${GHCUP_ARCH}-ghcup-$GHCUP_VER
211 if test "$GHCVER" = "head"
213 # The URL may change, to find a working URL go to https://gitlab.haskell.org/ghc/ghc/-/jobs/
214 # Find a debian10 job, click on a passed/failed job, at the
215 # end of the output you will find the tar.xz name, put that after
216 # "raw/", and put the job name after "job=".
217 # Also see https://github.com/mpickering/ghc-artefact-nix/blob/master/gitlab-artifact.nix
218 ./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
220 ./ghcup install ghc $GHCVER
222 ./ghcup install cabal $CABALVER
223 ./ghcup set ghc $GHCVER
224 ./ghcup set cabal $CABALVER
228 if test -n "$DOCTEST"
230 mkdir -p $HOME/.cabal/bin
231 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
232 echo '0829bd034fba901cbcfe491d98ed8b28fd54f9cb5c91fa8e1ac62dc4413c9562 cabal-docspec.xz' | sha256sum -c -
233 xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
234 rm -f cabal-docspec.xz
235 chmod a+x $HOME/.cabal/bin/cabal-docspec
237 cabal build --project-file cabal.project.doctest all
238 $HOME/.cabal/bin/cabal-docspec --version
239 $HOME/.cabal/bin/cabal-docspec --timeout 60 --check-properties --property-variables xs
240 elif test -n "$COVERAGE"
242 # Run tests with coverage
244 # Build hpc-coveralls if needed
245 sudo apt-get install -y libcurl4-gnutls-dev
246 export PATH=$HOME/.cabal/bin:$PATH
247 which hpc-coveralls 2>/dev/null || cabal install --project-file cabal.project.hpc-coveralls hpc-coveralls
248 # Run tests and upload results to coveralls.io
249 bin/test.sh --coverage --raw
250 # XXX Uncomment this and fix it properly later
251 # hpc-coveralls --repo-token="$COVERALLS_TOKEN" --coverage-mode=StrictlyFullLines
253 export TOOLS_DIR=/opt
254 # /usr/local/opt/curl/bin for macOS
255 export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin
258 mv "$PACKCHECK_LOCAL_PATH" "$SUBDIR/packcheck.sh"
259 # This is required as dist-newstyle will be created on the top level
260 # directory as it is considered the working dir.
264 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