From 77feead5a97dd4eab51165e1a3771cdd926e7892 Mon Sep 17 00:00:00 2001 From: Neil Henderson Date: Wed, 7 Feb 2024 16:13:09 +1000 Subject: [PATCH 1/2] CI run-tests script now prints the compiler version if we don't support it The `macos-13` runner has both Apple Clang 14 and 15 installed, and some CI workflow runs appear to use 15, causing spurious failures. --- regression-tests/run-tests.sh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/regression-tests/run-tests.sh b/regression-tests/run-tests.sh index 7cb539db92..aa57a0e495 100644 --- a/regression-tests/run-tests.sh +++ b/regression-tests/run-tests.sh @@ -131,22 +131,22 @@ if [[ "$cxx_compiler" == *"cl.exe"* ]]; then else compiler_cmd="$cxx_compiler -I../../../include -std=c++20 -pthread -o " - compiler_ver=$("$cxx_compiler" --version) - if [[ "$compiler_ver" == *"Apple clang version 14.0"* ]]; then + compiler_version=$("$cxx_compiler" --version) + if [[ "$compiler_version" == *"Apple clang version 14.0"* ]]; then exec_out_dir="$expected_results_dir/apple-clang-14" - elif [[ "$compiler_ver" == *"clang version 12.0"* ]]; then + elif [[ "$compiler_version" == *"clang version 12.0"* ]]; then exec_out_dir="$expected_results_dir/clang-12" - elif [[ "$compiler_ver" == *"clang version 15.0"* ]]; then + elif [[ "$compiler_version" == *"clang version 15.0"* ]]; then exec_out_dir="$expected_results_dir/clang-15" - elif [[ "$compiler_ver" == *"g++-10"* ]]; then + elif [[ "$compiler_version" == *"g++-10"* ]]; then exec_out_dir="$expected_results_dir/gcc-10" - elif [[ "$compiler_ver" == *"g++-12"* || - "$compiler_ver" == *"g++-13"* + elif [[ "$compiler_version" == *"g++-12"* || + "$compiler_version" == *"g++-13"* ]]; then exec_out_dir="$expected_results_dir/gcc-13" + else + printf "Unhandled compiler version:\n$compiler_version\n\n" fi - - compiler_version=$("$cxx_compiler" --version) fi if [[ -d "$exec_out_dir" ]]; then @@ -154,7 +154,8 @@ if [[ -d "$exec_out_dir" ]]; then printf "Directory with reference compilation/execution files to use:\n$exec_out_dir\n\n" else - printf "not found for compiler: '$cxx_compiler'\n\n" + printf "Directory with reference compilation/execution files not found for compiler: '$cxx_compiler'\n\n" + exit 2 fi ################ From 47612009609c6703408ce93e59907a013826c55e Mon Sep 17 00:00:00 2001 From: Neil Henderson Date: Wed, 7 Feb 2024 16:28:52 +1000 Subject: [PATCH 2/2] If the CI run-tests script finds Apple Clang 15 try and switch to 14 --- regression-tests/run-tests.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/regression-tests/run-tests.sh b/regression-tests/run-tests.sh index aa57a0e495..365626a4e9 100644 --- a/regression-tests/run-tests.sh +++ b/regression-tests/run-tests.sh @@ -130,8 +130,15 @@ if [[ "$cxx_compiler" == *"cl.exe"* ]]; then compiler_version=$(cl.exe) else compiler_cmd="$cxx_compiler -I../../../include -std=c++20 -pthread -o " - compiler_version=$("$cxx_compiler" --version) + + # We don't currently support Apple Clang 15 so try and switch to 14 + if [[ "$compiler_version" == *"Apple clang version 15.0"* ]]; then + printf "Found Apple Clang 15, attempting to switch to Apple Clang 14" + cxx_compiler=$(xcodebuild -find clang++) + compiler_version=$("$cxx_compiler" --version) + fi + if [[ "$compiler_version" == *"Apple clang version 14.0"* ]]; then exec_out_dir="$expected_results_dir/apple-clang-14" elif [[ "$compiler_version" == *"clang version 12.0"* ]]; then