Skip to content

Commit d66ddde

Browse files
committed
ci: assert structured ARM default toolchain facts
1 parent b9fb81f commit d66ddde

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

‎.github/tools/check_published_arm64_cn_ecosystem.sh‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,20 @@ project="${CN_PROBE_PROJECT:-hello}"
5454
"$MCPP" new "$project"
5555
cd "$work/$project"
5656
"$MCPP" build 2>&1 | tee "$work/native-default-build.log"
57-
grep -q 'Resolved llvm@23.1.3' "$work/native-default-build.log"
58-
grep -Eq 'aarch64-(unknown-)?linux-gnu' "$work/native-default-build.log"
57+
# Cold automatic provisioning and warm resolution have different progress
58+
# messages. Assert the documented build facts instead of a human log banner.
59+
"$MCPP" emit build-database --format json > "$work/native-build-database.json"
60+
python3 - "$work/native-build-database.json" "$project" "$MCPP_HOME" <<'PYDEFAULT'
61+
import json,pathlib,sys
62+
envelope=json.load(open(sys.argv[1]))
63+
assert envelope['kind']=='mcpp.build-database',envelope
64+
database=envelope['data']['database']
65+
selected=next(s for s in database['sets'] if s['name']==sys.argv[2])
66+
toolchain=database['ide']['toolchains'][selected['ide']['toolchain']]
67+
assert toolchain['family']=='clang' and toolchain['version']=='23.1.3',toolchain
68+
assert toolchain['target'] in ('aarch64-linux-gnu','aarch64-unknown-linux-gnu'),toolchain
69+
pathlib.Path(toolchain['driver']).resolve().relative_to(pathlib.Path(sys.argv[3]).resolve())
70+
PYDEFAULT
5971
mapfile -t native_bins < <(find target -type f -path "*/bin/$project")
6072
[[ "${#native_bins[@]}" == 1 ]] || exit 1
6173
readelf -hW "${native_bins[0]}" | tee "$work/native-header.txt"

‎.github/workflows/ci-arm64-published-cn.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
${{ env.XLINGS_HOME }}/reports/*.sha256
5959
${{ env.XLINGS_HOME }}/subos/cn-arm64-published/probes/runs/*/probe.log
6060
${{ env.XLINGS_HOME }}/subos/cn-arm64-published/probes/runs/*/*.txt
61+
${{ env.XLINGS_HOME }}/subos/cn-arm64-published/probes/runs/*/*.json
6162
${{ env.XLINGS_HOME }}/subos/cn-arm64-published/probes/runs/*/*.sha256
6263
${{ env.XLINGS_HOME }}/subos/cn-arm64-published/probes/runs/*/*.log
6364
${{ env.XLINGS_HOME }}/subos/cn-arm64-published/probes/runs/*/members.tsv

0 commit comments

Comments
 (0)