From 78895bbbd00952a65036f6f28ab0721d22970a4e Mon Sep 17 00:00:00 2001 From: Darius Neatu Date: Tue, 25 Jun 2024 02:40:51 +0300 Subject: [PATCH] Add scripts/test-all.sh used for local testing --- scripts/test-all.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 scripts/test-all.sh diff --git a/scripts/test-all.sh b/scripts/test-all.sh new file mode 100644 index 00000000..ee5dbda2 --- /dev/null +++ b/scripts/test-all.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +# Test all configurations: gcc-14, gcc-13, clang-18, clang-17. +# Expected to be run from the root of the project. +# Expected all configurations to be present in the CMakeLists.txt file and installed on the system. +# Usage: ./scripts/test-all.sh + +set -e +set -x + +# rm -rf .build + +cmake --workflow --preset gcc-14 &> /dev/null && echo "passed" || echo "gcc-14 test failed." +cmake --workflow --preset gcc-13 &> /dev/null && echo "passed" || echo "gcc-13 test failed." +cmake --workflow --preset clang-18 &> /dev/null && echo "passed" || echo "clang-18 test failed." +cmake --workflow --preset clang-17 &> /dev/null && echo "passed" || echo "clang-17 test failed." + +echo "All tests passed."