af9360366b
- ci only: use a separate zig cache dir for each run - use `tools/bazel` everywhere. - remove arm64 tests. They don't give enough value to be worth the brittle environment. - remove windows execution, except for launcher. Ditto. I will probably bring them back.
28 lines
748 B
Bash
Executable File
28 lines
748 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright 2023 Uber Technologies, Inc.
|
|
# Licensed under the Apache License, Version 2.0
|
|
|
|
set -xeuo pipefail
|
|
|
|
echo "--- which zig"
|
|
ZIG=${ZIG:-$(tools/bazel run "$@" --run_under=echo @zig_sdk//:zig)}
|
|
|
|
echo "--- compile launcher.zig for various architectures"
|
|
for target in \
|
|
aarch64-linux-gnu.2.19 \
|
|
aarch64-macos-none \
|
|
x86_64-linux-gnu.2.19 \
|
|
x86_64-macos-none \
|
|
x86_64-windows-gnu
|
|
do
|
|
$ZIG build-exe -fno-emit-bin -target $target toolchain/launcher.zig
|
|
done
|
|
|
|
echo "--- zig fmt --check toolchain/launcher.zig"
|
|
$ZIG fmt --check toolchain/launcher.zig
|
|
|
|
echo "--- zig test toolchain/launcher.zig"
|
|
# until bazel-zig-cc gets a zig toolchain, run launcher's unit tests here.
|
|
$ZIG test toolchain/launcher.zig
|