1

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