Repository navigation
132 lines (124 loc) · 5.77 KB
/
Copy pathci-macos-e2e.yml
File metadata and controls
132 lines (124 loc) · 5.77 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:
jobs:
e2e:
name: e2e suite ${{ matrix.shard }}/${{ matrix.shards }} (macOS ARM64, self-host, ${{ matrix.image }})
# The same two images as ci-macos.yml; `xcode-27` is macOS 27 (see there).
# While the line was on LLVM 22.1.8 the xcode-27 leg was known red
# (#669: the image's SDKs ship `arm64e.x1` .tbd stubs that ld64.lld 22.1.8
# cannot parse, llvm-project#222721) and ran as a single shard behind an
# input. The 23.1.3 line move removed the cause, so both images run the
# same two-shard suite on every pull request.
strategy:
fail-fast: false
matrix:
include:
- image: macos-15
shard: 1
shards: 2
- image: macos-15
shard: 2
shards: 2
- image: xcode-27
shard: 1
shards: 2
- image: xcode-27
shard: 2
shards: 2
runs-on: ${{ matrix.image }}
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}"
# The index payloads e2e 32, 33 and 40 link from this home into their
# own (_inherit_toolchain.sh); see ci-linux-e2e.yml.
XLINGS_HOME="$HOME/.mcpp/registry" "$MCPP_VENDORED_XLINGS" install \
mcpplibs:cmdline@0.0.1 mcpplibs:cmdline@0.0.2 -y
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"