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
13 changes: 9 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -466,30 +466,35 @@ jobs:
persist-credentials: false
- uses: ./.github/actions/nix
- name: Rust cache
id: setup
uses: ./.github/actions/rust-cache
with:
access-key-id: ${{ secrets.MBX_R2_ACCESS_KEY_ID }}
secret-access-key: ${{ secrets.MBX_R2_SECRET_ACCESS_KEY }}
# Independent checks keep running after a failure; the job still finishes red.
- name: WebSocket fallback startup benchmark
run: nix develop --command just js qmux-bench

- name: Browser publisher fairness benchmark
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: nix develop --command just js serve-bench
shell: bash -leo pipefail {0}
- name: Raw audio encoding benchmark
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: nix develop --command just js raw-audio-bench
shell: bash -leo pipefail {0}
- name: Audio ring benchmark
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: nix develop --command just js ring-bench
shell: bash -leo pipefail {0}
- name: Native headless playback
if: ${{ !cancelled() }}
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: nix develop --command just test native-play
shell: bash -leo pipefail {0}
env:
HARNESS_RUNS: ${{ runner.temp }}/moq-test-runs
- name: Audio quality
if: ${{ !cancelled() }}
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: nix develop --command just test audio-quality --runtimes chromium --enforce --capture
shell: bash -leo pipefail {0}
env:
Expand All @@ -508,7 +513,7 @@ jobs:
# stall voids about one AAC row in seven, which would fail most nights until
# it is fixed. Kept beside the browser run so its ceilings can be re-measured.
- name: Native audio quality
if: ${{ !cancelled() }}
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
run: nix develop --command just test audio-quality --runtimes native
shell: bash -leo pipefail {0}
env:
Expand All @@ -517,7 +522,7 @@ jobs:
# The run directory is the diagnosis: each process's log, the shaper's
# counters, the raw samples, and every row's summary.
- name: Keep the run
if: ${{ !cancelled() }}
if: ${{ !cancelled() && steps.setup.outcome == 'success' }}
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: audio-quality-run
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,16 @@ jobs:
- name: Setup complete
id: setup
run: echo "Platform tools ready"
- name: Rust compile and tests
- name: Rust compile
if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.rs == 'true') }}
shell: bash
env:
CI_BASE: ${{ github.event_name != 'pull_request' && '--all' || '' }}
run: |
just rs windows "$CI_BASE"
just rs windows-test
run: just rs windows "$CI_BASE"
- name: Rust tests
if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.rs == 'true') }}
shell: bash
run: just rs windows-test
- name: C
if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.c == 'true') }}
shell: bash
Expand Down Expand Up @@ -159,13 +161,14 @@ jobs:
- name: Setup complete
id: setup
run: echo "Platform tools ready"
- name: Rust compile and tests
- name: Rust compile
if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.rs == 'true') }}
env:
CI_BASE: ${{ github.event_name != 'pull_request' && '--all' || '' }}
run: |
just rs macos "$CI_BASE"
just rs macos-test
run: just rs macos "$CI_BASE"
- name: Rust tests
if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.rs == 'true') }}
run: just rs macos-test
- name: Swift simulator check
if: ${{ !cancelled() && steps.setup.outcome == 'success' && (needs.scope.outputs.swift == 'true') }}
run: just swift simulator
Expand Down
6 changes: 2 additions & 4 deletions quest/m0/nightly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ children for the causes nothing owned.

This README's own work, after the children:

- Nightly's multi-step jobs (Features first) keep going past a failed step
and fail at the end, so one break never hides the steps after it.
- Confirm a scheduled run passes. Failures already owned elsewhere stay
there: the audio near-zero p95 row belongs to
- Confirm a scheduled run on `main` passes; never dispatch Nightly. Failures
already owned elsewhere stay there: the audio near-zero p95 row belongs to
[audio jitter target](/quest/m1/audio-jitter-target/README.md), the
macOS `receive_credit` timeout has no owner since its quest was deleted in
[moq-dev/moq#6732](https://github.com/moq-dev/moq/pull/6732), so plan one under
Expand Down
146 changes: 86 additions & 60 deletions rs/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,13 @@ windows $BASE="":

# Test the platform-sensitive crates on Windows, independent of the diff.
windows-test:
just rs test --manifest-path rs/moq-auth/Cargo.toml
just rs test -p kio -p hang -p moq-tokio -p moq-sock -p moq-relay
just rs test -p moq-video --no-default-features --features render -E 'test(/^render::export::/)'
#!/usr/bin/env bash
set -euo pipefail
source sh/checks.sh
run just rs test --manifest-path rs/moq-auth/Cargo.toml
run just rs test -p kio -p hang -p moq-tokio -p moq-sock -p moq-relay
run just rs test -p moq-video --no-default-features --features render -E 'test(/^render::export::/)'
finish

# Run io_uring tests when the branch affects the relay or its dependencies.
[positional-arguments]
Expand Down Expand Up @@ -144,14 +148,18 @@ macos $BASE="":

# Test the platform-sensitive crates on macOS, independent of the diff.
macos-test:
just rs test --manifest-path rs/moq-auth/Cargo.toml
just rs test -p kio -p hang -p moq-tokio -p moq-sock
just rs test -p moq-sock --features fast-apple-datapath
just rs test -p moq-video --no-default-features -E 'test(encode::backend::videotoolbox::tests)'
just rs test -p moq-video --no-default-features --features render -E 'test(/^render::export::/)'
#!/usr/bin/env bash
set -euo pipefail
source sh/checks.sh
run just rs test --manifest-path rs/moq-auth/Cargo.toml
run just rs test -p kio -p hang -p moq-tokio -p moq-sock
run just rs test -p moq-sock --features fast-apple-datapath
run just rs test -p moq-video --no-default-features -E 'test(encode::backend::videotoolbox::tests)'
run just rs test -p moq-video --no-default-features --features render -E 'test(/^render::export::/)'
# The runner's paravirtual Metal device proves the IOSurface import, ignored elsewhere.
just rs test -p moq-video --no-default-features --features render --lib --run-ignored only \
run just rs test -p moq-video --no-default-features --features render --lib --run-ignored only \
-E 'test(/^render::renderer::tests::(the_metal_import_matches_the_cpu_path|imports_survive_decoder_pool_recycling)$/)'
finish

# Compile and lint the capture and playback features, which the default check skips.
[positional-arguments]
Expand Down Expand Up @@ -237,26 +245,30 @@ c-tests:

# Compile the full feature matrix, including isolated combinations and their tests.
features:
just rs net-features --all
just rs coroutines
just rs quic-features --all
just rs crypto-key
just rs tokio-features --all
just rs media-features --all
bash sh/local.sh cargo check --locked --workspace {{ no_fuzz }} --all-targets --no-default-features
bash sh/local.sh cargo check --locked -p moq-relay --no-default-features
just rs relay-minimal
bash sh/local.sh cargo check --locked -p moq-cli --no-default-features
just rs test -p moq-cli --no-default-features --features capture,websocket -E 'test(capture_window)'
just rs test -p moq-cli --no-default-features --features capture,pipewire,websocket -E 'test(capture_window)'
bash sh/local.sh cargo check --locked -p moq-bench --no-default-features
bash sh/local.sh cargo check --locked -p moq-boy --no-default-features
#!/usr/bin/env bash
set -euo pipefail
source sh/checks.sh
run just rs net-features --all
run just rs coroutines
run just rs quic-features --all
run just rs crypto-key
run just rs tokio-features --all
run just rs media-features --all
run bash sh/local.sh cargo check --locked --workspace {{ no_fuzz }} --all-targets --no-default-features
run bash sh/local.sh cargo check --locked -p moq-relay --no-default-features
run just rs relay-minimal
run bash sh/local.sh cargo check --locked -p moq-cli --no-default-features
run just rs test -p moq-cli --no-default-features --features capture,websocket -E 'test(capture_window)'
run just rs test -p moq-cli --no-default-features --features capture,pipewire,websocket -E 'test(capture_window)'
run bash sh/local.sh cargo check --locked -p moq-bench --no-default-features
run bash sh/local.sh cargo check --locked -p moq-boy --no-default-features
# Alone, since the workspace's `kio/sim` dev-dependencies would unify `kio/async` back in.
bash sh/local.sh cargo check --locked --manifest-path rs/moq-auth/Cargo.toml --lib --all-features
bash sh/local.sh cargo check --locked -p moq-hls -p moq-rtmp -p moq-rtc --no-default-features --all-targets
bash sh/local.sh cargo clippy --locked --workspace {{ no_fuzz }} --all-targets --all-features -- -D warnings
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked --workspace {{ no_fuzz }} --all-features --no-deps
bash sh/rs/nextest.sh cargo nextest run --locked --workspace {{ no_fuzz }} --all-targets --all-features
run bash sh/local.sh cargo check --locked --manifest-path rs/moq-auth/Cargo.toml --lib --all-features
run bash sh/local.sh cargo check --locked -p moq-hls -p moq-rtmp -p moq-rtc --no-default-features --all-targets
run bash sh/local.sh cargo clippy --locked --workspace {{ no_fuzz }} --all-targets --all-features -- -D warnings
run env RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked --workspace {{ no_fuzz }} --all-features --no-deps
run bash sh/rs/nextest.sh cargo nextest run --locked --workspace {{ no_fuzz }} --all-targets --all-features
finish

# Compile and test the explicit-time model without async helpers or sessions.
[positional-arguments]
Expand All @@ -265,37 +277,46 @@ net-features *args:

# Prove the poll-only library builds compile no coroutines and document cleanly.
coroutines:
bash sh/rs/coroutines.sh kio -- --no-default-features --features macros,runtime,manual,serde
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p kio --no-deps --no-default-features --features macros,runtime,manual,serde
bash sh/rs/coroutines.sh moq-net -- --no-default-features
bash sh/rs/coroutines.sh moq-json -- --no-default-features
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-json --no-deps --no-default-features
bash sh/rs/coroutines.sh hang -- --no-default-features
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p hang --no-deps --no-default-features
bash sh/rs/coroutines.sh moq-mux -- --no-default-features
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-mux --no-deps --no-default-features
bash sh/rs/coroutines.sh moq-hls -- --no-default-features
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-hls --no-deps --no-default-features
bash sh/rs/coroutines.sh moq-room -- --no-default-features
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-room --no-deps --no-default-features
bash sh/rs/coroutines.sh moq-stats -- --no-default-features
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-stats --no-deps --no-default-features
bash sh/rs/coroutines.sh moq-crypto -- --no-default-features --features sign,e2ee,provider,serde
RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-crypto --no-deps --no-default-features --features sign,e2ee,provider,serde
bash sh/rs/coroutines.sh rs/moq-auth/Cargo.toml -- --no-default-features
#!/usr/bin/env bash
set -euo pipefail
source sh/checks.sh
run bash sh/rs/coroutines.sh kio -- --no-default-features --features macros,runtime,manual,serde
run env RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p kio --no-deps --no-default-features --features macros,runtime,manual,serde
run bash sh/rs/coroutines.sh moq-net -- --no-default-features
run bash sh/rs/coroutines.sh moq-json -- --no-default-features
run env RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-json --no-deps --no-default-features
run bash sh/rs/coroutines.sh hang -- --no-default-features
run env RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p hang --no-deps --no-default-features
run bash sh/rs/coroutines.sh moq-mux -- --no-default-features
run env RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-mux --no-deps --no-default-features
run bash sh/rs/coroutines.sh moq-hls -- --no-default-features
run env RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-hls --no-deps --no-default-features
run bash sh/rs/coroutines.sh moq-room -- --no-default-features
run env RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-room --no-deps --no-default-features
run bash sh/rs/coroutines.sh moq-stats -- --no-default-features
run env RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-stats --no-deps --no-default-features
run bash sh/rs/coroutines.sh moq-crypto -- --no-default-features --features sign,e2ee,provider,serde
run env RUSTDOCFLAGS="-D warnings" bash sh/local.sh cargo doc --locked -p moq-crypto --no-deps --no-default-features --features sign,e2ee,provider,serde
run bash sh/rs/coroutines.sh rs/moq-auth/Cargo.toml -- --no-default-features
finish

# Prove moq-crypto's key-only build, which moq-auth depends on, leaves out the transport and aws-lc-rs, then lint and test it alone; a workspace build unifies the default features back in.
crypto-key:
#!/usr/bin/env bash
set -euo pipefail
graph=$(cargo tree --locked -p moq-crypto --no-default-features --features serde -e normal --prefix none)
if grep -E '^(aws-lc-rs|moq-net) ' <<<"$graph"; then
echo "moq-crypto without sign or e2ee must not depend on moq-net or aws-lc-rs" >&2
exit 1
fi
bash sh/local.sh cargo clippy --locked -p moq-crypto --no-default-features --all-targets -- -D warnings
bash sh/local.sh cargo clippy --locked -p moq-crypto --no-default-features --features serde --all-targets -- -D warnings
bash sh/rs/nextest.sh cargo nextest run --locked -p moq-crypto --no-default-features --features serde
source sh/checks.sh
key_only_dependencies() {
graph=$(cargo tree --locked -p moq-crypto --no-default-features --features serde -e normal --prefix none) || return
if grep -E '^(aws-lc-rs|moq-net) ' <<<"$graph"; then
echo "moq-crypto without sign or e2ee must not depend on moq-net or aws-lc-rs" >&2
return 1
fi
}
run key_only_dependencies
run bash sh/local.sh cargo clippy --locked -p moq-crypto --no-default-features --all-targets -- -D warnings
run bash sh/local.sh cargo clippy --locked -p moq-crypto --no-default-features --features serde --all-targets -- -D warnings
run bash sh/rs/nextest.sh cargo nextest run --locked -p moq-crypto --no-default-features --features serde
finish

# Prove moq-quic leaves kio's dev-only clock runtime to its consumers, and lints without its default features; a workspace build unifies both back in.
[positional-arguments]
Expand All @@ -309,12 +330,17 @@ quic-features *args:
echo 'usage: just rs quic-features [--all]' >&2
exit 2
fi
graph=$(cargo tree --locked -p moq-quic -e normal --prefix none)
if grep -E '^tokio ' <<<"$graph"; then
echo "moq-quic must not depend on a native runtime" >&2
exit 1
fi
bash sh/local.sh cargo clippy --locked -p moq-quic "${targets[@]}" --no-default-features -- -D warnings
source sh/checks.sh
dependencies() {
graph=$(cargo tree --locked -p moq-quic -e normal --prefix none) || return
if grep -E '^tokio ' <<<"$graph"; then
echo "moq-quic must not depend on a native runtime" >&2
return 1
fi
}
run dependencies
run bash sh/local.sh cargo clippy --locked -p moq-quic "${targets[@]}" --no-default-features -- -D warnings
finish

# Compile media boundaries (--all isolates every mode) and prove expensive
# native/render dependencies are absent when their features are excluded.
Expand Down
15 changes: 15 additions & 0 deletions sh/checks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# shellcheck shell=bash
# Source this in a suite, run independent commands with run, then call finish.
# Functions passed to run must return errors explicitly: Bash suppresses their
# errexit inside an if condition. External commands keep their own error handling.
failed=()
run() {
echo "checks: $*"
if ! "$@"; then failed+=("$*"); fi
}
finish() {
if ((${#failed[@]})); then
printf 'checks: failed: %s\n' "${failed[@]}" >&2
return 1
fi
}
12 changes: 3 additions & 9 deletions sh/gh/nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ if [[ -n $report ]]; then
mkdir -p "$out/raw"
fi

failed=()
run() {
echo "nightly: $*"
if ! "$@"; then failed+=("$*"); fi
}
# shellcheck source=sh/checks.sh
source "$(dirname "${BASH_SOURCE[0]}")/../checks.sh"

criterion() {
local label=$1
Expand Down Expand Up @@ -202,10 +199,7 @@ case "$1" in
;;
esac

if ((${#failed[@]})); then
printf 'nightly: failed: %s\n' "${failed[@]}" >&2
exit 1
fi
finish

if [[ -n $report ]]; then
just gh benchmark-report "$report" "$out" "$out/report.json"
Expand Down
Loading
Loading