From 2bc660a7f4c73d3aeae09fbdf16519eb6fae61d9 Mon Sep 17 00:00:00 2001 From: Geod24 Date: Tue, 8 Dec 2020 12:04:46 +0100 Subject: [PATCH] {ci,cirrusci}.sh: Use HOST_DMD, and set HOST_DC as an override This will allow to silence some deprecation message triggered in the Makefiles. Later on, when other repositories have been migrated, we can remove support for HOST_DC. --- .cirrus.yml | 14 +++++++------- ci.sh | 11 ++++++----- cirrusci.sh | 9 +++++---- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 8651d75d4e..46dfd921c4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -14,7 +14,7 @@ environment: CIRRUS_CLONE_DEPTH: 50 # for ci.sh: MODEL: 64 - HOST_DC: dmd + HOST_DMD: dmd N: 4 OS_NAME: linux FULL_BUILD: true @@ -33,14 +33,14 @@ task: MODEL: 32 - TASK_NAME_SUFFIX: x86, DMD (bootstrap) MODEL: 32 - HOST_DC: dmd-2.079.0 + HOST_DMD: dmd-2.079.0 - TASK_NAME_SUFFIX: x64, DMD (latest) - TASK_NAME_SUFFIX: x64, DMD (bootstrap) - HOST_DC: dmd-2.079.0 + HOST_DMD: dmd-2.079.0 - TASK_NAME_SUFFIX: x64, LDC - HOST_DC: ldc + HOST_DC: ldc #TODO: Update to HOST_DMD when support for HOST_DC is removed - TASK_NAME_SUFFIX: x64, GDC - HOST_DC: gdmd-9 + HOST_DMD: gdmd-9 << : *COMMON_STEPS_TEMPLATE # Mac @@ -58,7 +58,7 @@ task: - TASK_NAME_SUFFIX: DMD (bootstrap) # de-facto bootstrap version on OSX # See: https://forum.dlang.org/post/qfsgt2$1goc$1@digitalmars.com - HOST_DC: dmd-2.088.0 + HOST_DMD: dmd-2.088.0 << : *COMMON_STEPS_TEMPLATE # FreeBSD @@ -84,7 +84,7 @@ task: timeout_in: 60m environment: OS_NAME: freebsd - HOST_DC: dmd-2.079.0 + HOST_DMD: dmd-2.079.0 CI_DFLAGS: -version=TARGET_FREEBSD11 install_bash_script: pkg install -y bash << : *COMMON_STEPS_TEMPLATE diff --git a/ci.sh b/ci.sh index 7e71b78040..66e43e9486 100755 --- a/ci.sh +++ b/ci.sh @@ -13,8 +13,9 @@ if [ -z ${OS_NAME+x} ] ; then echo "Variable 'OS_NAME' needs to be set."; exit 1 if [ -z ${FULL_BUILD+x} ] ; then echo "Variable 'FULL_BUILD' needs to be set."; exit 1; fi # MODEL: 32|64 if [ -z ${MODEL+x} ] ; then echo "Variable 'MODEL' needs to be set."; exit 1; fi -# HOST_DC: dmd[-]|ldc[-]|gdmd- -if [ -z ${HOST_DC+x} ] ; then echo "Variable 'HOST_DC' needs to be set."; exit 1; fi +# HOST_DMD: dmd[-]|ldc[-]|gdmd- +if [ ! -z ${HOST_DC+x} ] ; then HOST_DMD=${HOST_DC}; fi +if [ -z ${HOST_DMD+x} ] ; then echo "Variable 'HOST_DMD' needs to be set."; exit 1; fi # CI_DFLAGS: Optional flags to pass to the build if [ -z ${CI_DFLAGS+x} ] ; then CI_DFLAGS=""; fi @@ -185,8 +186,8 @@ download_install_sh() { # install D host compiler install_host_compiler() { - if [ "${HOST_DC:0:5}" == "gdmd-" ] ; then - local gdc_version="${HOST_DC:5}" + if [ "${HOST_DMD:0:5}" == "gdmd-" ] ; then + local gdc_version="${HOST_DMD:5}" if [ ! -e ~/dlang/gdc-$gdc_version/activate ] ; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update @@ -202,7 +203,7 @@ install_host_compiler() { else local install_sh="install.sh" download_install_sh "$install_sh" - CURL_USER_AGENT="$CURL_USER_AGENT" bash "$install_sh" "$HOST_DC" + CURL_USER_AGENT="$CURL_USER_AGENT" bash "$install_sh" "$HOST_DMD" fi } diff --git a/cirrusci.sh b/cirrusci.sh index 70806c5822..93914865b7 100755 --- a/cirrusci.sh +++ b/cirrusci.sh @@ -10,8 +10,9 @@ set -uexo pipefail if [ -z ${OS_NAME+x} ] ; then echo "Variable 'OS_NAME' needs to be set."; exit 1; fi # MODEL: 32|64 if [ -z ${MODEL+x} ] ; then echo "Variable 'MODEL' needs to be set."; exit 1; fi -# HOST_DC: dmd[-]|ldc[-]|gdmd- -if [ -z ${HOST_DC+x} ] ; then echo "Variable 'HOST_DC' needs to be set."; exit 1; fi +# HOST_DMD: dmd[-]|ldc[-]|gdmd- +if [ ! -z ${HOST_DC+x} ] ; then HOST_DMD=${HOST_DC}; fi +if [ -z ${HOST_DMD+x} ] ; then echo "Variable 'HOST_DMD' needs to be set."; exit 1; fi if [ "$OS_NAME" == "linux" ]; then packages="git-core make g++ gdb curl libcurl3 tzdata zip unzip xz-utils" @@ -19,7 +20,7 @@ if [ "$OS_NAME" == "linux" ]; then dpkg --add-architecture i386 packages="$packages g++-multilib libcurl3-gnutls:i386" fi - if [ "${HOST_DC:0:4}" == "gdmd" ]; then + if [ "${HOST_DMD:0:4}" == "gdmd" ]; then # ci.sh uses `sudo add-apt-repository ...` to add a PPA repo packages="$packages sudo software-properties-common" fi @@ -30,7 +31,7 @@ elif [ "$OS_NAME" == "darwin" ]; then brew install gnupg elif [ "$OS_NAME" == "freebsd" ]; then packages="git gmake" - if [ "$HOST_DC" == "dmd-2.079.0" ] ; then + if [ "$HOST_DMD" == "dmd-2.079.0" ] ; then packages="$packages lang/gcc9" fi pkg install -y $packages