From 1cac78c4794ba5f4aa41eeb4a5cb6b83630fa7d7 Mon Sep 17 00:00:00 2001 From: Geod24 Date: Mon, 1 Mar 2021 14:06:32 +0900 Subject: [PATCH] Add a test for Phobos compiled with -preview=in --- buildkite.sh | 2 ++ buildkite/build_project.sh | 20 +++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/buildkite.sh b/buildkite.sh index 9fa5471..228cafe 100755 --- a/buildkite.sh +++ b/buildkite.sh @@ -116,6 +116,7 @@ projects=( "vibe-d/vibe.d+base" # 4m31s "dlang/phobos" # 4m50s "dlang/phobos+no-autodecode" + "dlang/phobos+preview-in" "sociomantic-tsunami/ocean" # 4m49s "sociomantic-tsunami/swarm" "sociomantic-tsunami/turtle" @@ -193,6 +194,7 @@ memory_req["sociomantic-tsunami/ocean"]=high memory_req["dlang/dlang-bot"]=high memory_req["dlang/phobos"]=high memory_req["dlang/phobos+no-autodecode"]=high +memory_req["dlang/phobos+preview-in"]=high memory_req["dlang/dub"]=high memory_req["higgsjs/Higgs"]=high memory_req["d-language-server/dls"]=high diff --git a/buildkite/build_project.sh b/buildkite/build_project.sh index 5114097..e0ded48 100755 --- a/buildkite/build_project.sh +++ b/buildkite/build_project.sh @@ -45,6 +45,7 @@ case "$REPO_FULL_NAME" in "dlang/druntime" | \ "dlang/phobos" | \ "dlang/phobos+no-autodecode" | \ + "dlang/phobos+preview-in" | \ "dlang/tools" | \ "dlang/dub" | \ "dlang/ci") @@ -60,7 +61,8 @@ case "$REPO_FULL_NAME" in "dlang/dmd" | \ "dlang/druntime" | \ "dlang/phobos" | \ - "dlang/phobos+no-autodecode") + "dlang/phobos+no-autodecode" | \ + "dlang/phobos+preview-in") ref_to_use="IS-ALREADY-CHECKED-OUT" ;; *) @@ -307,6 +309,22 @@ case "$REPO_FULL_NAME" in rm -rf "$TMP" ;; + dlang/phobos+preview-in) + "$DIR"/clone_repositories.sh + # To avoid running into "Path too long" issues, see e.g. https://github.com/dlang/ci/pull/287 + export TMP="/tmp/${BUILDKITE_AGENT_NAME}" + export TEMP="$TMP" + export TMPDIR="$TMP" + rm -rf "$TMP" && mkdir -p "$TMP" + # 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 + # Append `-preview=in` to DMD's config file so druntime / Phobos are built with it + sed 's/^DFLAGS=.*/& -preview=in/' $(find dmd/generated/ -name 'dmd.conf') + make -C druntime -j2 -f posix.mak + cd phobos && make -f posix.mak clean && make -f posix.mak -j2 buildkite-test + rm -rf "$TMP" + ;; + d-language-server/dls) # https://github.com/dlang/ci/issues/360 # dub's .editorconfig influences the behavior of dfmt