Restructure tests to all run in bazel
- add rules to run tests for a specific platform - use downloaded buildifier - move lint to a script - rename ci tasks - stop running under qemu-aarch64-static as it doesn't do anything
This commit is contained in:
32
ci/test
32
ci/test
@@ -1,34 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
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
|
||||
bazel test ...
|
||||
|
||||
Reference in New Issue
Block a user