Skip to content

Commit b169815

Browse files
committed
Run bootstrapping tests on Buildkite
1 parent 0ae33e3 commit b169815

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

ansible/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
- role: buildkite_agent
6868
priority: 5 # Higher priority agents are assigned work first
6969
tags: buildkite_agent
70+
- gcc-multilib # for 32-bit builds
7071

7172
- hosts: ci.dlang.io
7273
roles:

buildkite.sh

+27
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,33 @@ cat << 'EOF'
5959
- wait
6060
EOF
6161

62+
################################################################################
63+
# Test bootstrapping with different compilers
64+
################################################################################
65+
66+
case "${BUILDKITE_REPO:-x}" in
67+
"https://github.com/dlang/dmd.git" | \
68+
"https://github.com/dlang/druntime.git" | \
69+
"https://github.com/dlang/phobos.git" | \
70+
"https://github.com/dlang/ci.git")
71+
72+
for line in dmd-64 ldc-64 ; do
73+
# TODO: dmd-32, gdc-64
74+
IFS=- read -r compiler model <<< "$line"
75+
cat << EOF
76+
- command: |
77+
${LOAD_CI_FOLDER}
78+
DMD=$compiler MODEL=$model ./buildkite/test_bootstrap.sh
79+
label: "Bootstrap ($compiler)"
80+
${DEFAULT_COMMAND_PROPS}
81+
EOF
82+
83+
done
84+
;;
85+
*)
86+
;;
87+
esac
88+
6289
################################################################################
6390
# Style & coverage targets
6491
# Must run after the 'wait' to avoid blocking the build_distribution step

buildkite/test_bootstrap.sh

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/bash
2+
3+
PS4="~> " # needed to avoid accidentally generating collapsed output
4+
set -uexo pipefail
5+
6+
echo "--- Setting build variables"
7+
8+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
9+
10+
"$DIR/clone_repositories.sh"
11+
12+
echo "--- Patching DMD and druntime (remove failing tests)"
13+
14+
# patch makefile which requires gdb 8 - see https://github.com/dlang/ci/pull/301
15+
sed "s/TESTS+=rt_trap_exceptions_drt_gdb//" -i druntime/test/exceptions/Makefile
16+
17+
# remove tests which require gdb 8 for now (see https://github.com/dlang/ci/pull/291)
18+
rm dmd/test/runnable/gdb{1,10311,14225,14276,14313,14330,4149,4181}.d
19+
rm dmd/test/runnable/gdb15729.sh
20+
21+
echo "--- Exporting build variables"
22+
23+
export BRANCH="${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-}"
24+
export N=2
25+
export OS_NAME=linux
26+
export FULL_BUILD="${BUILDKITE_PULL_REQUEST+false}"
27+
28+
echo "--- Go to dmd and source ci.sh"
29+
30+
cd dmd
31+
source ci.sh
32+
33+
echo "--- Installing $DMD"
34+
install_d "$DMD" # Source a D compiler
35+
36+
echo "--- Running the testsuite"
37+
testsuite

0 commit comments

Comments
 (0)