mirror of
https://github.com/dlang/dmd.git
synced 2025-04-25 20:50:41 +03:00
Cirrus CI: Extract prerequisites installation to cirrusci.sh
As preparation for druntime/Phobos CI, so that they can use this file too instead of having to duplicate these steps in their .cirrus.yml.
This commit is contained in:
parent
56082c729f
commit
ddfb4fbcd7
3 changed files with 50 additions and 32 deletions
37
.cirrus.yml
37
.cirrus.yml
|
@ -1,40 +1,16 @@
|
|||
common_steps_template: &COMMON_STEPS_TEMPLATE
|
||||
install_prerequisites_script: |
|
||||
set -uexo pipefail
|
||||
if [ "$OS_NAME" == "linux" ]; then
|
||||
packages="git-core make g++ gdb curl libcurl3 tzdata zip unzip xz-utils"
|
||||
if [ "$MODEL" == "32" ]; then
|
||||
dpkg --add-architecture i386
|
||||
packages="$packages g++-multilib libcurl3-gnutls:i386"
|
||||
fi
|
||||
if [ "${DMD:0:4}" == "gdmd" ]; then
|
||||
packages="$packages sudo software-properties-common wget"
|
||||
fi
|
||||
apt-get -q update
|
||||
apt-get install -yq $packages
|
||||
elif [ "$OS_NAME" == "darwin" ]; then
|
||||
# required for install.sh
|
||||
brew install gnupg
|
||||
elif [ "$OS_NAME" == "freebsd" ]; then
|
||||
packages="git gmake bash"
|
||||
if [ "${D_VERSION:-x}" == "2.079.0" ] ; then
|
||||
packages="$packages lang/gcc9"
|
||||
fi
|
||||
pkg install -y $packages
|
||||
rm /usr/bin/make
|
||||
ln -s /usr/local/bin/gmake /usr/bin/make
|
||||
fi
|
||||
# create a `dmd` symlink to the repo dir, necessary for druntime/Phobos
|
||||
ln -s $CIRRUS_WORKING_DIR ../dmd
|
||||
install_prerequisites_script: ./cirrusci.sh
|
||||
install_host_compiler_script: |
|
||||
set -uexo pipefail
|
||||
# kludge for ci.sh
|
||||
if [ "${DMD:0:4}" == "gdmd" ]; then export DMD="gdmd"; fi
|
||||
compiler="$DMD"
|
||||
if [ -n "${D_VERSION+x}" ]; then compiler="$DMD-$D_VERSION"; fi
|
||||
./ci.sh install_d "$compiler"
|
||||
setup_repos_script: |
|
||||
export BRANCH=${CIRRUS_BASE_BRANCH:-$CIRRUS_BRANCH}
|
||||
./ci.sh setup_repos
|
||||
set -uexo pipefail
|
||||
ln -s $CIRRUS_WORKING_DIR ../dmd
|
||||
BRANCH="${CIRRUS_BASE_BRANCH:-$CIRRUS_BRANCH}" ./ci.sh setup_repos
|
||||
build_script: ./ci.sh build
|
||||
test_dmd_script: ./ci.sh test_dmd
|
||||
test_druntime_script: ./ci.sh test_druntime
|
||||
|
@ -46,7 +22,6 @@ environment:
|
|||
MODEL: 64
|
||||
DMD: dmd
|
||||
N: 4
|
||||
BRANCH: master
|
||||
OS_NAME: linux
|
||||
FULL_BUILD: true
|
||||
|
||||
|
@ -103,6 +78,7 @@ task:
|
|||
timeout_in: 60m
|
||||
environment:
|
||||
OS_NAME: freebsd
|
||||
install_bash_script: pkg install -y bash
|
||||
<< : *COMMON_STEPS_TEMPLATE
|
||||
|
||||
task:
|
||||
|
@ -115,4 +91,5 @@ task:
|
|||
environment:
|
||||
OS_NAME: freebsd
|
||||
D_VERSION: 2.079.0
|
||||
install_bash_script: pkg install -y bash
|
||||
<< : *COMMON_STEPS_TEMPLATE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue