Merge branch 'laurynasl_libc'
This commit is contained in:
9
ci/lint
Executable file
9
ci/lint
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
REPO_ROOT=$(git rev-parse --show-toplevel)
|
||||
cd "$REPO_ROOT"
|
||||
|
||||
# shellcheck disable=SC2046
|
||||
shellcheck -x $(awk '/#!\/bin\/(ba)?sh/&&FNR==1{print FILENAME}' $(git ls-files))
|
||||
find . \( -name 'WORKSPACE' -o -name 'BUILD' -o -name '*.bzl' \) -exec buildifier {} +
|
||||
15
ci/list_toolchains_platforms
Executable file
15
ci/list_toolchains_platforms
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
indent() { sed 's/^/ /'; }
|
||||
|
||||
echo "Available toolchains:"
|
||||
bazel query --noshow_progress '@zig_sdk//toolchain:*' | indent
|
||||
echo "Available platforms:"
|
||||
bazel query --noshow_progress '@zig_sdk//platform:*' | indent
|
||||
echo "Available libc aware toolchains:"
|
||||
bazel query --noshow_progress '@zig_sdk//libc_aware/toolchain:*' | indent
|
||||
echo "Available libc aware platforms:"
|
||||
bazel query --noshow_progress '@zig_sdk//libc_aware/platform:*' | indent
|
||||
echo "Available libc variants:"
|
||||
bazel query --noshow_progress "attr(constraint_setting, @zig_sdk//libc:variant, @zig_sdk//...)" | indent
|
||||
35
ci/test
35
ci/test
@@ -1,34 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
#!/bin/sh
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
. .envrc
|
||||
|
||||
_run() {
|
||||
>&2 echo
|
||||
>&2 echo " $*"
|
||||
>&2 echo
|
||||
"$@"
|
||||
}
|
||||
|
||||
while read -r action platform toolchain config; do
|
||||
args=("$@")
|
||||
if [[ $config != : ]]; then
|
||||
args+=(--config="$config")
|
||||
fi
|
||||
|
||||
args+=(\
|
||||
--platforms "@zig_sdk//platform:${platform}" \
|
||||
--extra_toolchains "@zig_sdk//toolchain:${toolchain}" \
|
||||
//test/... \
|
||||
)
|
||||
|
||||
_run bazel "$action" "${args[@]}"
|
||||
|
||||
done <<EOF
|
||||
test linux_amd64 linux_amd64_musl :
|
||||
test linux_amd64 linux_amd64_gnu.2.19 :
|
||||
test linux_arm64 linux_arm64_musl qemu-aarch64
|
||||
test linux_arm64 linux_arm64_gnu.2.28 qemu-aarch64
|
||||
build darwin_amd64 darwin_amd64 :
|
||||
EOF
|
||||
exec bazel test ...
|
||||
|
||||
Reference in New Issue
Block a user