1
Fork 0
hermetic_cc_toolchain/.build.yml

45 lines
2.0 KiB
YAML
Raw Normal View History

2021-06-08 06:30:06 +03:00
image: debian/testing
packages:
2021-09-07 10:50:16 +03:00
- direnv
2021-06-10 18:51:59 +03:00
- file
2021-06-08 06:30:06 +03:00
sources:
- https://git.sr.ht/~motiejus/bazel-zig-cc
environment:
2021-06-08 06:33:06 +03:00
CC: /usr/bin/false
2021-06-08 06:30:06 +03:00
tasks:
- setup: |
2021-06-19 12:14:19 +03:00
sudo apt-get purge gcc -y && sudo apt-get autoremove -y
- test_list_toolchains: |
cd bazel-zig-cc; . .envrc; echo "Available toolchains:"
bazel query @zig_sdk//... | sed -En '/.*_toolchain$/ s/.*:(.*)_toolchain$/\1/p'
- test_default: |
2021-06-28 14:00:47 +03:00
cd bazel-zig-cc; . .envrc; ./build-and-file \
2021-06-19 16:45:33 +03:00
//test:hello | \
grep -q "ELF 64-bit.* x86-64.* dynamically linked"
- test_amd64-linux-gnu: |
2021-06-28 14:00:47 +03:00
cd bazel-zig-cc; . .envrc; ./build-and-file \
--platforms @io_bazel_rules_go//go/toolchain:linux_amd64_cgo //test:hello | \
grep -q "ELF 64-bit.* x86-64.* dynamically linked"
- test_amd64-linux-musl: |
2021-06-28 14:00:47 +03:00
cd bazel-zig-cc; . .envrc; ./build-and-file \
--platforms @io_bazel_rules_go//go/toolchain:linux_amd64_cgo \
2021-07-21 14:53:39 +03:00
--extra_toolchains @zig_sdk//:linux_amd64_musl_toolchain //test:hello | \
2021-06-19 16:45:33 +03:00
grep -q "ELF 64-bit.* x86-64.* statically linked"
- test_arm64-linux-gnu: |
cd bazel-zig-cc; . .envrc; ./build-and-file \
--platforms @io_bazel_rules_go//go/toolchain:linux_arm64_cgo //test:hello | \
grep -q "ELF 64-bit.* ARM aarch64.* dynamically linked"
- test_arm64-linux-musl: |
2021-06-28 14:00:47 +03:00
cd bazel-zig-cc; . .envrc; ./build-and-file \
--platforms @io_bazel_rules_go//go/toolchain:linux_arm64_cgo \
2021-07-21 14:53:39 +03:00
--extra_toolchains @zig_sdk//:linux_arm64_musl_toolchain //test:hello | \
2021-06-19 16:45:33 +03:00
grep -q "ELF 64-bit.* ARM aarch64.* statically linked"
- test_amd64-macos: |
2021-06-28 14:00:47 +03:00
cd bazel-zig-cc; . .envrc; ./build-and-file \
--platforms @io_bazel_rules_go//go/toolchain:darwin_amd64_cgo //test:hello | \
2021-06-19 16:45:33 +03:00
grep -q "Mach-O 64-bit x86_64 executable"
- test_arm64-macos-gnu: |
2021-06-28 14:00:47 +03:00
cd bazel-zig-cc; . .envrc; ./build-and-file \
--platforms @io_bazel_rules_go//go/toolchain:darwin_arm64_cgo //test:hello | \
2021-06-19 16:45:33 +03:00
grep -q "Mach-O 64-bit arm64 executable"