diff --git a/.github/workflows/alert.yml b/.github/workflows/alert.yml index 36769cf5b69..940ceabbf4e 100644 --- a/.github/workflows/alert.yml +++ b/.github/workflows/alert.yml @@ -18,14 +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, - # 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. + # Release gate, and what only it calls, like 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, OBS, and Platform are here despite also running on pull requests: # Swift warms its own Rust cache on `main`, and OBS and Platform build 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. + # would otherwise go unseen. workflows: - apt-repo - Cache diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 44c6e807a4d..fdfe3fb6a39 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -11,38 +11,16 @@ name: Android # recipe is still `just rs android`, so a local run and this one compile the # same thing, and rust-toolchain.toml still pins the compiler. # -# Narrow trigger, like wasm.yml. The filter is moq-video's in-repo dependency -# graph (`cargo metadata`, normal dependencies), plus the files that decide how -# it is built. A crate added to that graph has to be added here too. +# Narrow trigger, like wasm.yml. release-gate.yml's filter is moq-video's +# in-repo dependency graph (`cargo metadata`, normal dependencies), plus the +# files that decide how it is built. A crate added to that graph has to be +# added there too. permissions: contents: read on: - pull_request: - # `closed` is here only so merging/closing a PR cancels its in-flight run - # via the concurrency group below; the job itself is skipped on close. - types: [opened, synchronize, reopened, closed] - paths: - - "rs/moq-video/**" - - "rs/moq-mux/**" - - "rs/moq-net/**" - - "rs/moq-nvenc/**" - - "rs/moq-loc/**" - - "rs/moq-msf/**" - - "rs/moq-json/**" - - "rs/moq-binary/**" - - "rs/moq-flate/**" - - "rs/moq-pattern/**" - - "rs/hang/**" - - "rs/kio/**" - - "rs/justfile" - - "justfile" - - ".cargo/config.toml" - - "Cargo.toml" - - "Cargo.lock" - - "rust-toolchain.toml" - - ".github/workflows/android.yml" + workflow_call: concurrency: group: android-${{ github.ref }} @@ -54,7 +32,6 @@ env: jobs: android: name: Android - if: github.event.action != 'closed' # x86_64 rather than the arm runners check.yml uses: GitHub documents the # Android SDK and NDK as preinstalled on this image. runs-on: ubuntu-24.04 diff --git a/.github/workflows/audio-quality.yml b/.github/workflows/audio-quality.yml index 1ad4af43cc9..df0fc4adb7a 100644 --- a/.github/workflows/audio-quality.yml +++ b/.github/workflows/audio-quality.yml @@ -5,18 +5,7 @@ name: Audio quality # consumer and rings on a simulated clock, so they are deterministic and take # seconds, unlike the browser rows, which stay in nightly.yml. on: - pull_request: - paths: - - "js/watch/**" - # The container consumer decides what a replay delivers, waits for, and skips, on the - # groups, tracks, and signals underneath it. - - "js/hang/**" - - "js/net/**" - - "js/signals/**" - - "test/audio-quality/**" - - "test/lib/**" - - "test/justfile" - - ".github/workflows/audio-quality.yml" + workflow_call: concurrency: group: audio-quality-${{ github.ref }} diff --git a/.github/workflows/interop.yml b/.github/workflows/interop.yml index 74a22e98bd1..e039d303fb1 100644 --- a/.github/workflows/interop.yml +++ b/.github/workflows/interop.yml @@ -11,21 +11,8 @@ on: # Nightly: catch an interop regression in the current tree before a user does. schedule: - cron: "0 8 * * *" - # On PRs that touch the harness itself, so a change to the interop test is - # validated before it merges. Source regressions still surface nightly. - pull_request: - paths: - - "test/lib/**" - - "test/interop/**" - # The TS/IRD compliance harness runs in the same job (see below). - - "test/ts/**" - # The interop job also depends on the recipe that invokes it and the - # workspace membership that links the JS clients to source. - - "test/justfile" - - "package.json" - # The Go client builds against the modules this script stages. - - "sh/go/**" - - ".github/workflows/interop.yml" + # release-gate.yml, on PRs that touch the harness. + workflow_call: concurrency: group: interop-${{ github.ref }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a39c2997942..78967caba4b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -8,9 +8,9 @@ name: Nightly # different reason: it compiles the workspace at feature sets that share almost # no artifacts with the default one, which is several minutes of duplicate work # 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). +# diff-independent because its PR-time counterpart can't be: release-gate.yml's +# OBS filter 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 obs.yml). # # 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 @@ -150,8 +150,8 @@ jobs: # The OBS plugin and libmoq's C fixtures are the only things that link # libmoq.a from outside cargo, so a stale `rs/libmoq/native-libs/*.txt` - # breaks them and nothing else. obs.yml lists the inputs that can do that, - # but a list of paths can't be complete: a build script emitting + # breaks them and nothing else. release-gate.yml's OBS filter lists the + # inputs that can do that, but a list of paths can't be complete: a build script emitting # `cargo::rustc-link-lib` needs no manifest change, and widening that # filter to `rs/**` would run a link on nearly every PR. Being # diff-independent, this run covers whatever the filter misses, at the diff --git a/.github/workflows/obs.yml b/.github/workflows/obs.yml index 53e3de4a7db..e24322e067c 100644 --- a/.github/workflows/obs.yml +++ b/.github/workflows/obs.yml @@ -38,8 +38,8 @@ name: OBS # A list of paths still can't be complete here -- a vendored C source or a # .cargo/config.toml could do it too -- and `rs/**` would run this on nearly # every PR, which is the cost that removed the Windows and macOS gates (#2600). -# So this filter covers the likely inputs at PR time, and pushes to `main` and -# `dev` rebuild on any Rust or plugin change to cover the rest. nightly.yml also +# So release-gate.yml's filter covers the likely inputs at PR time, and pushes +# to `main` and `dev` rebuild on any Rust or plugin change to cover the rest. nightly.yml also # runs the Linux recipe diff-independently. permissions: @@ -60,28 +60,12 @@ on: - "flake.nix" - "flake.lock" - ".github/workflows/obs.yml" - pull_request: - # `closed` is here only so merging/closing a PR cancels its in-flight run - # via the concurrency group below; the job itself is skipped on close. - types: [opened, synchronize, reopened, closed] - paths: - - "cpp/obs/**" - - "sh/obs/**" - - "rs/libmoq/**" - - "doc/lib/c/**" - - "doc/lib/samples.sh" - - "rs/**/Cargo.toml" - - "rs/**/build.rs" - - "Cargo.toml" - - "Cargo.lock" - - "rust-toolchain.toml" - - "flake.nix" - - "flake.lock" - - ".github/workflows/obs.yml" + # Pull requests, through release-gate.yml. + workflow_call: -# Keyed and cancelled like platform.yml: a merged PR's `closed` run must not -# cancel the push run it triggers, and `main` merges faster than a push run -# finishes, so pushes queue rather than cancel. +# Keyed and cancelled like platform.yml: a PR's run must not cancel a push run, +# and `main` merges faster than a push run finishes, so pushes queue rather +# than cancel. concurrency: group: obs-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: ${{ github.event_name == 'pull_request' }} @@ -89,7 +73,6 @@ concurrency: jobs: build: name: OBS - if: github.event.action != 'closed' runs-on: ubuntu-24.04-arm timeout-minutes: 60 @@ -136,7 +119,6 @@ jobs: # comes from buildspec.json at configure time, same as a tag build. release: name: OBS (${{ matrix.name }}) - if: github.event.action != 'closed' runs-on: ${{ matrix.os }} timeout-minutes: 60 strategy: diff --git a/.github/workflows/platform.yml b/.github/workflows/platform.yml index 819d731bb63..b1906b26de0 100644 --- a/.github/workflows/platform.yml +++ b/.github/workflows/platform.yml @@ -36,25 +36,11 @@ on: - "justfile" - "sh/**" - ".github/workflows/platform.yml" - 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] - paths: - - "rs/**" - - ".cargo/**" - - "Cargo.toml" - - "Cargo.lock" - - "rust-toolchain.toml" - - "justfile" - - "sh/**" - - ".github/workflows/platform.yml" + # Pull requests, through release-gate.yml. + workflow_call: 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. + # Keyed by event, so a pull request's run can't cancel a push run. group: platform-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }} # Pushes queue instead: `main` merges faster than these jobs finish, so # cancelling meant almost no push run ever reported. Actions keeps only the @@ -64,7 +50,6 @@ concurrency: jobs: windows: name: Windows - if: github.event.action != 'closed' runs-on: windows-latest timeout-minutes: 60 @@ -96,7 +81,6 @@ jobs: macos: name: macOS - if: github.event.action != 'closed' runs-on: macos-latest timeout-minutes: 60 diff --git a/.github/workflows/release-dart-ffi.yml b/.github/workflows/release-dart-ffi.yml index 4e75507115c..7037aafe304 100644 --- a/.github/workflows/release-dart-ffi.yml +++ b/.github/workflows/release-dart-ffi.yml @@ -12,17 +12,6 @@ on: # workflow this way so a broken build surfaces before the tag is cut. workflow_call: workflow_dispatch: - # Packaging changes only, like the other FFI release workflows. A change to - # the moq-ffi sources is covered on every platform by cheaper gates: check.yml - # compiles it and regenerates the Dart bindings, platform.yml and swift.yml - # compile it for macOS, Windows, and iOS, and nightly runs this full matrix. - pull_request: - paths: - - ".github/workflows/release-dart-ffi.yml" - - ".github/workflows/release-ffi.yml" - - "dart/moq_ffi/**" - - "sh/dart/**" - - "rs/moq-ffi/build.sh" permissions: contents: read diff --git a/.github/workflows/release-dart.yml b/.github/workflows/release-dart.yml index 3578ae386c2..1bc1fa7877f 100644 --- a/.github/workflows/release-dart.yml +++ b/.github/workflows/release-dart.yml @@ -8,11 +8,9 @@ on: push: tags: - "moq-dart-v*" - pull_request: - paths: - - ".github/workflows/release-dart.yml" - - "dart/moq/**" - - "sh/dart/**" + # Dry-run: check the source package, publish nothing. Only a tag push + # publishes; release-gate.yml calls this on pull requests. + workflow_call: permissions: contents: read diff --git a/.github/workflows/release-gate.yml b/.github/workflows/release-gate.yml new file mode 100644 index 00000000000..96c5ab97565 --- /dev/null +++ b/.github/workflows/release-gate.yml @@ -0,0 +1,329 @@ +name: Release gate + +# Every optional workflow a PR into `release` must pass, behind one required +# context. `release` has no merge queue, so its ruleset requires `Check` and +# `Release gate`. +# +# Each workflow keeps the paths that select it, here rather than in its own +# trigger, so a workflow the diff skips still reports through this gate instead +# of never reporting and blocking the PR forever. +permissions: + contents: read + +on: + pull_request: + branches: [release] + # `closed` only cancels an in-flight run. `edited` runs the gate when a main + # PR is retargeted to release. Any edit reruns it, since a skipped rerun + # would post a passing context over a failed one. + types: [opened, synchronize, reopened, edited, closed] + +concurrency: + group: release-gate-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + scope: + name: Scope + if: github.event.action != 'closed' + runs-on: ubuntu-24.04-arm + timeout-minutes: 10 + outputs: + android: ${{ steps.filter.outputs.android }} + audio-quality: ${{ steps.filter.outputs.audio-quality }} + interop: ${{ steps.filter.outputs.interop }} + obs: ${{ steps.filter.outputs.obs }} + platform: ${{ steps.filter.outputs.platform }} + release-dart: ${{ steps.filter.outputs.release-dart }} + release-dart-ffi: ${{ steps.filter.outputs.release-dart-ffi }} + release-go-ffi: ${{ steps.filter.outputs.release-go-ffi }} + release-js: ${{ steps.filter.outputs.release-js }} + release-kt-lib: ${{ steps.filter.outputs.release-kt-lib }} + release-swift-lib: ${{ steps.filter.outputs.release-swift-lib }} + swift: ${{ steps.filter.outputs.swift }} + wasm: ${{ steps.filter.outputs.wasm }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + fetch-depth: 0 + # Diff with git against the merge base: the REST file list a token would + # use stops at 3,000 files, which a cut can exceed. + - uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 + id: filter + with: + token: "" + base: ${{ github.base_ref }} + filters: | + android: + - "rs/moq-video/**" + - "rs/moq-mux/**" + - "rs/moq-net/**" + - "rs/moq-nvenc/**" + - "rs/moq-loc/**" + - "rs/moq-msf/**" + - "rs/moq-json/**" + - "rs/moq-binary/**" + - "rs/moq-flate/**" + - "rs/moq-pattern/**" + - "rs/hang/**" + - "rs/kio/**" + - "rs/justfile" + - "justfile" + - ".cargo/config.toml" + - "Cargo.toml" + - "Cargo.lock" + - "rust-toolchain.toml" + - ".github/workflows/android.yml" + audio-quality: + - "js/watch/**" + # The container consumer decides what a replay delivers, waits for, and skips, on the + # groups, tracks, and signals underneath it. + - "js/hang/**" + - "js/net/**" + - "js/signals/**" + - "test/audio-quality/**" + - "test/lib/**" + - "test/justfile" + - ".github/workflows/audio-quality.yml" + # A change to the harness itself; source regressions surface nightly. + interop: + - "test/lib/**" + - "test/interop/**" + # The TS/IRD compliance harness runs in the same job. + - "test/ts/**" + # The interop job also depends on the recipe that invokes it and the + # workspace membership that links the JS clients to source. + - "test/justfile" + - "package.json" + # The Go client builds against the modules this script stages. + - "sh/go/**" + - ".github/workflows/interop.yml" + obs: + - "cpp/obs/**" + - "sh/obs/**" + - "rs/libmoq/**" + - "doc/lib/c/**" + - "doc/lib/samples.sh" + - "rs/**/Cargo.toml" + - "rs/**/build.rs" + - "Cargo.toml" + - "Cargo.lock" + - "rust-toolchain.toml" + - "flake.nix" + - "flake.lock" + - ".github/workflows/obs.yml" + platform: + - "rs/**" + - ".cargo/**" + - "Cargo.toml" + - "Cargo.lock" + - "rust-toolchain.toml" + - "justfile" + - "sh/**" + - ".github/workflows/platform.yml" + release-dart: + - ".github/workflows/release-dart.yml" + - "dart/moq/**" + - "sh/dart/**" + # Packaging changes only, like the other FFI release workflows. A + # change to the moq-ffi sources is covered on every platform by + # cheaper gates: Check compiles it and regenerates the Dart + # bindings, Platform and Swift compile it for macOS, Windows, and + # iOS, and nightly runs this full matrix. + release-dart-ffi: + - ".github/workflows/release-dart-ffi.yml" + - ".github/workflows/release-ffi.yml" + - "dart/moq_ffi/**" + - "sh/dart/**" + - "rs/moq-ffi/build.sh" + release-go-ffi: + - ".github/workflows/release-go-ffi.yml" + - ".github/workflows/release-ffi.yml" + - ".github/workflows/release-shared-ffi.yml" + - "sh/gh/ffi*" + - "sh/gh/release.sh" + - "go/ffi/**" + - "sh/go/package-ffi.sh" + - "sh/go/publish-ffi.sh" + - "rs/moq-ffi/build.sh" + release-js: + - "js/**" + - ".github/workflows/release-js.yml" + release-kt-lib: + - "kt/moq/**" + - "kt/gradle.properties" + - "kt/build.gradle.kts" + - "kt/settings.gradle.kts" + - ".github/workflows/release-kt-lib.yml" + - "sh/gh/release.sh" + - "rs/moq-ffi/build.sh" + release-swift-lib: + - "swift/VERSION" + - "swift/Package.swift.template" + - "swift/Sources/Moq/**" + - "swift/Tests/**" + - "sh/swift/package.sh" + - "sh/swift/publish.sh" + - "sh/swift/verify.sh" + - ".github/workflows/release-swift-lib.yml" + - "sh/gh/release.sh" + swift: + - "swift/**" + - "sh/swift/**" + - "doc/lib/swift/**" + - "doc/lib/samples.sh" + - "rs/moq-ffi/**" + - "rs/moq-video/**" + - "Cargo.lock" + - ".github/workflows/swift.yml" + wasm: + - "rs/moq-wasm/**" + - "rs/moq-net/**" + - "rs/kio/**" + - "js/wasm/**" + - "test/wasm/**" + - "test/lib/**" + - "justfile" + - "js/justfile" + - "test/justfile" + - ".cargo/config.toml" + - "package.json" + - "bun.lock" + - "Cargo.toml" + - "Cargo.lock" + - "rust-toolchain.toml" + - "flake.nix" + - "flake.lock" + - ".github/workflows/wasm.yml" + + android: + name: Android + needs: scope + if: needs.scope.outputs.android == 'true' + uses: ./.github/workflows/android.yml + + audio-quality: + name: Audio quality + needs: scope + if: needs.scope.outputs.audio-quality == 'true' + uses: ./.github/workflows/audio-quality.yml + + interop: + name: Interop + needs: scope + if: needs.scope.outputs.interop == 'true' + uses: ./.github/workflows/interop.yml + permissions: + contents: read + id-token: write + + obs: + name: OBS + needs: scope + if: needs.scope.outputs.obs == 'true' + uses: ./.github/workflows/obs.yml + + # Selects the crates to compile from the diff itself. + platform: + name: Platform + needs: scope + if: needs.scope.outputs.platform == 'true' + uses: ./.github/workflows/platform.yml + + swift: + name: Swift + needs: scope + if: needs.scope.outputs.swift == 'true' + uses: ./.github/workflows/swift.yml + + wasm: + name: WASM + needs: scope + if: needs.scope.outputs.wasm == 'true' + uses: ./.github/workflows/wasm.yml + + # The release workflows as dry-runs: they gate publishing on a tag or a push + # and get no secrets. A caller grants every permission a nested job declares, + # skipped or not, so these carry the release-time grants that nothing here + # uses. + release-dart: + name: Release Dart + needs: scope + if: needs.scope.outputs.release-dart == 'true' + uses: ./.github/workflows/release-dart.yml + permissions: + contents: read + id-token: write + + release-dart-ffi: + name: Release Dart FFI + needs: scope + if: needs.scope.outputs.release-dart-ffi == 'true' + uses: ./.github/workflows/release-dart-ffi.yml + permissions: + contents: write + id-token: write + + release-go-ffi: + name: Release Go FFI + needs: scope + if: needs.scope.outputs.release-go-ffi == 'true' + uses: ./.github/workflows/release-go-ffi.yml + + release-js: + name: Release JS + needs: scope + if: needs.scope.outputs.release-js == 'true' + uses: ./.github/workflows/release-js.yml + permissions: + contents: read + id-token: write + + release-kt-lib: + name: Release Kotlin lib + needs: scope + if: needs.scope.outputs.release-kt-lib == 'true' + uses: ./.github/workflows/release-kt-lib.yml + permissions: + contents: read + actions: read + + release-swift-lib: + name: Release Swift Lib + needs: scope + if: needs.scope.outputs.release-swift-lib == 'true' + uses: ./.github/workflows/release-swift-lib.yml + # Its publisher check reads upstream run jobs. + permissions: + contents: read + actions: read + + gate: + # The one context the release ruleset requires. Skipped jobs pass it; a + # failed scope fails it, rather than skipping what it would have selected. + # `always()` also runs it in a cancelled run, so a rerun on `edited` cannot + # leave a skipped, passing context on the same commit while it runs. + name: Release gate + needs: + - scope + - android + - audio-quality + - interop + - obs + - platform + - swift + - wasm + - release-dart + - release-dart-ffi + - release-go-ffi + - release-js + - release-kt-lib + - release-swift-lib + if: always() && github.event.action != 'closed' + runs-on: ubuntu-24.04-arm + timeout-minutes: 5 + steps: + - name: Fail on a failed or cancelled workflow + if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') + run: exit 1 diff --git a/.github/workflows/release-go-ffi.yml b/.github/workflows/release-go-ffi.yml index f3a31542f74..b6e00eaa348 100644 --- a/.github/workflows/release-go-ffi.yml +++ b/.github/workflows/release-go-ffi.yml @@ -14,17 +14,6 @@ on: type: boolean default: false workflow_dispatch: - pull_request: - paths: - - ".github/workflows/release-go-ffi.yml" - - ".github/workflows/release-ffi.yml" - - ".github/workflows/release-shared-ffi.yml" - - "sh/gh/ffi*" - - "sh/gh/release.sh" - - "go/ffi/**" - - "sh/go/package-ffi.sh" - - "sh/go/publish-ffi.sh" - - "rs/moq-ffi/build.sh" permissions: contents: read diff --git a/.github/workflows/release-js.yml b/.github/workflows/release-js.yml index 81b8f36f729..7a29475abea 100644 --- a/.github/workflows/release-js.yml +++ b/.github/workflows/release-js.yml @@ -11,11 +11,9 @@ on: - 'js/**' - '.github/workflows/release-js.yml' # Dry-run: builds, packs, and runs `deno publish --dry-run`, which catches - # JSR-only failures before they break a release on `release`. - pull_request: - paths: - - 'js/**' - - '.github/workflows/release-js.yml' + # JSR-only failures before they break a release on `release`. Only a push + # publishes; release-gate.yml calls this on pull requests. + workflow_call: # Only publishing runs share the serialized group. GitHub keeps a single pending # run per group and drops the older one, so a PR sharing it would cancel a diff --git a/.github/workflows/release-kt-lib.yml b/.github/workflows/release-kt-lib.yml index a6a1db527fd..bc48131eb48 100644 --- a/.github/workflows/release-kt-lib.yml +++ b/.github/workflows/release-kt-lib.yml @@ -30,15 +30,8 @@ on: - "kt/settings.gradle.kts" - ".github/workflows/release-kt-lib.yml" - "sh/gh/release.sh" - pull_request: - paths: - - "kt/moq/**" - - "kt/gradle.properties" - - "kt/build.gradle.kts" - - "kt/settings.gradle.kts" - - ".github/workflows/release-kt-lib.yml" - - "sh/gh/release.sh" - - "rs/moq-ffi/build.sh" + # Pull request dry-runs, through release-gate.yml. + workflow_call: # Manual trigger so a wrapper bump can be published once the bindings it # depends on land on Maven Central (the guard below skips otherwise). Only a # dispatch on `release` publishes. diff --git a/.github/workflows/release-swift-lib.yml b/.github/workflows/release-swift-lib.yml index 87db931a13a..48be6c84c03 100644 --- a/.github/workflows/release-swift-lib.yml +++ b/.github/workflows/release-swift-lib.yml @@ -26,17 +26,8 @@ on: - "sh/swift/verify.sh" - ".github/workflows/release-swift-lib.yml" - "sh/gh/release.sh" - pull_request: - paths: - - "swift/VERSION" - - "swift/Package.swift.template" - - "swift/Sources/Moq/**" - - "swift/Tests/**" - - "sh/swift/package.sh" - - "sh/swift/publish.sh" - - "sh/swift/verify.sh" - - ".github/workflows/release-swift-lib.yml" - - "sh/gh/release.sh" + # Pull request dry-runs, through release-gate.yml. + workflow_call: workflow_run: workflows: ["Release FFI", "Release Swift FFI"] types: diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 6a806b3ce44..af2a42d8a1e 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -21,31 +21,18 @@ on: - "rs/moq-video/**" - "Cargo.lock" - ".github/workflows/swift.yml" - pull_request: - # `closed` is here only so merging/closing a PR cancels its in-flight run - # via the concurrency group below; the job itself is skipped on close. - types: [opened, synchronize, reopened, closed] - paths: - - "swift/**" - - "sh/swift/**" - - "doc/lib/swift/**" - - "doc/lib/samples.sh" - - "rs/moq-ffi/**" - - "rs/moq-video/**" - - "Cargo.lock" - - ".github/workflows/swift.yml" + # Pull requests, through release-gate.yml. + workflow_call: concurrency: - # Keyed by event as well as ref: a merged pull request's `closed` run and the - # `main` push run it triggers are simultaneous, and if they shared a group the - # skipped one could cancel the cache writer. + # Keyed by event as well as ref, so a pull request's run can't cancel the + # cache writer. group: swift-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true jobs: check: name: Swift - if: github.event.action != 'closed' runs-on: macos-latest timeout-minutes: 60 diff --git a/.github/workflows/wasm.yml b/.github/workflows/wasm.yml index 5f93aab325c..952a682fb47 100644 --- a/.github/workflows/wasm.yml +++ b/.github/workflows/wasm.yml @@ -31,29 +31,7 @@ permissions: contents: read on: - pull_request: - # `closed` is here only so merging/closing a PR cancels its in-flight run - # via the concurrency group below; the job itself is skipped on close. - types: [opened, synchronize, reopened, closed] - paths: - - "rs/moq-wasm/**" - - "rs/moq-net/**" - - "rs/kio/**" - - "js/wasm/**" - - "test/wasm/**" - - "test/lib/**" - - "justfile" - - "js/justfile" - - "test/justfile" - - ".cargo/config.toml" - - "package.json" - - "bun.lock" - - "Cargo.toml" - - "Cargo.lock" - - "rust-toolchain.toml" - - "flake.nix" - - "flake.lock" - - ".github/workflows/wasm.yml" + workflow_call: concurrency: group: wasm-${{ github.ref }} @@ -62,7 +40,6 @@ concurrency: jobs: wasm: name: WASM - if: github.event.action != 'closed' # ARM64 like check.yml, the only architecture cache.yml warms a Rust store # for; the harness builds the relay natively, which that store covers. runs-on: ubuntu-24.04-arm diff --git a/sh/obs/compile.sh b/sh/obs/compile.sh index 6253cc15860..30aba064b40 100755 --- a/sh/obs/compile.sh +++ b/sh/obs/compile.sh @@ -16,8 +16,8 @@ # test/ is in scope because each test file defines the libmoq entry points the # plugin calls, so a signature that drifts from the generated moq.h is a # conflicting C declaration. Catching that needs only headers, which is why it -# belongs here: `just obs ci` finds the same drift, but only where obs.yml's -# path filter reaches, and `just obs test` is manual. +# belongs here: `just obs ci` finds the same drift, but only where release-gate.yml's +# OBS filter reaches, and `just obs test` is manual. set -euo pipefail here=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)