move setup to .envrc
This commit is contained in:
parent
82053e2127
commit
bbb985362b
17
.build.yml
17
.build.yml
@ -9,36 +9,33 @@ environment:
|
|||||||
tasks:
|
tasks:
|
||||||
- setup: |
|
- setup: |
|
||||||
sudo apt-get purge gcc -y && sudo apt-get autoremove -y
|
sudo apt-get purge gcc -y && sudo apt-get autoremove -y
|
||||||
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-linux-amd64 \
|
|
||||||
-o bazel
|
|
||||||
chmod +x bazel
|
|
||||||
- test_default: |
|
- test_default: |
|
||||||
cd bazel-zig-cc; ./build-and-file \
|
cd bazel-zig-cc; . .envrc; ./build-and-file \
|
||||||
//test:hello | \
|
//test:hello | \
|
||||||
grep -q "ELF 64-bit.* x86-64.* dynamically linked"
|
grep -q "ELF 64-bit.* x86-64.* dynamically linked"
|
||||||
- test_x86_64-linux-gnu: |
|
- test_x86_64-linux-gnu: |
|
||||||
cd bazel-zig-cc; ./build-and-file \
|
cd bazel-zig-cc; . .envrc; ./build-and-file \
|
||||||
--platforms @io_bazel_rules_go//go/toolchain:linux_amd64_cgo //test:hello | \
|
--platforms @io_bazel_rules_go//go/toolchain:linux_amd64_cgo //test:hello | \
|
||||||
grep -q "ELF 64-bit.* x86-64.* dynamically linked"
|
grep -q "ELF 64-bit.* x86-64.* dynamically linked"
|
||||||
- test_x86_64-linux-musl: |
|
- test_x86_64-linux-musl: |
|
||||||
cd bazel-zig-cc; ./build-and-file \
|
cd bazel-zig-cc; . .envrc; ./build-and-file \
|
||||||
--platforms @io_bazel_rules_go//go/toolchain:linux_amd64_cgo \
|
--platforms @io_bazel_rules_go//go/toolchain:linux_amd64_cgo \
|
||||||
--extra_toolchains @zig_sdk//:x86_64-linux-musl_toolchain //test:hello | \
|
--extra_toolchains @zig_sdk//:x86_64-linux-musl_toolchain //test:hello | \
|
||||||
grep -q "ELF 64-bit.* x86-64.* statically linked"
|
grep -q "ELF 64-bit.* x86-64.* statically linked"
|
||||||
- test_aarch64-linux-gnu: |
|
- test_aarch64-linux-gnu: |
|
||||||
cd bazel-zig-cc; ./build-and-file \
|
cd bazel-zig-cc; . .envrc; ./build-and-file \
|
||||||
--platforms @io_bazel_rules_go//go/toolchain:linux_arm64_cgo //test:hello | \
|
--platforms @io_bazel_rules_go//go/toolchain:linux_arm64_cgo //test:hello | \
|
||||||
grep -q "ELF 64-bit.* ARM aarch64.* dynamically linked"
|
grep -q "ELF 64-bit.* ARM aarch64.* dynamically linked"
|
||||||
- test_aarch64-linux-musl: |
|
- test_aarch64-linux-musl: |
|
||||||
cd bazel-zig-cc; ./build-and-file \
|
cd bazel-zig-cc; . .envrc; ./build-and-file \
|
||||||
--platforms @io_bazel_rules_go//go/toolchain:linux_arm64_cgo \
|
--platforms @io_bazel_rules_go//go/toolchain:linux_arm64_cgo \
|
||||||
--extra_toolchains @zig_sdk//:aarch64-linux-musl_toolchain //test:hello | \
|
--extra_toolchains @zig_sdk//:aarch64-linux-musl_toolchain //test:hello | \
|
||||||
grep -q "ELF 64-bit.* ARM aarch64.* statically linked"
|
grep -q "ELF 64-bit.* ARM aarch64.* statically linked"
|
||||||
- test_x86_64-macos-gnu: |
|
- test_x86_64-macos-gnu: |
|
||||||
cd bazel-zig-cc; ./build-and-file \
|
cd bazel-zig-cc; . .envrc; ./build-and-file \
|
||||||
--platforms @io_bazel_rules_go//go/toolchain:darwin_amd64_cgo //test:hello | \
|
--platforms @io_bazel_rules_go//go/toolchain:darwin_amd64_cgo //test:hello | \
|
||||||
grep -q "Mach-O 64-bit x86_64 executable"
|
grep -q "Mach-O 64-bit x86_64 executable"
|
||||||
- test_aarch64-macos-gnu: |
|
- test_aarch64-macos-gnu: |
|
||||||
cd bazel-zig-cc; ./build-and-file \
|
cd bazel-zig-cc; . .envrc; ./build-and-file \
|
||||||
--platforms @io_bazel_rules_go//go/toolchain:darwin_arm64_cgo //test:hello | \
|
--platforms @io_bazel_rules_go//go/toolchain:darwin_arm64_cgo //test:hello | \
|
||||||
grep -q "Mach-O 64-bit arm64 executable"
|
grep -q "Mach-O 64-bit arm64 executable"
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# 'bazel' binary is stored in $HOME in builds.sr.ht.
|
# 'bazel' binary is stored in $HOME in builds.sr.ht.
|
||||||
export PATH=$PATH:$HOME
|
|
||||||
|
|
||||||
# -o pipefail fails `bazel aquery ...`: it errs if it can't output to stdout.
|
# -o pipefail fails `bazel aquery ...`: it errs if it can't output to stdout.
|
||||||
set -xeu
|
set -xeu
|
||||||
|
Loading…
Reference in New Issue
Block a user