From 296cb3d524098ec25fd3074c9318d5e3a3898dc5 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Fri, 17 Apr 2020 02:39:55 +0200 Subject: Update CI images for GHC 8.10.1 and 8.8.3 --- .gitlab-ci.yml | 7 ++++++- scripts/build-ci-images.sh | 24 ++++++++++++++++-------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c66d024..6274ce8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,8 +9,13 @@ 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 + stage: build + script: "$CI_PROJECT_DIR/scripts/ci/build.sh" + job-ghc8.8: - image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.8.1--cabal-install-3.0.0.0--stack-2.1.3 + image: registry.gitlab.com/dxld/cabal-helper/ci:ghc-8.8.3--cabal-install-3.0.0.0--stack-2.1.3 stage: build script: "$CI_PROJECT_DIR/scripts/ci/build.sh" diff --git a/scripts/build-ci-images.sh b/scripts/build-ci-images.sh index 20132d1..521139a 100644 --- a/scripts/build-ci-images.sh +++ b/scripts/build-ci-images.sh @@ -18,20 +18,28 @@ image=debian:buster cabal=3.0.0.0 stack=2.1.3 -ghc_arch=x86_64-deb8-linux -ghcs='8.8.1 8.6.5 8.4.4 8.2.2 8.0.2' - stack_url="${STACK_BASE}/v${stack}/stack-${stack}-linux-x86_64-static.tar.gz" stack_file="$(basename "$stack_url")" mkdir -p "$dldir" -printf '%s\n' $ghcs > "$tmpdir"/ghcs + +cat >"$tmpdir"/ghc_table <> "$tmpdir"/ghcs } | tee "$tmpdir"/ghc-urls | xargs -n1 -P$(nproc) sh -ue -c ' cd "$1" wget -nv -nc -c "$3" @@ -96,10 +104,10 @@ COPY --from=build /usr/local/ /usr/local/ EOF -tag="${namespace}:ghc-$(printf '%s' "$ghcs" | tr ' ' '-')--cabal-install-${cabal}--stack-${stack}" +tag="${namespace}:ghc-$(printf '%s' "$(cat "$tmpdir"/ghcs)" | tr ' ' '-')--cabal-install-${cabal}--stack-${stack}" docker build -t "$tag" "$tmpdir" -for ghc in $ghcs; do +for ghc in $(cat "$tmpdir"/ghcs); do stag="${namespace}:ghc-${ghc}--cabal-install-${cabal}--stack-${stack}" printf '%s\n' \ "FROM $tag" \ -- cgit v1.2.3