Skip to content

Commit 08ac9a1

Browse files
committed
Run bootstrapping tests on Buildkite
1 parent 3cb2967 commit 08ac9a1

File tree

4 files changed

+59
-5
lines changed

4 files changed

+59
-5
lines changed

buildkite.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,32 @@ cat << 'EOF'
3939
- wait
4040
EOF
4141

42+
################################################################################
43+
# Test bootstrapping with different compilers
44+
################################################################################
45+
46+
case "${BUILDKITE_REPO:-x}" in
47+
"https://github.com/dlang/dmd.git" | \
48+
"https://github.com/dlang/druntime.git" | \
49+
"https://github.com/dlang/phobos.git" | \
50+
"https://github.com/dlang/ci.git")
51+
52+
for line in dmd-64 gdc-64 ldc-64 ; do
53+
# TODO: dmd-32
54+
IFS=- read -r compiler model <<< "$line"
55+
cat << EOF
56+
- command: |
57+
${LOAD_CI_FOLDER}
58+
DMD=$compiler MODEL=$model ./buildkite/test_bootstrap.sh
59+
label: "Bootstrap ($compiler)"
60+
EOF
61+
62+
done
63+
;;
64+
*)
65+
;;
66+
esac
67+
4268
################################################################################
4369
# Style & coverage targets
4470
# Must run after the 'wait' to avoid blocking the build_distribution step

buildkite/build_distribution.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
1010

1111
"$DIR/clone_repositories.sh"
1212

13+
for dir in dmd druntime phobos ; do
14+
echo "--- Building $dir"
15+
make -C $dir -f posix.mak AUTO_BOOTSTRAP=1 --jobs=4
16+
done
17+
1318
echo "--- Building dub"
1419
cd dub
1520
DMD="../dmd/generated/linux/release/64/dmd" ./build.sh

buildkite/clone_repositories.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,3 @@ for dir in "${repositories[@]}" ; do
4444
git clone -b "${branch:-master}" --depth 1 "https://github.com/dlang/$dir"
4545
fi
4646
done
47-
48-
for dir in dmd druntime phobos ; do
49-
echo "--- Building $dir"
50-
make -C $dir -f posix.mak AUTO_BOOTSTRAP=1 --jobs=4
51-
done

buildkite/test_bootstrap.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 "--- Exporting build variables"
13+
14+
export BRANCH="${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-}"
15+
export N=2
16+
export OS_NAME=linux
17+
export FULL_BUILD="${BUILDKITE_PULL_REQUEST+false}"
18+
19+
echo "--- Go to dmd and source ci.sh"
20+
21+
cd dmd
22+
source ci.sh
23+
24+
echo "--- Installing $DMD"
25+
install_d "$DMD" # Source a D compiler
26+
27+
echo "--- Running the testsuite"
28+
testsuite

0 commit comments

Comments
 (0)