From e2ac68189eb9af50ee0c007c4b92072f9d1a8a66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Tue, 20 Dec 2022 11:32:17 +0200 Subject: [PATCH] specify bazel version + more tests add these toolchains: 1. toolchain-free (on-host gcc) 2. llvm without sysroot --- .bazelrc | 1 - .bazelversion | 1 + results/hyperfine.sh | 10 ++++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .bazelversion create mode 100755 results/hyperfine.sh diff --git a/.bazelrc b/.bazelrc index 4a0e9a7..c411a62 100644 --- a/.bazelrc +++ b/.bazelrc @@ -2,7 +2,6 @@ common --color=yes --curses=yes build --announce_rc build --incompatible_enable_cc_toolchain_resolution -build --action_env BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 build:hermetic-sandbox --experimental_use_hermetic_linux_sandbox build:hermetic-sandbox --sandbox_add_mount_pair=/bin diff --git a/.bazelversion b/.bazelversion new file mode 100644 index 0000000..8a30e8f --- /dev/null +++ b/.bazelversion @@ -0,0 +1 @@ +5.4.0 diff --git a/results/hyperfine.sh b/results/hyperfine.sh new file mode 100755 index 0000000..eebae70 --- /dev/null +++ b/results/hyperfine.sh @@ -0,0 +1,10 @@ +#!/bin/bash +set -x + +exec hyperfine \ + --export-markdown=results/hyperfine.md \ + --runs 5 \ + -L toolchain ,--extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux,--extra_toolchains=@llvm_toolchain_with_sysroot//:cc-toolchain-x86_64-linux,--platforms=@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.28 \ + -L sandbox_strategy "--spawn_strategy=local,--spawn_strategy=sandboxed --experimental_reuse_sandbox_directories,--spawn_strategy=sandboxed" \ + -p "bazel build {toolchain} {sandbox_strategy} //:zigzag-0; bazel clean; bazel shutdown" \ + "bazel build {toolchain} {sandbox_strategy} //..."