aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gröber <dxld@darkboxed.org>2021-02-12 03:18:00 +0100
committerDaniel Gröber <dxld@darkboxed.org>2021-02-12 03:18:00 +0100
commit87cba6ec1c004d2232cebede610b40edb272c4ee (patch)
tree55a280e12fec176ae075a452a5d47a5ed4ed9de5
parent88df287205cb44cdfda8ab6ba70d3ceef35845fa (diff)
ci: Update CI images for GHC 8.10.4 and 8.8.4
-rw-r--r--.gitlab-ci.yml14
-rw-r--r--scripts/build-ci-images.sh16
2 files changed, 16 insertions, 14 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6274ce8..2deaba9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,37 +10,37 @@ before_script:
# CI images are built with scripts/build-ci-images.sh
job-ghc8.10:
- image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.10.1--cabal-install-3.0.0.0--stack-2.1.3
+ image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.10.4--cabal-install-3.2.0.0--stack-2.5.1
stage: build
script: "$CI_PROJECT_DIR/scripts/ci/build.sh"
job-ghc8.8:
- image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.8.3--cabal-install-3.0.0.0--stack-2.1.3
+ image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.8.4--cabal-install-3.2.0.0--stack-2.5.1
stage: build
script: "$CI_PROJECT_DIR/scripts/ci/build.sh"
job-ghc8.6:
- image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.6.5--cabal-install-3.0.0.0--stack-2.1.3
+ image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.6.5--cabal-install-3.2.0.0--stack-2.5.1
stage: build
script: "$CI_PROJECT_DIR/scripts/ci/build.sh"
job-ghc8.4:
- image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.4.4--cabal-install-3.0.0.0--stack-2.1.3
+ image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.4.4--cabal-install-3.2.0.0--stack-2.5.1
stage: build
script: "$CI_PROJECT_DIR/scripts/ci/build.sh"
job-ghc8.2:
- image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.2.2--cabal-install-3.0.0.0--stack-2.1.3
+ image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.2.2--cabal-install-3.2.0.0--stack-2.5.1
stage: build
script: "$CI_PROJECT_DIR/scripts/ci/build.sh"
job-ghc8.0:
- image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.0.2--cabal-install-3.0.0.0--stack-2.1.3
+ image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.0.2--cabal-install-3.2.0.0--stack-2.5.1
stage: build
script: "$CI_PROJECT_DIR/scripts/ci/build.sh"
job-check-upd:
- image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.6.5--cabal-install-3.0.0.0--stack-2.1.3
+ image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.6.5--cabal-install-3.2.0.0--stack-2.5.1
stage: build
script:
- apt-get install -yy jq
diff --git a/scripts/build-ci-images.sh b/scripts/build-ci-images.sh
index 521139a..e3417aa 100644
--- a/scripts/build-ci-images.sh
+++ b/scripts/build-ci-images.sh
@@ -4,6 +4,8 @@
#
# Example: ./docker.sh #< build all images
+NPROC=${NPROC:-$(nproc)}
+
namespace="registry.gitlab.com/dxld/cabal-helper/ci"
tmpdir=$(mktemp -p "${TMPDIR:-/tmp/}" -d cabal-helper-docker-XXXX) || exit 1
@@ -15,17 +17,17 @@ HACKAGE_BASE=https://hackage.haskell.org/package
STACK_BASE=https://github.com/commercialhaskell/stack/releases/download
image=debian:buster
-cabal=3.0.0.0
-stack=2.1.3
+cabal=3.2.0.0
+stack=2.5.1
-stack_url="${STACK_BASE}/v${stack}/stack-${stack}-linux-x86_64-static.tar.gz"
+stack_url="${STACK_BASE}/v${stack}/stack-${stack}-linux-x86_64.tar.gz"
stack_file="$(basename "$stack_url")"
mkdir -p "$dldir"
cat >"$tmpdir"/ghc_table <<EOF
-8.10.1 x86_64-deb9-linux
-8.8.3 x86_64-deb8-linux
+8.10.4 x86_64-deb9-linux
+8.8.4 x86_64-deb8-linux
8.6.5 x86_64-deb8-linux
8.4.4 x86_64-deb8-linux
8.2.2 x86_64-deb8-linux
@@ -40,7 +42,7 @@ EOF
ghcs="${ghcs:+$ghcs }$ghc"
done < "$tmpdir"/ghc_table
printf '%s' "$ghcs" >> "$tmpdir"/ghcs
-} | tee "$tmpdir"/ghc-urls | xargs -n1 -P$(nproc) sh -ue -c '
+} | tee "$tmpdir"/ghc-urls | xargs -n1 -P$NPROC sh -ue -c '
cd "$1"
wget -nv -nc -c "$3"
cp "$(basename "$3")" "$2"
@@ -93,7 +95,7 @@ RUN cd /usr/local/bin && \
--strip-components 1 --wildcards '*/stack' && \
stack --help >/dev/null
-RUN cat ghcs | xargs -P$(nproc) -n1 sh install-ghc.sh
+RUN cat ghcs | xargs -P$NPROC -n1 sh install-ghc.sh
RUN cabal update && \
cabal install cabal-install-${cabal} --ghc-option=-j && \