Skip to content

Commit

Permalink
Run bootstrapping tests on Buildkite
Browse files Browse the repository at this point in the history
  • Loading branch information
wilzbach committed Dec 21, 2018
1 parent 0ae33e3 commit 79a3380
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions ansible/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
- role: buildkite_agent
priority: 5 # Higher priority agents are assigned work first
tags: buildkite_agent
- gcc-multilib # for 32-bit builds

- hosts: ci.dlang.io
roles:
Expand Down
27 changes: 27 additions & 0 deletions buildkite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,33 @@ cat << 'EOF'
- wait
EOF

################################################################################
# Test bootstrapping with different compilers
################################################################################

case "${BUILDKITE_REPO:-x}" in
"https://github.com/dlang/dmd.git" | \
"https://github.com/dlang/druntime.git" | \
"https://github.com/dlang/phobos.git" | \
"https://github.com/dlang/ci.git")

for line in dmd-64 ldc-64 ; do
# TODO: dmd-32, gdc-64
IFS=- read -r compiler model <<< "$line"
cat << EOF
- command: |
${LOAD_CI_FOLDER}
DMD=$compiler MODEL=$model ./buildkite/test_bootstrap.sh
label: "Bootstrap ($compiler)"
${DEFAULT_COMMAND_PROPS}
EOF

done
;;
*)
;;
esac

################################################################################
# Style & coverage targets
# Must run after the 'wait' to avoid blocking the build_distribution step
Expand Down
37 changes: 37 additions & 0 deletions buildkite/test_bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

PS4="~> " # needed to avoid accidentally generating collapsed output
set -uexo pipefail

echo "--- Setting build variables"

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

"$DIR/clone_repositories.sh"

echo "--- Patching DMD and druntime (remove failing tests)"

# patch makefile which requires gdb 8 - see https://github.com/dlang/ci/pull/301
sed "s/TESTS+=rt_trap_exceptions_drt_gdb//" -i druntime/test/exceptions/Makefile

# remove tests which require gdb 8 for now (see https://github.com/dlang/ci/pull/291)
rm dmd/test/runnable/gdb{1,10311,14225,14276,14313,14330,4149}.d
rm dmd/test/runnable/gdb15729.sh

echo "--- Exporting build variables"

export BRANCH="${BUILDKITE_PULL_REQUEST_BASE_BRANCH:-}"
export N=2
export OS_NAME=linux
export FULL_BUILD="${BUILDKITE_PULL_REQUEST+false}"

echo "--- Go to dmd and source ci.sh"

cd dmd
source ci.sh

echo "--- Installing $DMD"
install_d "$DMD" # Source a D compiler

echo "--- Running the testsuite"
testsuite

0 comments on commit 79a3380

Please sign in to comment.