1
Fork 0
hermetic_cc_toolchain/ci/launcher

32 lines
784 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
# Copyright 2023 Uber Technologies, Inc.
# Licensed under the Apache License, Version 2.0
set -xeuo pipefail
2023-01-31 05:11:20 +02:00
ZIG=${ZIG:-$(bazel run "$@" --run_under=echo @zig_sdk//:zig)}
2023-01-31 04:01:01 +02:00
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
2023-02-24 12:01:49 +02:00
$ZIG fmt --check toolchain/launcher.zig
2023-02-24 11:53:10 +02:00
# until bazel-zig-cc gets a zig toolchain, run launcher's unit tests here.
$ZIG test toolchain/launcher.zig
# ReleaseSafe because of https://github.com/ziglang/zig/issues/14036
$ZIG test \
-OReleaseSafe \
-target x86_64-windows-gnu \
--test-cmd wine64-stable \
--test-cmd-bin \
toolchain/launcher.zig