{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.
This commit is contained in:
Geod24 2020-12-08 12:04:46 +01:00
parent 2d69b9e2f8
commit 2bc660a7f4
3 changed files with 18 additions and 16 deletions

View file

@ -14,7 +14,7 @@ environment:
CIRRUS_CLONE_DEPTH: 50 CIRRUS_CLONE_DEPTH: 50
# for ci.sh: # for ci.sh:
MODEL: 64 MODEL: 64
HOST_DC: dmd HOST_DMD: dmd
N: 4 N: 4
OS_NAME: linux OS_NAME: linux
FULL_BUILD: true FULL_BUILD: true
@ -33,14 +33,14 @@ task:
MODEL: 32 MODEL: 32
- TASK_NAME_SUFFIX: x86, DMD (bootstrap) - TASK_NAME_SUFFIX: x86, DMD (bootstrap)
MODEL: 32 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 (latest)
- TASK_NAME_SUFFIX: x64, DMD (bootstrap) - TASK_NAME_SUFFIX: x64, DMD (bootstrap)
HOST_DC: dmd-2.079.0 HOST_DMD: dmd-2.079.0
- TASK_NAME_SUFFIX: x64, LDC - 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 - TASK_NAME_SUFFIX: x64, GDC
HOST_DC: gdmd-9 HOST_DMD: gdmd-9
<< : *COMMON_STEPS_TEMPLATE << : *COMMON_STEPS_TEMPLATE
# Mac # Mac
@ -58,7 +58,7 @@ task:
- TASK_NAME_SUFFIX: DMD (bootstrap) - TASK_NAME_SUFFIX: DMD (bootstrap)
# de-facto bootstrap version on OSX # de-facto bootstrap version on OSX
# See: https://forum.dlang.org/post/qfsgt2$1goc$1@digitalmars.com # 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 << : *COMMON_STEPS_TEMPLATE
# FreeBSD # FreeBSD
@ -84,7 +84,7 @@ task:
timeout_in: 60m timeout_in: 60m
environment: environment:
OS_NAME: freebsd OS_NAME: freebsd
HOST_DC: dmd-2.079.0 HOST_DMD: dmd-2.079.0
CI_DFLAGS: -version=TARGET_FREEBSD11 CI_DFLAGS: -version=TARGET_FREEBSD11
install_bash_script: pkg install -y bash install_bash_script: pkg install -y bash
<< : *COMMON_STEPS_TEMPLATE << : *COMMON_STEPS_TEMPLATE

11
ci.sh
View file

@ -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 if [ -z ${FULL_BUILD+x} ] ; then echo "Variable 'FULL_BUILD' needs to be set."; exit 1; fi
# MODEL: 32|64 # MODEL: 32|64
if [ -z ${MODEL+x} ] ; then echo "Variable 'MODEL' needs to be set."; exit 1; fi if [ -z ${MODEL+x} ] ; then echo "Variable 'MODEL' needs to be set."; exit 1; fi
# HOST_DC: dmd[-<version>]|ldc[-<version>]|gdmd-<version> # HOST_DMD: dmd[-<version>]|ldc[-<version>]|gdmd-<version>
if [ -z ${HOST_DC+x} ] ; then echo "Variable 'HOST_DC' needs to be set."; exit 1; fi 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 # CI_DFLAGS: Optional flags to pass to the build
if [ -z ${CI_DFLAGS+x} ] ; then CI_DFLAGS=""; fi if [ -z ${CI_DFLAGS+x} ] ; then CI_DFLAGS=""; fi
@ -185,8 +186,8 @@ download_install_sh() {
# install D host compiler # install D host compiler
install_host_compiler() { install_host_compiler() {
if [ "${HOST_DC:0:5}" == "gdmd-" ] ; then if [ "${HOST_DMD:0:5}" == "gdmd-" ] ; then
local gdc_version="${HOST_DC:5}" local gdc_version="${HOST_DMD:5}"
if [ ! -e ~/dlang/gdc-$gdc_version/activate ] ; then if [ ! -e ~/dlang/gdc-$gdc_version/activate ] ; then
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update sudo apt-get update
@ -202,7 +203,7 @@ install_host_compiler() {
else else
local install_sh="install.sh" local install_sh="install.sh"
download_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 fi
} }

View file

@ -10,8 +10,9 @@ set -uexo pipefail
if [ -z ${OS_NAME+x} ] ; then echo "Variable 'OS_NAME' needs to be set."; exit 1; fi if [ -z ${OS_NAME+x} ] ; then echo "Variable 'OS_NAME' needs to be set."; exit 1; fi
# MODEL: 32|64 # MODEL: 32|64
if [ -z ${MODEL+x} ] ; then echo "Variable 'MODEL' needs to be set."; exit 1; fi if [ -z ${MODEL+x} ] ; then echo "Variable 'MODEL' needs to be set."; exit 1; fi
# HOST_DC: dmd[-<version>]|ldc[-<version>]|gdmd-<version> # HOST_DMD: dmd[-<version>]|ldc[-<version>]|gdmd-<version>
if [ -z ${HOST_DC+x} ] ; then echo "Variable 'HOST_DC' needs to be set."; exit 1; fi 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 if [ "$OS_NAME" == "linux" ]; then
packages="git-core make g++ gdb curl libcurl3 tzdata zip unzip xz-utils" 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 dpkg --add-architecture i386
packages="$packages g++-multilib libcurl3-gnutls:i386" packages="$packages g++-multilib libcurl3-gnutls:i386"
fi 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 # ci.sh uses `sudo add-apt-repository ...` to add a PPA repo
packages="$packages sudo software-properties-common" packages="$packages sudo software-properties-common"
fi fi
@ -30,7 +31,7 @@ elif [ "$OS_NAME" == "darwin" ]; then
brew install gnupg brew install gnupg
elif [ "$OS_NAME" == "freebsd" ]; then elif [ "$OS_NAME" == "freebsd" ]; then
packages="git gmake" packages="git gmake"
if [ "$HOST_DC" == "dmd-2.079.0" ] ; then if [ "$HOST_DMD" == "dmd-2.079.0" ] ; then
packages="$packages lang/gcc9" packages="$packages lang/gcc9"
fi fi
pkg install -y $packages pkg install -y $packages