-
Notifications
You must be signed in to change notification settings - Fork 5
225 lines (202 loc) · 8.05 KB
/
Copy pathci-pr.yml
File metadata and controls
225 lines (202 loc) · 8.05 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
name: ci pr
# PR verification: format + build/test matrix.
# Main push uses ci-main.yml which adds publish/release/notify.
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
checks: write
jobs:
check-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang-format
run: pip install clang-format==19.1.7
- name: Check formatting
run: bash scripts/dev/format.sh --check
build:
needs: [check-format]
strategy:
fail-fast: false
matrix:
# `key` is the lane id (ccache keys, option gating); `name` renders into
# the status-check name. Renaming a lane branch protection requires stops
# that check reporting — update the ruleset in the same change.
include:
- name: linux
key: linux
preset: default
runner: ubuntu-22.04
# arm64 is validated by the publish-side docker build (ci-main publish
# arm64 entry); skipped here to avoid the ubuntu-runner ↔ bookworm-tarball
# glog ABI mismatch. arm64 regressions surface at main-push time.
- name: macos
key: macos
preset: default
runner: macos-15
# ASan on moqx's own TUs, over the uninstrumented prebuilt folly, for a
# fast PR signal; sanitizers.yml builds the instrumented stack.
# RelWithDebInfo: the prebuilt is NDEBUG and folly's kIsDebug is ABI.
- name: asan (moqx TUs, prebuilt deps)
key: asan
preset: san
extra_cmake: -DCMAKE_BUILD_TYPE=RelWithDebInfo
# The san preset demands an instrumented moxygen; this lane knowingly
# takes the uninstrumented one. Without it configure.sh refuses.
uninstrumented_deps: true
leak_check: true
runner: [self-hosted, linode]
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
# Ceiling for the from-source fallback, not the normal runtime (~28 min).
# Matched to sanitizers.yml, the only measured from-source budget we have.
timeout-minutes: 180
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build
with:
ccache-key: ${{ matrix.key }}
# The trilogy, not raw cmake: configure.sh picks the moxygen and build.sh
# resolves a job count, where Ninja's own nproc + 2 default OOMs the
# sanitizer lane. See BUILD.md#build.
- name: Build
env:
GITHUB_TOKEN: ${{ github.token }}
MOQX_ALLOW_UNINSTRUMENTED_DEPS: ${{ matrix.uninstrumented_deps && '1' || '' }}
run: |
scripts/configure.sh ${{ matrix.preset }} --moxygen prebuilt-with-fallback ${{ matrix.extra_cmake }}
scripts/build.sh ${{ matrix.preset }}
# test.sh, not raw ctest: it resolves the --parallel the suite needs (the
# shell integration tests carry unique ports so they can share a run).
- name: Test
env:
ASAN_OPTIONS: ${{ matrix.leak_check && 'detect_leaks=1:abort_on_error=1' || '' }}
run: scripts/test.sh ${{ matrix.preset }} --output-junit test-results.xml
# dorny/test-reporter writes a Check Run, which needs 'checks: write' on
# GITHUB_TOKEN. Fork-PR tokens are read-only regardless of workflow perms,
# so skip on cross-repo PRs. test-log output above still shows pass/fail.
- name: Publish test results
uses: dorny/test-reporter@v1.9.1
if: ${{ (success() || failure()) && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
with:
name: "test (${{ matrix.name }})"
path: build/${{ matrix.preset }}/test-results.xml
reporter: java-junit
fail-on-empty: ${{ job.status == 'success' && 'true' || 'false' }}
# Only list failing tests in the Check Run summary. Listing all
# passing tests too blows GitHub's 64 KiB output-body cap on large
# suites; the per-suite pass/fail counts at the top still render.
list-tests: failed
- name: Note fork-PR reporter skip
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository }}
run: |
echo "::notice::Publish test results skipped — fork-PR GITHUB_TOKEN lacks checks:write. Test-log output above is authoritative."
conformance:
needs: [check-format]
strategy:
fail-fast: false
matrix:
include:
# mvfst — both transports for d14 and d16. d14+WT was unblocked by
# facebookexperimental/moxygen#151 (Accept moq-00 in WT-Available-Protocols).
# pico — raw QUIC for d14 and d16. WT cells deferred until pico
# WT CONNECT (openmoq/moxygen#172 / PR #173) syncs in.
- name: mvfst d14 Q
versions: "14"
transport: "Q"
stack: "mvfst"
- name: mvfst d14 WT
versions: "14"
transport: ""
stack: "mvfst"
- name: mvfst d16 Q
versions: "16"
transport: "Q"
stack: "mvfst"
- name: mvfst d16 WT
versions: "16"
transport: ""
stack: "mvfst"
- name: pico d14 Q
versions: "14"
transport: "Q"
stack: "pico"
- name: pico d16 Q
versions: "16"
transport: "Q"
stack: "pico"
name: conformance (${{ matrix.name }})
runs-on: ubuntu-22.04
# Ceiling for the from-source fallback; see the build job.
timeout-minutes: 180
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build
with:
ccache-key: conformance
# Tests off: this job only drives the moqx binary; the ~25 gtest
# executables would link the heavy static stack for nothing.
- name: Build
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
scripts/configure.sh default --moxygen prebuilt-with-fallback -DMOQX_BUILD_TESTS=OFF
scripts/build.sh default
- name: Run conformance tests
run: bash test/test_conformance.sh ./build/default/moqx ${{ matrix.versions }} ${{ matrix.transport }} ${{ matrix.stack }}
microbenchmark:
needs: [check-format]
strategy:
fail-fast: false
matrix:
include:
- name: linux
runner: ubuntu-22.04
- name: macos
# Pinned to the moxygen publish runner: releases ship
# moxygen-macos-15-arm64.tar.gz and no macos-26 one, so macos-latest
# 404s. Keep in lockstep with the build job above.
runner: macos-15
name: microbenchmark (${{ matrix.name }})
runs-on: ${{ matrix.runner }}
# Ceiling for the from-source fallback; see the build job.
timeout-minutes: 180
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-build
with:
ccache-key: microbench
- name: Build microbenchmarks
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
scripts/configure.sh default --moxygen prebuilt-with-fallback \
-DMOQX_BUILD_BENCHMARKS=ON -DMOQX_BUILD_TESTS=OFF
scripts/build.sh default
- name: Run microbenchmarks
run: |
./build/default/benchmark/moqx_benchmark \
--bm_json_verbose=microbench-results.json \
| tee microbench-output.txt
- name: Render summary
if: always()
run: |
{
echo "## Microbenchmark results — ${{ matrix.name }}"
echo ""
echo '```'
cat microbench-output.txt
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- name: Upload microbenchmark artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: microbench-results-${{ matrix.name }}
path: |
microbench-results.json
microbench-output.txt