-
Notifications
You must be signed in to change notification settings - Fork 15
132 lines (124 loc) · 6.46 KB
/
Copy pathci-macos-e2e.yml
File metadata and controls
132 lines (124 loc) · 6.46 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
name: ci-macos-e2e
# The e2e suite on macOS ARM64, called by ci.yml beside ci-macos.yml after the
# macOS build. Two shards, assigned by measured duration
# (tests/e2e/timings/macos.tsv, rule R4 of the 2026-10-02 CI record), each
# running the one binary build.yml produced (use-built-mcpp, rule R1), and
# each writing the per-test report the e2e-coverage job of ci.yml reads.
#
# The suite took about 3.5 minutes when this workflow was split out of
# ci-macos.yml, and it was not sharded for that reason. Measured on 2026-10-01
# it took 17 to 21 minutes in one job, and reached the 25-minute limit once.
#
# Paired workflows: ci-macos.yml, ci-linux-e2e.yml, ci-windows-e2e.yml.
on:
workflow_call:
inputs:
known-red:
description: >
Include the legs that are known red (#669). ci.yml passes true on
main, on dispatch and on a pull request labelled `macos-27` (rule R7).
type: boolean
required: false
default: true
jobs:
e2e:
name: e2e suite ${{ matrix.shard }}/${{ matrix.shards }} (macOS ARM64, self-host, ${{ matrix.image }}${{ matrix.known_red != '' && format(', known red {0}', matrix.known_red) || '' }})
# The same two images as ci-macos.yml; `xcode-27` is macOS 27 (see there).
# KNOWN RED on xcode-27, along with ci-macos.yml's own job: the image's
# Command Line Tools SDK ships an `arm64e.x1` .tbd stub ld64.lld 22.1.8
# cannot parse (fixed upstream, llvm-project#222721, not yet in a
# release). See mcpp-community/mcpp#669.
strategy:
fail-fast: false
matrix:
# macos-15 in two shards. The known-red leg is in the matrix only when
# the caller asks for it, and as one shard: it fails at its first link
# (#669), and two shards of it would hold two of the five macOS slots.
include: ${{ fromJSON(inputs.known-red && '[{"image":"macos-15","known_red":"","shard":1,"shards":2},{"image":"macos-15","known_red":"","shard":2,"shards":2},{"image":"xcode-27","known_red":"#669","shard":1,"shards":1}]' || '[{"image":"macos-15","known_red":"","shard":1,"shards":2},{"image":"macos-15","known_red":"","shard":2,"shards":2}]') }}
runs-on: ${{ matrix.image }}
# KNOWN RED, MACHINE-READABLY (the 2026-09-28 design, WS7). A leg whose
# failure has a tracked external cause carries that issue in `known_red`:
# the leg may fail without failing the workflow, its own result and log
# stay visible, and .github/tools/check_workflow_assertions.py requires
# the issue to be open. The leg leaves the list when #669 closes.
continue-on-error: ${{ matrix.known_red != '' }}
timeout-minutes: 60
env:
E2E_SHARD: ${{ matrix.shard }}/${{ matrix.shards }}
E2E_TIMINGS: tests/e2e/timings/macos.tsv
E2E_REPORT: ${{ github.workspace }}/e2e-report-${{ matrix.image == 'macos-15' && 'macos' || matrix.image }}-${{ matrix.shard }}.tsv
# NOTE: no MCPP_VERBOSE — the e2e suite asserts mcpp's default quiet
# output (tests 48/53).
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/setup-macos-llvm
with:
image: ${{ matrix.image }}
- uses: ./.github/actions/use-built-mcpp
with:
host: macos-arm64
- name: E2E suite
# Twice a shard's budget of about nine minutes (R4); the per-test 600 s
# limit in run_all.sh names a test that hangs.
timeout-minutes: 20
run: |
# MCPP is this commit's binary and MCPP_BOOT 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 MCPP_BOOT MCPP_VENDORED_XLINGS
test -x "$MCPP_VENDORED_XLINGS"
export MCPP_E2E_TOOLCHAIN_MIRROR=GLOBAL
"$MCPP" self config
# macOS default toolchain is LLVM
"$MCPP" toolchain default "llvm@${MCPP_LLVM_VER}"
echo "MCPP=$MCPP" >> "$GITHUB_ENV"
set -o pipefail
bash tests/e2e/run_all.sh 2>&1 | tee "$RUNNER_TEMP/e2e-suite.log"
# One file, no glob: the report the e2e-coverage job of ci.yml reads. A
# glob upload once hung a macOS job for ten minutes, and cancelling it lost
# the job's whole log.
- name: Upload the shard's report
if: always()
timeout-minutes: 5
uses: actions/upload-artifact@v4
with:
name: e2e-report-${{ matrix.image == 'macos-15' && 'macos' || matrix.image }}-${{ matrix.shard }}
path: e2e-report-${{ matrix.image == 'macos-15' && 'macos' || matrix.image }}-${{ matrix.shard }}.tsv
if-no-files-found: warn
retention-days: 7
# Measurement legs print READING lines and pass whatever they read; the
# readings are what a decision is taken from (#646 F2: whether a C++
# exception thrown in a dylib is caught by its class under the payload's
# default runtime), so they are collected where a reader finds them.
- name: Measurement readings
if: always()
shell: bash
run: |
{
echo "### Measurement readings (macOS)"
echo '```'
grep -h '^READING' "$RUNNER_TEMP/e2e-suite.log" 2>/dev/null || echo "(none)"
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
# #647 E3: an Android row links on a macOS host. Its own step, because the
# NDK is a large download the suite's per-test bound does not allow for,
# and the shard does not carry it (the script declares android-ndk).
- name: "Android row on a macOS host (721)"
# Once per image, not once per shard: the step installs the NDK.
if: matrix.shard == 1 # ci-lint: allow-r1: one NDK install per image; the shards share it
timeout-minutes: 30
shell: bash
run: |
set -o pipefail
export MCPP_VENDORED_XLINGS="$XLINGS_BIN"
export MCPP_E2E_TOOLCHAIN_MIRROR=GLOBAL
"$MCPP" toolchain install android-ndk@30.0.16248370
bash tests/e2e/721_*.sh 2>&1 | tee "$RUNNER_TEMP/721.log"
grep -q '^PASS: 721' "$RUNNER_TEMP/721.log"