Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/alert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ on:
workflow_run:
# Matched by workflow `name:`, not filename. Every workflow that can run
# outside a pull request belongs here; the pull-request-only ones (Check,
# macOS, Windows) are omitted so they don't spawn a skipped Alert run on
# every push to every PR. `just gh check` enforces both halves of that.
# Android) are omitted so they don't spawn a skipped Alert run on every
# push to every PR. `just gh check` enforces both halves of that.
#
# Swift is here despite also running on pull requests: it warms its own
# Rust cache on `main`, and that push run is nobody's check, so a break in
# it would otherwise go unseen. The cost is a skipped Alert run per Swift
# pull request.
# Swift and Platform are here despite also running on pull requests: Swift
# warms its own Rust cache on `main`, and Platform compiles every merge to
# `main` and `dev`. Those push runs are nobody's check, so a break in them
# would otherwise go unseen. The cost is a skipped Alert run per pull
# request.
workflows:
- apt-repo
- Cache
Expand All @@ -36,6 +37,7 @@ on:
- moq-gst
- moq-relay
- Nightly
- Platform
- release-brew
- Release Dart
- Release Dart FFI
Expand Down
82 changes: 1 addition & 81 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ name: Nightly
# that a PR gate can't justify for how rarely it catches something. `obs` is
# diff-independent because its PR-time counterpart can't be: obs.yml has to
# name the paths that can break an external link to libmoq.a, and no list of
# paths covers every one of them (see the comment there). `windows` and `macos`
# are diff-independent because what they catch is a whole target's worth of
# `#[cfg(target_os = ...)]` code that no Linux job compiles at all, and those
# runners are throttled too hard to gate every PR on.
# paths covers every one of them (see the comment there).
#
# The `release-*` jobs are diff-independent because the release workflows only
# ever run on a tag: a change that compiles under plain cargo can still break a
Expand Down Expand Up @@ -283,80 +280,3 @@ jobs:
name: fuzz-${{ matrix.target }}
path: rs/moq-net/fuzz/artifacts/
if-no-files-found: ignore

# `just rs windows` is the only thing that compiles moq-video's Media
# Foundation capture/encode/decode, its D3D11 frames, and every
# `#[cfg(target_os = "windows")]` test module. The Linux gate skips all of it,
# so without this the code compiles for the first time in a tag-triggered
# release build, and the test targets never compile at all.
#
# A separate job rather than a step because it needs a Windows host and the
# runner-native toolchain: Nix doesn't run here. No Swatinem cache either. The
# repository cache budget is 10 GB, cache.yml spends it warming the Linux
# target/ that every pull request restores, and a once-a-day job shouldn't
# evict that to save itself a few minutes.
windows:
name: Windows
runs-on: windows-latest
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

# aws-lc-rs assembles its x86_64 crypto with NASM on Windows.
- name: Install NASM
shell: pwsh
run: |
choco install nasm -y --no-progress
"C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

# Pinned: `--locked` fixes just's own dependencies, not which version of
# just cargo selects.
- name: Install just
shell: bash
run: cargo install --locked just@1.52.0

- name: Check
shell: bash
run: just rs windows

# `just rs macos` is the only thing that compiles moq-video's VideoToolbox
# encode/decode and its ScreenCaptureKit / AVFoundation capture, plus
# moq-audio's ScreenCaptureKit system audio and its TCC permission pre-check.
# The Linux gate skips all of it. moq-video has a release-time backstop, since
# libmoq's `libmoq-v*` tag build compiles it on Apple Silicon, but moq-audio
# has none: libmoq and moq-ffi take it codecs-only, so no release build ever
# compiles its capture backend.
#
# Same shape as `windows` and for the same reasons: a separate job because it
# needs an Apple host and the runner-native toolchain, and no Swatinem cache
# because a once-a-day job shouldn't evict the Linux `target/` that every pull
# request restores. swift.yml already compiles moq-ffi here, so this stays
# scoped to the two crates holding the Apple-gated code.
macos:
name: macOS
runs-on: macos-latest
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

# Pinned: `--locked` fixes just's own dependencies, not which version of
# just cargo selects.
- name: Install just
run: cargo install --locked just@1.52.0

- name: Check
run: just rs macos
136 changes: 136 additions & 0 deletions .github/workflows/platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
name: Platform

# Compiles the workspace on Windows and macOS, the `#[cfg(...)]` code no Linux
# job compiles at all: moq-video's Media Foundation and VideoToolbox backends,
# their capture paths, moq-audio's ScreenCaptureKit capture, and the smaller
# platform branches elsewhere. It also builds the OBS plugin against the
# obs-deps bundle, which obs.yml can't do on Linux. Without this, a change that
# breaks any of them (a moq-net type they consume, say) merges green and
# compiles for the first time in a tag-triggered release build.
#
# Unfiltered, unlike android.yml: every job still finishes before check.yml, so
# a path list tracking the dependency graphs of all that code isn't worth it.
#
# Pushes to `main` and `dev` catch the break two individually green PRs make
# once both land, which is what the nightly run of these jobs used to cover.
# `dev` never ran the nightly at all.
#
# Outside Nix, like android.yml: neither runner has it, so each installs the
# runner-native toolchain. rust-toolchain.toml still pins the compiler, and the
# recipes are the same ones a developer runs on that OS.
#
# No Rust cache. The repository's 10 GB budget is spent on the Linux `target/`
# that cache.yml warms for every pull request, and a Windows or macOS store
# would evict it to save these jobs a few minutes.

permissions:
contents: read

on:
push:
branches: [main, dev]
pull_request:
# `closed` is here only so merging/closing a PR cancels its in-flight run
# via the concurrency group below; the jobs themselves are skipped on close.
types: [opened, synchronize, reopened, closed]

concurrency:
# Keyed by event, so a merged pull request's `closed` run can't cancel the push
# run it triggers. Pull requests key by number rather than ref, since a merged
# PR's `closed` run can report the base branch as its ref instead of the PR's
# merge ref, and then wouldn't cancel the PR's in-flight run.
group: platform-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
JUST_VERSION: 1.52.0

jobs:
windows:
name: Windows
if: github.event.action != 'closed'
runs-on: windows-latest
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

# aws-lc-rs assembles its x86_64 crypto with NASM on Windows.
- name: Install NASM
shell: pwsh
run: |
choco install nasm -y --no-progress
"C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

# Pinned: `--locked` fixes just's own dependencies, not which version of
# just cargo selects.
- name: Install just
shell: bash
run: cargo install --locked "just@$JUST_VERSION"

- name: Check
shell: bash
run: just rs windows

macos:
name: macOS
if: github.event.action != 'closed'
runs-on: macos-latest
timeout-minutes: 60

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

- name: Install just
run: cargo install --locked "just@$JUST_VERSION"

- name: Check
run: just rs macos

# The release build of the OBS plugin, minus the published libmoq: build.sh
# without `--libmoq-release` links the in-tree rs/libmoq instead, so a PR is
# checked against its own C ABI. The obs-deps bundle (libobs, Qt6, ffmpeg)
# comes from buildspec.json at configure time, same as a tag build.
obs:
name: OBS (${{ matrix.name }})
if: github.event.action != 'closed'
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- name: macOS
target: aarch64-apple-darwin
os: macos-latest
- name: Windows
target: x86_64-pc-windows-msvc
# The plugin preset uses the Visual Studio 17 2022 generator.
os: windows-2022

steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Install Rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable

- name: Build
shell: bash
env:
TARGET: ${{ matrix.target }}
run: ./cpp/obs/build.sh --target "$TARGET" --output "$RUNNER_TEMP/obs"
8 changes: 4 additions & 4 deletions cpp/obs/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ compile:
# Compile and link the plugin the way CI does, against the dev shell's own
# libobs/Qt6/ffmpeg, then run the unit tests. Linux-only in practice: it's the
# one platform where nixpkgs has obs-studio, so nothing has to be downloaded.
# Manual elsewhere, like `just rs macos`.
# Manual elsewhere.
#
# The tests run here without ThreadSanitizer because this is the only recipe CI
# invokes (.github/workflows/obs.yml). `just obs test` is manual, so on its own
Expand Down Expand Up @@ -223,9 +223,9 @@ _includes:
# Unit-test the plugin sources against stubbed libobs/libmoq/ffmpeg, under
# ThreadSanitizer.
#
# Manual, like `just rs macos` and `just rs windows`, because ThreadSanitizer
# needs its own build. `just obs ci` runs the same tests without it, so a
# regression these assertions catch still turns PR CI red; the sanitizer is what
# Manual because ThreadSanitizer needs its own build. `just obs ci` runs the
# same tests without it, so a regression these assertions catch still turns PR
# CI red; the sanitizer is what
# adds the races on top. Run this whenever you touch src/, especially the session
# callback plumbing, whose orderings the build can't check.
test:
Expand Down
2 changes: 1 addition & 1 deletion quest/m1/audio-codecs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ready now.
## Related

- [OBS native codecs](/quest/m1/obs-moq-video/README.md) - the OBS source and encoder adapters consume this through moq-ffi; #3498 narrowed OBS to what moq-audio decodes today
- [Runtime QA hosts](/quest/m2/runtime-qa-hosts.md) - Windows and Android verification needs a host; the Windows and macOS CI gates run nightly, not per PR
- [Runtime QA hosts](/quest/m2/runtime-qa-hosts.md) - Windows and Android verification needs a host; the Windows and macOS CI gates only compile
- [Dart codec parity](/quest/m1/dart-codecs.md) - Dart gains these once it builds with the `audio` feature
- [Media Foundation decode](/quest/m2/audio-decode-mediafoundation.md) - Windows decodes HE-AAC, multichannel AAC, and what else the MFTs offer
- [Media Foundation encode](/quest/m2/audio-encode-mediafoundation.md) - Windows encodes AAC-LC
Expand Down
1 change: 0 additions & 1 deletion quest/m1/tooling/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ requires the one before it, so they land as one line of pull requests.
## Required

- [Thin justfiles](/quest/m1/tooling/justfiles.md) - recipe bodies move to `sh/`, one impact map scopes check/fix/test, self-tests and guards are deleted
- [Windows cross-check](/quest/m1/tooling/windows-cross-check.md) - a Linux cross-check of moq-video for Windows runs per PR when moq-video is selected
- [Workflows call just](/quest/m1/tooling/workflows-call-just.md) - no workflow `run:` step names a `.sh`; every script a workflow needs has a recipe
- [Binary release workflow](/quest/m1/tooling/release-binary.md) - moq-cli and moq-relay share one reusable workflow behind two thin callers
- [FFI release workflow](/quest/m1/tooling/release-ffi.md) - the five `release-*-ffi.yml` share the moq-ffi target matrix and artifact staging
36 changes: 0 additions & 36 deletions quest/m1/tooling/windows-cross-check.md

This file was deleted.

2 changes: 1 addition & 1 deletion quest/m2/audio-decode-mediafoundation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ones. Behind the decode seam as the first candidate on `target_os =
not advertised on that host, not an error at decode time.
- Fixtures and layout-order tests as in the AudioToolbox quest.
- Verification runs on a Windows host; the per-PR CI only compiles the
platform code, and `just rs windows` runs nightly.
platform code (`just rs windows`).

## Required

Expand Down
2 changes: 1 addition & 1 deletion rs/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ Prefer poll. New logic is a `poll_*` with an `async` helper, not the other way a
- Tests are inline `#[cfg(test)] mod tests`. Time-dependent async tests call `tokio::time::pause()` first, unless they cross real networking that can't be mocked (sockets, smoke tests); those run on the wall clock and assert lower bounds.
- Run tests through `just` (nextest), not `cargo test`: nextest kills a wedged test as TIMEOUT, cargo hangs forever. A test flagged SLOW is a bug to fix, not a threshold to raise.
- `just check` compiles default features only, like CI. `just rs features` (nightly) covers `--all-features` / `--no-default-features`. Keep a feature gate around the dependency, not the logic, so the logic's tests stay in the merge gate.
- Local checks compile only the host platform; `just rs windows` / `macos` must run on that OS and `just rs wasm` covers `moq-wasm`. Say plainly in the PR when platform code is uncompiled.
- Local checks compile only the host platform; PR CI runs `just rs windows` / `macos` on those hosts, and `just rs wasm` covers `moq-wasm`.
Loading
Loading