Skip to content

Commit d7ac88a

Browse files
committed
Update the CI
- Add a CI entry for ghc 9.10.1 - Move macos build to ghc-9.2 - Update the packcheck commit and simplify the github CI file
1 parent 9a739d3 commit d7ac88a

File tree

2 files changed

+29
-46
lines changed

2 files changed

+29
-46
lines changed

.github/workflows/haskell.yml

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -21,29 +21,36 @@ jobs:
2121
CABAL_NO_SANDBOX: y
2222
CABAL_HACKAGE_MIRROR: hackage.haskell.org:http://hackage.fpcomplete.com
2323

24-
PACKCHECK_LOCAL_PATH: "./packcheck.sh"
24+
PACKCHECK: "./packcheck.sh"
2525
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
26-
PACKCHECK_GITHUB_COMMIT: "v0.6.0"
26+
PACKCHECK_GITHUB_COMMIT: "ccc55fd4b895e842ca6e2d8ac63aa4acc1c3209a"
2727

2828
BUILD: ${{ matrix.build }}
2929
GHCVER: ${{ matrix.ghc_version }}
3030
CABALVER: ${{ matrix.cabal_version }}
3131
CABAL_PROJECT: ${{ matrix.cabal_project }}
3232
CABAL_BUILD_OPTIONS: ${{ matrix.cabal_build_options }}
3333
DISABLE_SDIST_BUILD: ${{ matrix.disable_sdist_build }}
34+
GHCUP_GHC_OPTIONS: ${{ matrix.ghcup_ghc_options }}
35+
GHCUP_VERSION: 0.1.20.0
3436

3537
runs-on: ${{ matrix.runner }}
3638
strategy:
3739
fail-fast: false
3840
matrix:
39-
name: [head, 9.8.1, 9.6.3, 9.4.7, 9.2.8, 9.0.2, 8.10.7, 8.10.7+macOS, 8.8.4, 8.6.5]
41+
name: [head, 9.10.1, 9.8.1, 9.6.3, 9.4.7, 9.2.8+macOS, 9.0.2, 8.10.7, 8.8.4, 8.6.5]
4042
cabal_version: ["3.8.1.0"]
4143
include:
4244
- name: head
4345
ghc_version: head
46+
build: cabal-v2
4447
runner: ubuntu-latest
45-
build: cabal
4648
cabal_project: cabal.project.ghc-head
49+
ghcup_ghc_options: "-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"
50+
- name: 9.10.1
51+
ghc_version: 9.10.1
52+
build: cabal-v2
53+
runner: ubuntu-latest
4754
- name: 9.8.1
4855
ghc_version: 9.8.1
4956
build: cabal-v2
@@ -56,23 +63,21 @@ jobs:
5663
ghc_version: 9.4.7
5764
build: cabal-v2
5865
runner: ubuntu-latest
59-
- name: 9.2.8
66+
- name: 9.2.8+macOS
6067
ghc_version: 9.2.8
6168
build: cabal-v2
62-
runner: ubuntu-latest
69+
runner: macos-latest
70+
disable_sdist_build: "y"
6371
- name: 9.0.2
6472
ghc_version: 9.0.2
6573
build: cabal-v2
6674
runner: ubuntu-latest
75+
# macos build on ghc 8.10.7 fails with some LLVM version issues.
76+
# See: https://github.com/haskell/vscode-haskell/issues/667
6777
- name: 8.10.7
6878
ghc_version: 8.10.7
6979
build: cabal-v2
7080
runner: ubuntu-latest
71-
- name: 8.10.7+macOS
72-
ghc_version: 8.10.7
73-
build: cabal-v2
74-
disable_sdist_build: "y"
75-
runner: macos-latest
7681
- name: 8.8.4
7782
ghc_version: 8.8.4
7883
build: cabal-v2
@@ -93,42 +98,20 @@ jobs:
9398

9499
- name: Download packcheck
95100
run: |
96-
# If a custom stack-yaml is specified, replace the default with that
97-
if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
98-
unset STACK_YAML
99-
100-
# Get packcheck if needed
101-
CURL=$(which curl)
102-
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
103-
if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
104-
chmod +x $PACKCHECK_LOCAL_PATH
105-
106-
os=$(uname -s -m)
107-
case "$os" in
108-
"Linux x86_64") GHCUP_ARCH="x86_64-linux" ;;
109-
"Darwin x86_64") GHCUP_ARCH="x86_64-apple-darwin" ;;
110-
*) echo "Unknown OS/Arch: $os"; exit 1;;
111-
esac
112-
113-
# Check available versions here: https://downloads.haskell.org/~ghcup/
114-
GHCUP_VER=0.1.18.0
115-
$CURL -sL -o ./ghcup https://downloads.haskell.org/~ghcup/$GHCUP_VER/${GHCUP_ARCH}-ghcup-$GHCUP_VER
116-
chmod +x ./ghcup
117-
if test "$GHCVER" = "head"
101+
if test ! -e "$PACKCHECK"
102+
then
103+
if test -z "$PACKCHECK_GITHUB_COMMIT"
104+
then
105+
die "PACKCHECK_GITHUB_COMMIT is not specified."
106+
fi
107+
PACKCHECK_URL=${PACKCHECK_GITHUB_URL}/${PACKCHECK_GITHUB_COMMIT}/packcheck.sh
108+
curl --fail -sL -o "$PACKCHECK" $PACKCHECK_URL || exit 1
109+
chmod +x $PACKCHECK
110+
elif test ! -x "$PACKCHECK"
118111
then
119-
# The URL may change, to find a working URL go to https://gitlab.haskell.org/ghc/ghc/-/jobs/
120-
# Find a debian10 job, click on a passed/failed job, at the
121-
# end of the output you will find the tar.xz name, put that after
122-
# "raw/", and put the job name after "job=".
123-
# Also see https://github.com/mpickering/ghc-artefact-nix/blob/master/gitlab-artifact.nix
124-
./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
125-
else
126-
./ghcup install ghc $GHCVER
112+
chmod +x $PACKCHECK
127113
fi
128-
./ghcup install cabal $CABALVER
129-
./ghcup set ghc $GHCVER
130-
./ghcup set cabal $CABALVER
131114
132115
- name: Run packcheck
133116
run: |
134-
bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
117+
bash -c "$PACKCHECK $BUILD"

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ environment:
6464
# If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
6565
# then it is automatically pulled from this URL.
6666
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
67-
PACKCHECK_GITHUB_COMMIT: "v0.6.0"
67+
PACKCHECK_GITHUB_COMMIT: "ccc55fd4b895e842ca6e2d8ac63aa4acc1c3209a"
6868

6969
# Override the temp directory to avoid sed escaping issues
7070
# See https://github.com/haskell/cabal/issues/5386

0 commit comments

Comments
 (0)