dmd/.cirrus.yml
2020-09-03 19:45:23 +02:00

126 lines
3.3 KiB
YAML

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_host_compiler_script: |
source ci.sh
# kludge
if [ "${DMD:0:4}" == "gdmd" ]; then export DMD="gdmd"; fi
if [ -z "${D_VERSION+x}" ]; then install_d "$DMD"; else install_d "$DMD-$D_VERSION"; fi
setup_repos_script: |
export BRANCH=${CIRRUS_BASE_BRANCH:-$CIRRUS_BRANCH}
source ci.sh
setup_repos
build_script: |
source ci.sh
build
test_dmd_script: |
source ci.sh
test_dmd
test_druntime_script: |
set -uexo pipefail
make -j$N -C ../druntime -f posix.mak MODEL=$MODEL unittest
test_phobos_script: |
set -uexo pipefail
make -j$N -C ../phobos -f posix.mak MODEL=$MODEL unittest
environment:
CIRRUS_CLONE_DEPTH: 50
# for ci.sh:
MODEL: 64
DMD: dmd
N: 4
BRANCH: master
OS_NAME: linux
FULL_BUILD: true
# Linux
task:
name: Ubuntu 16.04 $TASK_NAME_SUFFIX
container:
image: ubuntu:16.04
cpu: 4
memory: 8G
timeout_in: 60m
environment:
matrix:
- TASK_NAME_SUFFIX: x86, DMD (latest)
MODEL: 32
- TASK_NAME_SUFFIX: x86, DMD (bootstrap)
MODEL: 32
D_VERSION: 2.079.0
- TASK_NAME_SUFFIX: x64, DMD (latest)
- TASK_NAME_SUFFIX: x64, DMD (bootstrap)
D_VERSION: 2.079.0
- TASK_NAME_SUFFIX: x64, LDC
DMD: ldc
- TASK_NAME_SUFFIX: x64, GDC
GDC_VERSION: 9
DMD: gdmd-9
<< : *COMMON_STEPS_TEMPLATE
# Mac
task:
name: macOS 10.15 x64, $TASK_NAME_SUFFIX
osx_instance:
image: catalina-xcode
timeout_in: 60m
environment:
OS_NAME: darwin
# override Cirrus default OS (`darwin`)
OS: osx
matrix:
- TASK_NAME_SUFFIX: DMD (latest)
- TASK_NAME_SUFFIX: DMD (bootstrap)
# de-facto bootstrap version on OSX
# See: https://forum.dlang.org/post/qfsgt2$1goc$1@digitalmars.com
D_VERSION: 2.088.0
<< : *COMMON_STEPS_TEMPLATE
# FreeBSD
task:
name: FreeBSD 12.1 x64, DMD (latest)
freebsd_instance:
image_family: freebsd-12-1
cpu: 4
memory: 8G
timeout_in: 60m
environment:
OS_NAME: freebsd
<< : *COMMON_STEPS_TEMPLATE
task:
name: FreeBSD 11.4 x64, DMD (bootstrap)
freebsd_instance:
image_family: freebsd-11-4
cpu: 4
memory: 8G
timeout_in: 60m
environment:
OS_NAME: freebsd
D_VERSION: 2.079.0
<< : *COMMON_STEPS_TEMPLATE