From ac598b9b6095b951f9ec0d5efc839add468d131a Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Thu, 15 Oct 2020 14:16:34 +0200 Subject: [PATCH] ci.sh: Rename install_d to install_host_compiler and add some more comments --- .cirrus.yml | 2 +- ci.sh | 9 ++++++--- semaphoreci.sh | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 714d2786a4..e6cb4a4976 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,6 +1,6 @@ common_steps_template: &COMMON_STEPS_TEMPLATE install_prerequisites_script: ./cirrusci.sh - install_host_compiler_script: ./ci.sh install_d + install_host_compiler_script: ./ci.sh install_host_compiler setup_repos_script: | set -uexo pipefail ln -s $CIRRUS_WORKING_DIR ../dmd diff --git a/ci.sh b/ci.sh index 2117e0a032..a9b2993abf 100755 --- a/ci.sh +++ b/ci.sh @@ -98,10 +98,12 @@ test_dmd() { fi } +# build and run druntime unit tests test_druntime() { make -j$N -C ../druntime -f posix.mak MODEL=$MODEL unittest } +# build and run Phobos unit tests test_phobos() { make -j$N -C ../phobos -f posix.mak MODEL=$MODEL unittest } @@ -179,14 +181,15 @@ download_install_sh() { done } -install_d() { +# install D host compiler +install_host_compiler() { if [ "${HOST_DC:0:5}" == "gdmd-" ] ; then local gdc_version="${HOST_DC:5}" if [ ! -e ~/dlang/gdc-$gdc_version/activate ] ; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install -y gdc-$gdc_version - # fetch the dmd-like wrapper + # fetch the gdmd wrapper for CLI compatibility with dmd sudo curl -fsSL -A "$CURL_USER_AGENT" --connect-timeout 5 --speed-time 30 --speed-limit 1024 --retry 5 --retry-delay 5 https://raw.githubusercontent.com/D-Programming-GDC/GDMD/master/dmd-script -o /usr/bin/gdmd-$gdc_version sudo chmod +x /usr/bin/gdmd-$gdc_version # fake install script and create a fake 'activate' script @@ -205,7 +208,7 @@ install_d() { if [ "$#" -gt 0 ]; then case $1 in - install_d) install_d ;; + install_host_compiler) install_host_compiler ;; setup_repos) setup_repos "$2" ;; # ci.sh setup_repos build) build ;; rebuild) rebuild "${2:-}" ;; # ci.sh rebuild [1] (use `1` to compare binaries to test reproducible build) diff --git a/semaphoreci.sh b/semaphoreci.sh index 35212fb4df..0c9fb35051 100755 --- a/semaphoreci.sh +++ b/semaphoreci.sh @@ -38,6 +38,6 @@ fi ################################################################################ case $1 in - setup) ./ci.sh install_d && ./ci.sh setup_repos "$BRANCH" ;; + setup) ./ci.sh install_host_compiler && ./ci.sh setup_repos "$BRANCH" ;; testsuite) ./ci.sh testsuite ;; esac