1
Fork 0

add diagnostics

This commit is contained in:
Motiejus Jakštys 2021-06-10 18:51:59 +03:00 committed by Motiejus Jakštys
parent 61491dac5e
commit 20931794d1
2 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,7 @@
image: debian/testing
packages:
- curl
- file
sources:
- https://git.sr.ht/~motiejus/bazel-zig-cc
environment:
@ -17,18 +18,22 @@ tasks:
cd bazel-zig-cc; ../bazel run \
--platforms @zig_sdk//:x86_64-linux-gnu \
//test:gognu
file $(./getpath @zig_sdk//:x86_64-linux-gnu //test:gognu)
- test_x86_64-linux-musl: |
cd bazel-zig-cc; ../bazel run \
--platforms @zig_sdk//:x86_64-linux-musl \
//test:gomusl
file $(./getpath @zig_sdk//:x86_64-linux-musl //test:gomusl)
- test_aarch64-linux-gnu: |
cd bazel-zig-cc; ../bazel build \
--platforms @zig_sdk//:aarch64-linux-gnu \
//test:gognu
file $(./getpath @zig_sdk//:aarch64-linux-gnu //test:gognu)
- test_aarch64-linux-musl: |
cd bazel-zig-cc; ../bazel build \
--platforms @zig_sdk//:aarch64-linux-musl \
//test:gomusl
file $(./getpath @zig_sdk//:aarch64-linux-musl //test:gomusl)
#- test_macos-gnu: |
# cd bazel-zig-cc; ../bazel build --toolchain_resolution_debug=true \
# --platforms @zig_sdk//:x86_64-macos-gnu \

6
getpath Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
exec bazel aquery \
--platforms "$1" "$2" 2>/dev/null | \
awk "/action 'GoLink/{f=1};/Outputs: / &&f{print;exit}" | \
awk -F'\\[|\\]' '{print $2}'