Skip to content

Commit 39fecd0

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix-order-of-promoted-type-tuples
2 parents 9997474 + fb660a1 commit 39fecd0

File tree

17 files changed

+394
-417
lines changed

17 files changed

+394
-417
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
# This GitHub workflow config has been generated by a script via
2+
#
3+
# haskell-ci 'github' 'haskell-src-meta/haskell-src-meta.cabal'
4+
#
5+
# To regenerate the script (for example after adjusting tested-with) run
6+
#
7+
# haskell-ci regenerate
8+
#
9+
# For more information, see https://github.com/haskell-CI/haskell-ci
10+
#
11+
# version: 0.14.1
12+
#
13+
# REGENDATA ("0.14.1",["github","haskell-src-meta/haskell-src-meta.cabal"])
14+
#
15+
name: Haskell-CI
16+
on:
17+
- push
18+
- pull_request
19+
jobs:
20+
linux:
21+
name: Haskell-CI - Linux - ${{ matrix.compiler }}
22+
runs-on: ubuntu-18.04
23+
timeout-minutes:
24+
60
25+
container:
26+
image: buildpack-deps:bionic
27+
continue-on-error: ${{ matrix.allow-failure }}
28+
strategy:
29+
matrix:
30+
include:
31+
- compiler: ghc-9.2.1
32+
compilerKind: ghc
33+
compilerVersion: 9.2.1
34+
setup-method: ghcup
35+
allow-failure: false
36+
- compiler: ghc-9.0.2
37+
compilerKind: ghc
38+
compilerVersion: 9.0.2
39+
setup-method: ghcup
40+
allow-failure: false
41+
- compiler: ghc-8.10.7
42+
compilerKind: ghc
43+
compilerVersion: 8.10.7
44+
setup-method: ghcup
45+
allow-failure: false
46+
- compiler: ghc-8.8.4
47+
compilerKind: ghc
48+
compilerVersion: 8.8.4
49+
setup-method: hvr-ppa
50+
allow-failure: false
51+
- compiler: ghc-8.6.5
52+
compilerKind: ghc
53+
compilerVersion: 8.6.5
54+
setup-method: hvr-ppa
55+
allow-failure: false
56+
- compiler: ghc-8.4.4
57+
compilerKind: ghc
58+
compilerVersion: 8.4.4
59+
setup-method: hvr-ppa
60+
allow-failure: false
61+
- compiler: ghc-8.2.2
62+
compilerKind: ghc
63+
compilerVersion: 8.2.2
64+
setup-method: hvr-ppa
65+
allow-failure: false
66+
fail-fast: false
67+
steps:
68+
- name: apt
69+
run: |
70+
apt-get update
71+
apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5
72+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
73+
mkdir -p "$HOME/.ghcup/bin"
74+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
75+
chmod a+x "$HOME/.ghcup/bin/ghcup"
76+
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER"
77+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
78+
else
79+
apt-add-repository -y 'ppa:hvr/ghc'
80+
apt-get update
81+
apt-get install -y "$HCNAME"
82+
mkdir -p "$HOME/.ghcup/bin"
83+
curl -sL https://downloads.haskell.org/ghcup/0.1.17.3/x86_64-linux-ghcup-0.1.17.3 > "$HOME/.ghcup/bin/ghcup"
84+
chmod a+x "$HOME/.ghcup/bin/ghcup"
85+
"$HOME/.ghcup/bin/ghcup" install cabal 3.6.2.0
86+
fi
87+
env:
88+
HCKIND: ${{ matrix.compilerKind }}
89+
HCNAME: ${{ matrix.compiler }}
90+
HCVER: ${{ matrix.compilerVersion }}
91+
- name: Set PATH and environment variables
92+
run: |
93+
echo "$HOME/.cabal/bin" >> $GITHUB_PATH
94+
echo "LANG=C.UTF-8" >> "$GITHUB_ENV"
95+
echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV"
96+
echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV"
97+
HCDIR=/opt/$HCKIND/$HCVER
98+
if [ "${{ matrix.setup-method }}" = ghcup ]; then
99+
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER
100+
echo "HC=$HC" >> "$GITHUB_ENV"
101+
echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV"
102+
echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV"
103+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
104+
else
105+
HC=$HCDIR/bin/$HCKIND
106+
echo "HC=$HC" >> "$GITHUB_ENV"
107+
echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV"
108+
echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV"
109+
echo "CABAL=$HOME/.ghcup/bin/cabal-3.6.2.0 -vnormal+nowrap" >> "$GITHUB_ENV"
110+
fi
111+
112+
HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
113+
echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
114+
echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
115+
echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV"
116+
echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
117+
echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
118+
echo "GHCJSARITH=0" >> "$GITHUB_ENV"
119+
env:
120+
HCKIND: ${{ matrix.compilerKind }}
121+
HCNAME: ${{ matrix.compiler }}
122+
HCVER: ${{ matrix.compilerVersion }}
123+
- name: env
124+
run: |
125+
env
126+
- name: write cabal config
127+
run: |
128+
mkdir -p $CABAL_DIR
129+
cat >> $CABAL_CONFIG <<EOF
130+
remote-build-reporting: anonymous
131+
write-ghc-environment-files: never
132+
remote-repo-cache: $CABAL_DIR/packages
133+
logs-dir: $CABAL_DIR/logs
134+
world-file: $CABAL_DIR/world
135+
extra-prog-path: $CABAL_DIR/bin
136+
symlink-bindir: $CABAL_DIR/bin
137+
installdir: $CABAL_DIR/bin
138+
build-summary: $CABAL_DIR/logs/build.log
139+
store-dir: $CABAL_DIR/store
140+
install-dirs user
141+
prefix: $CABAL_DIR
142+
repository hackage.haskell.org
143+
url: http://hackage.haskell.org/
144+
EOF
145+
cat >> $CABAL_CONFIG <<EOF
146+
program-default-options
147+
ghc-options: $GHCJOBS +RTS -M3G -RTS
148+
EOF
149+
cat $CABAL_CONFIG
150+
- name: versions
151+
run: |
152+
$HC --version || true
153+
$HC --print-project-git-commit-id || true
154+
$CABAL --version || true
155+
- name: update cabal index
156+
run: |
157+
$CABAL v2-update -v
158+
- name: install cabal-plan
159+
run: |
160+
mkdir -p $HOME/.cabal/bin
161+
curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz
162+
echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c -
163+
xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan
164+
rm -f cabal-plan.xz
165+
chmod a+x $HOME/.cabal/bin/cabal-plan
166+
cabal-plan --version
167+
- name: checkout
168+
uses: actions/checkout@v2
169+
with:
170+
path: source
171+
- name: initial cabal.project for sdist
172+
run: |
173+
touch cabal.project
174+
echo "packages: $GITHUB_WORKSPACE/source/haskell-src-meta" >> cabal.project
175+
cat cabal.project
176+
- name: sdist
177+
run: |
178+
mkdir -p sdist
179+
$CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist
180+
- name: unpack
181+
run: |
182+
mkdir -p unpacked
183+
find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \;
184+
- name: generate cabal.project
185+
run: |
186+
PKGDIR_haskell_src_meta="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/haskell-src-meta-[0-9.]*')"
187+
echo "PKGDIR_haskell_src_meta=${PKGDIR_haskell_src_meta}" >> "$GITHUB_ENV"
188+
rm -f cabal.project cabal.project.local
189+
touch cabal.project
190+
touch cabal.project.local
191+
echo "packages: ${PKGDIR_haskell_src_meta}" >> cabal.project
192+
echo "package haskell-src-meta" >> cabal.project
193+
echo " ghc-options: -Werror=missing-methods" >> cabal.project
194+
cat >> cabal.project <<EOF
195+
EOF
196+
$HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: $_ installed\n" unless /^(haskell-src-meta)$/; }' >> cabal.project.local
197+
cat cabal.project
198+
cat cabal.project.local
199+
- name: dump install plan
200+
run: |
201+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all
202+
cabal-plan
203+
- name: cache
204+
uses: actions/cache@v2
205+
with:
206+
key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
207+
path: ~/.cabal/store
208+
restore-keys: ${{ runner.os }}-${{ matrix.compiler }}-
209+
- name: install dependencies
210+
run: |
211+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
212+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all
213+
- name: build w/o tests
214+
run: |
215+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
216+
- name: build
217+
run: |
218+
$CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always
219+
- name: tests
220+
run: |
221+
$CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-details=direct
222+
- name: cabal check
223+
run: |
224+
cd ${PKGDIR_haskell_src_meta} || false
225+
${CABAL} -vnormal check
226+
- name: haddock
227+
run: |
228+
$CABAL v2-haddock $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
229+
- name: unconstrained build
230+
run: |
231+
rm -f cabal.project.local
232+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
dist-newstyle/
44
dist/
55
cabal.project.local
6+
.vscode

.travis.yml

Lines changed: 0 additions & 154 deletions
This file was deleted.

0 commit comments

Comments
 (0)