Skip to content

Commit b01c94f

Browse files
author
xlings-ci
committed
probe: llvm row with and without the developer environment; clear the std cache before the std-only probe
1 parent 0aa0720 commit b01c94f

2 files changed

Lines changed: 26 additions & 7 deletions

File tree

‎.github/probe/mcpp_probes.sh‎

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# for #770 / #771 / #769 relies on. Prints; asserts nothing.
44
set -u
55
M="${MCPP_BUILT:?}"
6-
W="$RUNNER_TEMP/mcpp-probes"; rm -rf "$W"; mkdir -p "$W"
6+
W="$RUNNER_TEMP/mcpp-probes"; mkdir -p "$W"
77
run() { echo "\$ $*"; "$@" 2>&1; echo "rc=$?"; }
88
section() { echo; echo "### $1"; }
99
edges() { # the link edges of the generated build.ninja, with their link flags
@@ -33,6 +33,8 @@ PY
3333
}
3434
"$M" --version
3535

36+
MODE="${1:-all}"
37+
if [ "$MODE" = msvc ] || [ "$MODE" = all ]; then
3638
# ---------------------------------------------------------------- #771
3739
section "771 workspace member's shared library and its build.mcpp link_lib (msvc@system)"
3840
mkdir -p "$W/ws771/player/src" "$W/ws771/other/src"; cd "$W/ws771"
@@ -151,8 +153,12 @@ run "$M" build --release
151153
n=$(find target -name build.ninja | head -1); grep -n "GL\|LTCG\|flto" "$n" | head -5; echo "(grep done)"
152154

153155
# ---------------------------------------------------------------- #769 / D2
154-
section "D2 import std only: is std.compat compiled anyway?"
155-
mkdir -p "$W/stdonly/src"; cd "$W/stdonly"
156+
fi
157+
if [ "$MODE" = llvm ] || [ "$MODE" = all ]; then
158+
section "D2 import std only: is std.compat compiled anyway? (std cache cleared first)"
159+
echo "WindowsSdkDir=${WindowsSdkDir:-<unset>}"
160+
rm -rf "${MCPP_HOME:-$HOME/.mcpp}/build-cache/v1/std"
161+
rm -rf "$W/stdonly"; mkdir -p "$W/stdonly/src"; cd "$W/stdonly"
156162
cat > mcpp.toml <<'EOF'
157163
[package]
158164
name = "std-only"
@@ -175,7 +181,7 @@ find "${MCPP_HOME:-$HOME/.mcpp}" -path '*std.compat*' \( -name '*.pcm' -o -name
175181
echo "(compat artefacts listed above, if any)"
176182

177183
section "769 llvm + MSVC STL: import std.compat"
178-
mkdir -p "$W/compat/src"; cd "$W/compat"
184+
rm -rf "$W/compat"; mkdir -p "$W/compat/src"; cd "$W/compat"
179185
cat > mcpp.toml <<'EOF'
180186
[package]
181187
name = "std-compat-canary"
@@ -205,3 +211,4 @@ int main() {
205211
EOF
206212
run "$M" build
207213
run "$M" run
214+
fi

‎.github/workflows/probe-770-771.yml‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111

1212
jobs:
1313
msvc-facts:
14+
if: false # measured in run 37290831503; not repeated
1415
name: cl.exe / link.exe / lib.exe facts (/GL, /bigobj, /LTCG)
1516
runs-on: windows-latest
1617
timeout-minutes: 20
@@ -50,17 +51,28 @@ jobs:
5051
built=$(find target -type f -name mcpp.exe -path '*/bin/*' | head -1)
5152
mkdir -p dist && cp "$built" dist/mcpp.exe
5253
echo "MCPP_BUILT=$PWD/dist/mcpp.exe" >> "$GITHUB_ENV"
54+
- name: probe llvm row, plain environment (control)
55+
shell: bash
56+
run: |
57+
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
58+
bash .github/probe/mcpp_probes.sh llvm 2>&1 | tee probes-llvm-plain.log
5359
- uses: ilammy/msvc-dev-cmd@v1
5460
with:
5561
arch: x64
56-
- name: probe
62+
- name: probe cl.exe row (developer environment)
63+
shell: bash
64+
run: |
65+
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
66+
bash .github/probe/mcpp_probes.sh msvc 2>&1 | tee probes-msvc.log
67+
- name: probe llvm row, developer environment
5768
shell: bash
5869
run: |
5970
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
60-
bash .github/probe/mcpp_probes.sh 2>&1 | tee probes.log
71+
bash .github/probe/mcpp_probes.sh llvm 2>&1 | tee probes-llvm-devenv.log
72+
cat probes-llvm-plain.log probes-msvc.log probes-llvm-devenv.log > probes.log
6173
{ echo '## mcpp probes'; echo '```'; cat probes.log; echo '```'; } >> "$GITHUB_STEP_SUMMARY"
6274
- uses: actions/upload-artifact@v4
6375
if: always()
6476
with:
6577
name: mcpp-probes
66-
path: probes.log
78+
path: probes*.log

0 commit comments

Comments
 (0)