-
Notifications
You must be signed in to change notification settings - Fork 15
136 lines (127 loc) · 6.15 KB
/
Copy pathci-windows-e2e.yml
File metadata and controls
136 lines (127 loc) · 6.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: ci-windows-e2e
# The e2e suite on Windows x64, called by ci.yml beside ci-windows.yml after
# the Windows build. Three shards, assigned by measured duration
# (tests/e2e/timings/windows.tsv, rule R4 of the 2026-10-02 CI record): about
# fifteen tests of over thirty seconds took 58 to 64 percent of a round-robin
# shard, and the two shards differed by 3.6 minutes on average. Each shard runs
# the one binary build.yml produced (use-built-mcpp, rule R1) and writes the
# per-test report the e2e-coverage job of ci.yml reads.
#
# Paired workflows: ci-windows.yml, ci-linux-e2e.yml, ci-macos-e2e.yml.
on:
workflow_call:
jobs:
e2e:
name: e2e ${{ matrix.shard }}/3 (windows x64, self-host)
runs-on: windows-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
shard: [1, 2, 3]
env:
MCPP_HOME: C:\Users\runneradmin\.mcpp
# Round-robin slice of tests/e2e (see run_all.sh).
E2E_SHARD: ${{ matrix.shard }}/3
E2E_TIMINGS: tests/e2e/timings/windows.tsv
E2E_REPORT: ${{ github.workspace }}/e2e-report-windows-${{ matrix.shard }}.tsv
# NOTE: do NOT force MCPP_VERBOSE here. The e2e suite includes tests that
# assert mcpp's DEFAULT (quiet) output — e.g. 48_build_error_output and
# 53_namespaced_cache_label — which forced verbose would break.
steps:
# `submodules: recursive` so tests/e2e/233_bench_matrix.sh can check that
# each `hub`/`body` in bench/matrix.json exists in the tree it names --
# the check reads "submodule not initialised" without them and reports
# nothing, which is how a stale hub path survived (#599). Under 10 MB of
# source across the three pins, and nothing here builds them.
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ./.github/actions/bootstrap-mcpp
- uses: ./.github/actions/use-built-mcpp
with:
host: windows-x86_64
- name: Name this commit's mcpp MCPP_SELF
shell: bash
run: |
"$MCPP_FRESH" --version
echo "MCPP_SELF=$MCPP_FRESH" >> "$GITHUB_ENV"
# MinGW-w64 GCC (xim:mingw-gcc). Installed here so the `mingw` capability
# is GRANTED rather than left to whatever the shared sandbox cache happens
# to carry: e2e 256 packs an MSVC leg and a MinGW leg into one package,
# which is the only place `lib/` keyed by triple is proven with two
# DIFFERENT artifact names (mathkit.lib beside libmathkit.a). Without this
# step that test skips, and a skipped test in a green suite reads exactly
# like a passing one.
#
# Not `|| true`: if the payload cannot be installed the capability quietly
# disappears and the coverage goes with it, which is the failure mode this
# step exists to prevent.
- name: "Toolchain: MinGW payload for the fat-package e2e"
shell: bash
run: |
# The build job's prewarm installs `mingw 16.1.0` on `main` and saves
# it into the sandbox cache, so every PR restores a sandbox that
# already holds it. The install call is then a no-op but still pays
# the mcpp-toolchain startup cost; measured 68 s on three shards per
# PR. Skip the call when the payload is already reachable, and keep
# the verification that names the missing-capability case (the whole
# reason this step exists is so a skipped shard does not read like a
# passing one).
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
found=""
for c in "${MCPP_HOME:-$HOME/.mcpp}"/registry/data/xpkgs/xim-x-mingw-gcc/*/bin/g++.exe \
"$HOME"/.xlings/data/xpkgs/xim-x-mingw-gcc/*/bin/g++.exe; do
[[ -x "$c" ]] && { found="$c"; break; }
done
if [ -z "$found" ]; then
"$MCPP_SELF" toolchain install mingw 16.1.0
for c in "${MCPP_HOME:-$HOME/.mcpp}"/registry/data/xpkgs/xim-x-mingw-gcc/*/bin/g++.exe \
"$HOME"/.xlings/data/xpkgs/xim-x-mingw-gcc/*/bin/g++.exe; do
[[ -x "$c" ]] && { found="$c"; break; }
done
fi
# Verified through the SAME two locations run_all.sh probes — checking
# only one of them would let the step pass while the capability stays
# ungranted, which is the shape of a green run that tested nothing.
test -n "$found" || { echo "FAIL: mingw installed but not where run_all.sh looks"; exit 1; }
echo "mingw payload: $found"
- name: E2E suite
shell: bash
# About twice the shard's budget of fifteen minutes (R4): reached only by
# a hang. The per-test 600 s limit in run_all.sh names the test that hung.
timeout-minutes: 30
run: |
# MCPP_BOOT is the released bootstrap (use-built-mcpp). e2e 252 checks
# an older client against a package this commit produces, so it needs
# a real old binary.
export MCPP_BOOT
export MCPP="$MCPP_SELF"
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
export MCPP_E2E_TOOLCHAIN_MIRROR=GLOBAL
"$MCPP_SELF" self config --mirror GLOBAL
"$MCPP_SELF" toolchain default llvm@20.1.7
set -o pipefail
bash tests/e2e/run_all.sh 2>&1 | tee "$RUNNER_TEMP/e2e-suite.log"
# Measurement legs print READING lines (#646 F2 across PE images, #649 E10
# the llvm row's recorded CRT); collected where a reader finds them.
# One file, no glob: the report the e2e-coverage job of ci.yml reads.
- name: Upload the shard's report
if: always()
timeout-minutes: 5
uses: actions/upload-artifact@v4
with:
name: e2e-report-windows-${{ matrix.shard }}
path: e2e-report-windows-${{ matrix.shard }}.tsv
if-no-files-found: warn
retention-days: 7
- name: Measurement readings
if: always()
shell: bash
run: |
{
echo "### Measurement readings (Windows, shard ${{ matrix.shard }})"
echo '```'
grep -h '^READING' "$RUNNER_TEMP/e2e-suite.log" 2>/dev/null || echo "(none)"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"