2021-10-18 15:12:31 +03:00
|
|
|
#!/bin/bash
|
|
|
|
set -euo pipefail
|
2022-02-03 22:38:43 +02:00
|
|
|
|
2021-10-18 15:12:31 +03:00
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
. .envrc
|
|
|
|
|
2022-02-03 18:01:32 +02:00
|
|
|
_run() {
|
2022-02-03 22:38:43 +02:00
|
|
|
>&2 echo
|
2022-02-03 18:01:32 +02:00
|
|
|
>&2 echo " $*"
|
2022-02-03 22:38:43 +02:00
|
|
|
>&2 echo
|
2022-02-03 18:01:32 +02:00
|
|
|
"$@"
|
|
|
|
}
|
|
|
|
|
2022-02-08 14:22:21 +02:00
|
|
|
while read -r action platform toolchain config; do
|
2022-02-03 22:38:43 +02:00
|
|
|
args=("$@")
|
2022-02-08 14:22:21 +02:00
|
|
|
if [[ $config != : ]]; then
|
|
|
|
args+=(--config="$config")
|
2021-10-18 15:12:31 +03:00
|
|
|
fi
|
2022-02-04 10:09:32 +02:00
|
|
|
|
|
|
|
args+=(\
|
2022-04-06 22:16:53 +03:00
|
|
|
--platforms "@zig_sdk//platform:${platform}" \
|
2022-02-04 10:09:32 +02:00
|
|
|
--extra_toolchains "@zig_sdk//:${toolchain}_toolchain" \
|
|
|
|
//test/... \
|
|
|
|
)
|
|
|
|
|
2022-02-05 06:12:41 +02:00
|
|
|
_run bazel "$action" "${args[@]}"
|
2022-02-04 10:09:32 +02:00
|
|
|
|
2022-02-03 22:38:43 +02:00
|
|
|
done <<EOF
|
2022-02-05 06:12:41 +02:00
|
|
|
test linux_amd64 linux_amd64_musl :
|
|
|
|
test linux_amd64 linux_amd64_gnu.2.19 :
|
2022-02-08 14:22:21 +02:00
|
|
|
test linux_arm64 linux_arm64_musl qemu-aarch64
|
|
|
|
test linux_arm64 linux_arm64_gnu.2.28 qemu-aarch64
|
2022-02-05 06:12:41 +02:00
|
|
|
build darwin_amd64 darwin_amd64 :
|
2022-02-03 22:38:43 +02:00
|
|
|
EOF
|