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.10.1.0
74 cabal_project: cabal.project.ghc-head
75 disable_sdist_build: "y"
77 # Note: use linux for warning build for convenient dev testing
82 cabal_version: 3.10.1.0
83 disable_sdist_build: "y"
84 cabal_project: cabal.project.Werror
86 - name: 9.8.1-fusion-inspection
90 cabal_version: 3.10.1.0
91 disable_sdist_build: "y"
92 cabal_project: cabal.project
93 cabal_build_options: "--flag fusion-plugin --flag inspection"
99 cabal_version: 3.10.1.0
100 disable_sdist_build: "y"
101 cabal_project: cabal.project
105 runner: ubuntu-latest
107 cabal_version: 3.8.1.0
108 disable_sdist_build: "y"
109 cabal_project: cabal.project
113 runner: ubuntu-latest
115 cabal_project: cabal.project
116 cabal_version: 3.6.2.0
117 disable_sdist_build: "y"
119 - name: 9.2.8-docspec
121 runner: ubuntu-latest
123 cabal_version: 3.6.2.0
124 cabal_project: cabal.project
125 disable_sdist_build: "y"
127 - name: 9.0.2-streamly-sdist
129 runner: ubuntu-latest
131 cabal_version: 3.6.2.0
132 cabal_project: cabal.project.streamly
134 - name: 9.0.2-streamly-core-sdist
136 runner: ubuntu-latest
138 cabal_version: 3.6.2.0
141 - name: 8.10.7-streamly-sdist-stack
142 runner: ubuntu-latest
145 stack_yaml: stack.yaml
146 sdist_options: "--ignore-check"
147 stack_build_options: "--flag streamly-benchmarks:-opt"
148 cabal_version: 3.6.2.0
150 # - name: 8.10.7-coverage
151 # ghc_version: 8.10.7
152 # runner: ubuntu-latest
154 # cabal_version: 3.6.2.0
155 # ignore_error: false
158 runner: ubuntu-latest
160 cabal_version: 3.6.2.0
161 cabal_project: cabal.project
162 disable_sdist_build: "y"
164 - name: 8.6.5-debug-unoptimized
166 runner: ubuntu-latest
168 cabal_version: 3.6.2.0
169 cabal_project: cabal.project
170 cabal_build_options: "--flag debug --flag -opt"
171 disable_sdist_build: "y"
175 - uses: actions/checkout@v2
177 - uses: actions/cache@v1
181 # Bump the key version to clear the cache
182 key: ${{ runner.os }}-${{ matrix.ghc_version }}-cabal-v2
184 - name: Download packcheck
186 # Get packcheck if needed
188 PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
189 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
190 chmod +x $PACKCHECK_LOCAL_PATH
194 "Linux x86_64") GHCUP_ARCH="x86_64-linux" ;;
195 "Darwin x86_64") GHCUP_ARCH="x86_64-apple-darwin" ;;
196 *) echo "Unknown OS/Arch: $os"; exit 1;;
199 # Check available versions here: https://downloads.haskell.org/~ghcup/
201 $CURL -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/${GHCUP_ARCH}-ghcup-$GHCUP_VER
203 if test "$GHCVER" = "head"
205 # The URL may change, to find a working URL go to https://gitlab.haskell.org/ghc/ghc/-/jobs/
206 # Find a debian10 job, click on a passed/failed job, at the
207 # end of the output you will find the tar.xz name, put that after
208 # "raw/", and put the job name after "job=".
209 # Also see https://github.com/mpickering/ghc-artefact-nix/blob/master/gitlab-artifact.nix
210 ./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
212 ./ghcup install ghc $GHCVER
214 ./ghcup install cabal $CABALVER
215 ./ghcup set ghc $GHCVER
216 ./ghcup set cabal $CABALVER
220 if test -n "$DOCTEST"
222 mkdir -p $HOME/.cabal/bin
223 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
224 echo '0829bd034fba901cbcfe491d98ed8b28fd54f9cb5c91fa8e1ac62dc4413c9562 cabal-docspec.xz' | sha256sum -c -
225 xz -d < cabal-docspec.xz > $HOME/.cabal/bin/cabal-docspec
226 rm -f cabal-docspec.xz
227 chmod a+x $HOME/.cabal/bin/cabal-docspec
229 cabal build --project-file cabal.project.doctest all
230 $HOME/.cabal/bin/cabal-docspec --version
231 $HOME/.cabal/bin/cabal-docspec --timeout 60 --check-properties --property-variables xs
232 elif test -n "$COVERAGE"
234 # Run tests with coverage
236 # Build hpc-coveralls if needed
237 sudo apt-get install -y libcurl4-gnutls-dev
238 export PATH=$HOME/.cabal/bin:$PATH
239 which hpc-coveralls 2>/dev/null || cabal install --project-file cabal.project.hpc-coveralls hpc-coveralls
240 # Run tests and upload results to coveralls.io
241 bin/test.sh --coverage --raw
242 # XXX Uncomment this and fix it properly later
243 # hpc-coveralls --repo-token="$COVERALLS_TOKEN" --coverage-mode=StrictlyFullLines
245 export TOOLS_DIR=/opt
246 # /usr/local/opt/curl/bin for macOS
247 export PATH=$HOME/.local/bin:$HOME/.ghcup/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/opt/curl/bin
250 mv "$PACKCHECK_LOCAL_PATH" "$SUBDIR/packcheck.sh"
251 # This is required as dist-newstyle will be created on the top level
252 # directory as it is considered the working dir.
256 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