From 31bddbd70fe57506269f56b6d627314390fe2aa9 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 2 May 2026 09:02:05 +0200 Subject: [PATCH] ci: build embedded mpv artifacts on master Entire-Checkpoint: 5b514fe72836 --- .github/workflows/build-and-make.yaml | 24 +++++++++++++----------- docs/architecture/embedded-mpv-native.md | 2 +- tools/embedded-mpv/README.md | 2 +- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-and-make.yaml b/.github/workflows/build-and-make.yaml index b1dab17e1..0e2d636d4 100644 --- a/.github/workflows/build-and-make.yaml +++ b/.github/workflows/build-and-make.yaml @@ -89,9 +89,9 @@ jobs: run: pnpm nx build web --skip-nx-cache - name: Build embedded MPV runtime (macOS release) - # TEMPORARY PR TEST: remove `|| github.event_name == 'pull_request'` - # after the macOS Embedded MPV artifact is built and manually tested. - if: matrix.os == 'macos' && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'pull_request') + # TEMPORARY ARTIFACT TEST: remove `|| github.event_name == 'pull_request' || github.ref == 'refs/heads/master'` + # after the macOS Embedded MPV artifacts are built and manually tested. + if: matrix.os == 'macos' && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'pull_request' || github.ref == 'refs/heads/master') shell: bash run: | set -euo pipefail @@ -105,13 +105,13 @@ jobs: - name: Build backend env: IPTVNATOR_EMBEDDED_MPV_ARCH: ${{ matrix.arch || '' }} - IPTVNATOR_REQUIRE_EMBEDDED_MPV: ${{ matrix.os == 'macos' && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'pull_request') && '1' || '0' }} + IPTVNATOR_REQUIRE_EMBEDDED_MPV: ${{ matrix.os == 'macos' && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'pull_request' || github.ref == 'refs/heads/master') && '1' || '0' }} run: pnpm run build:backend - name: Verify embedded MPV build output - # TEMPORARY PR TEST: remove `|| github.event_name == 'pull_request'` - # after the macOS Embedded MPV artifact is built and manually tested. - if: matrix.os == 'macos' && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'pull_request') + # TEMPORARY ARTIFACT TEST: remove `|| github.event_name == 'pull_request' || github.ref == 'refs/heads/master'` + # after the macOS Embedded MPV artifacts are built and manually tested. + if: matrix.os == 'macos' && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'pull_request' || github.ref == 'refs/heads/master') shell: bash run: | set -euo pipefail @@ -249,7 +249,9 @@ jobs: CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} DEBUG: electron-builder,electron-notarize* IPTVNATOR_EMBEDDED_MPV_ARCH: ${{ matrix.arch }} - IPTVNATOR_REQUIRE_EMBEDDED_MPV: ${{ startsWith(github.ref, 'refs/tags/v') && '1' || '0' }} + # TEMPORARY MASTER ARTIFACT TEST: remove `|| github.ref == 'refs/heads/master'` + # after the macOS Embedded MPV artifacts are built and manually tested. + IPTVNATOR_REQUIRE_EMBEDDED_MPV: ${{ (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') && '1' || '0' }} run: pnpm run make:app - name: Verify signed macOS app @@ -315,9 +317,9 @@ jobs: env: PACKAGE_OS: ${{ matrix.os }} PACKAGE_ARCH: ${{ matrix.arch || '' }} - # TEMPORARY PR TEST: remove the PR branch after manually - # testing the macOS artifact; tagged releases should stay required. - IPTVNATOR_REQUIRE_EMBEDDED_MPV: ${{ matrix.os == 'macos' && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'pull_request') && '1' || '0' }} + # TEMPORARY ARTIFACT TEST: remove `|| github.event_name == 'pull_request' || github.ref == 'refs/heads/master'` + # after the macOS Embedded MPV artifacts are built and manually tested. + IPTVNATOR_REQUIRE_EMBEDDED_MPV: ${{ matrix.os == 'macos' && (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'pull_request' || github.ref == 'refs/heads/master') && '1' || '0' }} run: pnpm run verify:package-layout -- "$PACKAGE_OS" "$PACKAGE_ARCH" - name: Smoke test packaged Flatpak launcher diff --git a/docs/architecture/embedded-mpv-native.md b/docs/architecture/embedded-mpv-native.md index aa60b5d52..67a11a765 100644 --- a/docs/architecture/embedded-mpv-native.md +++ b/docs/architecture/embedded-mpv-native.md @@ -165,7 +165,7 @@ For tagged macOS builds, CI must: - set `IPTVNATOR_EMBEDDED_MPV_ARCH=${arch}` for backend build and packaging - set `IPTVNATOR_REQUIRE_EMBEDDED_MPV=1` for packaging and package-layout verification -During the temporary macOS PR artifact test, CI also sets `IPTVNATOR_REQUIRE_EMBEDDED_MPV=1` for macOS PR backend build, packaging, and package-layout verification. After the artifact is manually validated, remove the workflow's `pull_request` condition so PR, development, Linux, and Windows packaging leave `IPTVNATOR_REQUIRE_EMBEDDED_MPV` unset or `0`. In that normal mode the package validators still reject a present but invalid Embedded MPV runtime, but they do not require the addon to exist. This keeps the native feature in-tree without making non-macOS or non-release builds depend on macOS runtime artifacts. +During the temporary macOS artifact tests, CI also sets `IPTVNATOR_REQUIRE_EMBEDDED_MPV=1` for macOS PR and `master` push backend build, packaging, and package-layout verification. After the artifacts are manually validated, remove the workflow's temporary `pull_request` and `refs/heads/master` conditions so PR, development, Linux, and Windows packaging leave `IPTVNATOR_REQUIRE_EMBEDDED_MPV` unset or `0`. In that normal mode the package validators still reject a present but invalid Embedded MPV runtime, but they do not require the addon to exist. This keeps the native feature in-tree without making non-macOS or non-release builds depend on macOS runtime artifacts. ## Release Safety diff --git a/tools/embedded-mpv/README.md b/tools/embedded-mpv/README.md index bad05eb1c..4d9e6b74b 100644 --- a/tools/embedded-mpv/README.md +++ b/tools/embedded-mpv/README.md @@ -74,4 +74,4 @@ The macOS `afterPack` hook copies `dist/apps/electron-backend/native/` into `app During release packaging, `tools/packaging/electron-after-pack.cjs` verifies that the packaged app uses a `vendored-lgpl` runtime and has no `/opt/homebrew` or `/usr/local` dynamic links for embedded MPV. -Set `IPTVNATOR_REQUIRE_EMBEDDED_MPV=1` when packaging a macOS release artifact that must include Embedded MPV. The same variable is temporarily enabled for macOS PR artifacts while the bundled runtime is being tested. After manual artifact validation, remove the workflow's PR condition so PR and non-tag development builds leave the variable unset or `0` and can package without a staged runtime while Settings keeps Embedded MPV hidden. +Set `IPTVNATOR_REQUIRE_EMBEDDED_MPV=1` when packaging a macOS release artifact that must include Embedded MPV. The same variable is temporarily enabled for macOS PR and `master` push artifacts while the bundled runtime is being tested. After manual artifact validation, remove the workflow's PR and `refs/heads/master` conditions so PR and non-tag development builds leave the variable unset or `0` and can package without a staged runtime while Settings keeps Embedded MPV hidden.