Skip to content

ci: congestion control and qlog overrides for relay deploy #1427

ci: congestion control and qlog overrides for relay deploy

ci: congestion control and qlog overrides for relay deploy #1427

Workflow file for this run

name: ci pr
# PR verification: format + build/test matrix + the conformance grid.
# Main push uses ci-main.yml, which runs the same grid plus microbenchmarks,
# and adds publish/release/notify.
on:
pull_request:
# ready_for_review included so promoting a draft triggers the conformance
# jobs its draft gate skipped.
types: [opened, synchronize, reopened, ready_for_review]
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@v5
- name: Install clang-format
run: pip install clang-format==19.1.7
# format.sh pins the ruff version; uv is what fetches it.
- uses: astral-sh/setup-uv@v6
- 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
# Compile coverage for benchmark/: the microbenchmark job is main-only,
# so nothing else builds those TUs before merge.
extra_cmake: -DMOQX_BUILD_BENCHMARKS=ON
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. Full-stack instrumentation needs a prebuilt
# instrumented moxygen: openmoq/moqx#579.
# RelWithDebInfo: the prebuilt is NDEBUG and folly's kIsDebug is ABI.
- name: asan debug
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, build]
# Sized by memory, not cores. The self-hosted boxes are 16c/31GB;
# the heaviest test TUs peak near 2.3 GB of cc1plus RSS each
# under Debug+ASan. Worst-case concurrent footprint is 38 GB at
# -j16 and 34 GB at -j14, both of which OOM-kill the compiler.
# -j10 lands at ~25 GB, leaving headroom for the co-resident relay.
build_jobs: 10
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
# Ceiling for the from-source fallback, not the normal runtime (~28 min).
timeout-minutes: 180
env:
# Empty falls through to build.sh's own default (scripts/lib/jobs.sh).
MOQX_BUILD_JOBS: ${{ matrix.build_jobs || '' }}
steps:
- uses: actions/checkout@v5
- 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).
# Hit rate is the only way to tell a warm cache from a restored one.
- name: ccache stats
if: always()
run: ccache -s
- 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
- name: Upload harness logs
if: failure()
uses: actions/upload-artifact@v6
with:
name: harness-logs-${{ matrix.name }}
path: .scratch/moq_harness_logs/
if-no-files-found: ignore
retention-days: 7
# 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@v3
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]
# Drafts skip conformance to keep stack pushes cheap; promotion to ready
# runs it (ready_for_review trigger above).
if: ${{ !github.event.pull_request.draft }}
strategy:
fail-fast: false
matrix:
include:
- name: mvfst d16 Q
versions: "16"
transport: "Q"
stack: "mvfst"
- name: mvfst d16 WT
versions: "16"
transport: ""
stack: "mvfst"
- name: mvfst d18 Q
versions: "18"
transport: "Q"
stack: "mvfst"
- name: mvfst d18 WT
versions: "18"
transport: ""
stack: "mvfst"
- name: pico d16 Q
versions: "16"
transport: "Q"
stack: "pico"
- name: pico d16 WT
versions: "16"
transport: ""
stack: "pico"
- name: pico d18 Q
versions: "18"
transport: "Q"
stack: "pico"
- name: pico d18 WT
versions: "18"
transport: ""
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@v5
- 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
# Hit rate is the only way to tell a warm cache from a restored one.
- name: ccache stats
if: always()
run: ccache -s
- name: Run conformance tests
env:
SKIP_FETCH: 1
run: bash test/test_conformance.sh ./build/default/moqx ${{ matrix.versions }} ${{ matrix.transport }} ${{ matrix.stack }}