Repository navigation
147 lines (136 loc) · 6.13 KB
/
Copy pathci-macos-e2e.yml
File metadata and controls
147 lines (136 loc) · 6.13 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
137
138
139
140
141
142
143
144
145
146
name: ci-macos-e2e
# The e2e suite on macOS ARM64, called by ci.yml beside ci-macos.yml after the
# macOS build. Shards as ci.yml's plan gives them (design 2026-11-12 §5.11), by measured duration
# (by mtest, from the measured history of main's stores; 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.
# On 2026-10-23 the two-shard split measured 13 and 20 minutes (macos-15); the
# second shard reached its 20-minute limit, so the suite runs in three.
#
# Paired workflows: ci-macos.yml, ci-linux-e2e.yml, ci-windows-e2e.yml.
on:
workflow_call:
inputs:
set:
description: the set of cases (`pr` or `full`; ci.yml's changes job)
type: string
default: full
shards:
description: the shards of this host (`mtest ci plan`), a JSON list
type: string
default: '[1,2,3]'
count:
description: how many shards the list holds
type: string
default: '3'
work:
description: whether the set gives this host any case
type: boolean
default: true
jobs:
e2e:
name: e2e suite ${{ matrix.shard }}/${{ inputs.count }} (macOS ARM64, self-host, ${{ matrix.image }})
if: inputs.work
strategy:
fail-fast: false
matrix:
image: [macos-15, xcode-27]
shard: ${{ fromJSON(inputs.shards) }}
runs-on: ${{ matrix.image }}
timeout-minutes: 60
env:
E2E_SHARD: ${{ matrix.shard }}/${{ inputs.count }}
# By mtest (design 2026-11-08 W8; .github/actions/e2e-mtest), as on Linux.
E2E_JOBS: '2'
E2E_SET: ${{ inputs.set == 'pr' && 'pr' || '' }}
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
- uses: ./.github/actions/e2e-mtest
with:
host: ${{ matrix.image == 'macos-15' && 'macos' || matrix.image }}
- 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"
# The shard's run as Markdown in the job's summary (mtest report).
- name: The shard's report
if: always()
shell: bash
run: |
[ -n "${E2E_MTEST:-}" ] || exit 0
(cd tests/e2e && "$E2E_MTEST" report --format md --group "$GITHUB_RUN_ID") >> "$GITHUB_STEP_SUMMARY" \
|| echo "::warning::no e2e run of this workflow run in the store"
# The shard's store: main's are the history the next runs divide the suite by.
- name: Upload the shard's store
if: always()
timeout-minutes: 5
uses: actions/upload-artifact@v4
with:
name: e2e-store-${{ matrix.image == 'macos-15' && 'macos' || matrix.image }}-${{ matrix.shard }}
path: tests/e2e/.mtest
include-hidden-files: true
if-no-files-found: ignore
retention-days: 14
# 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"