From 8140936bd39128f520ed19ede1a2f47f0ba4ee3d Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 29 Sep 2020 10:23:11 +0200 Subject: [PATCH] Test bootstrap-haskell wrt #72 --- .gitlab-ci.yml | 13 +++++++++++++ .gitlab/script/ghcup_bootstrap.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100755 .gitlab/script/ghcup_bootstrap.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d2fae11..a74e103 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -102,6 +102,19 @@ variables: only: - tags +######## bootstrap test ######## + +test:linux:bootstrap_script: + before_script: + - ./.gitlab/before_script/linux/install_deps.sh + script: + - ./.gitlab/script/ghcup_bootstrap.sh + variables: + GHC_VERSION: "8.8.4" + CABAL_VERSION: "3.2.0.0" + extends: + - .debian + ######## linux test ######## test:linux:recommended: diff --git a/.gitlab/script/ghcup_bootstrap.sh b/.gitlab/script/ghcup_bootstrap.sh new file mode 100755 index 0000000..7ee3d46 --- /dev/null +++ b/.gitlab/script/ghcup_bootstrap.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +set -eux + +. "$( cd "$(dirname "$0")" ; pwd -P )/../ghcup_env" + +mkdir -p "$CI_PROJECT_DIR"/.local/bin + +ecabal() { + cabal --store-dir="$(pwd)"/.store "$@" +} + +eghcup() { + ghcup -v -c -s file://$(pwd)/ghcup-${JSON_VERSION}.yaml "$@" +} + +git describe --always + +### build + +ecabal update + +export BOOTSTRAP_HASKELL_NONINTERACTIVE=yes +export BOOTSTRAP_HASKELL_GHC_VERSION=$GHC_VERSION +export BOOTSTRAP_HASKELL_CABAL_VERSION=$CABAL_VERSION + +./bootstrap-haskell +