Skip to content

Commit cc34f03

Browse files
Merge branch 'main' into feat/notes-teleprompter-67
2 parents 60bd856 + 3f0ec8a commit cc34f03

14 files changed

Lines changed: 835 additions & 78 deletions

File tree

.github/workflows/build.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,19 @@ jobs:
8989

9090
build-macos:
9191
name: macOS ${{ matrix.arch }} DMG
92-
# RELEASE-BRANCH-ONLY: 1.8.0 ships Windows-only. Do NOT let this `if: false`
93-
# reach main when promoting, or every later release becomes Windows-only too.
94-
if: false
95-
runs-on: macos-latest
92+
# Build each arch NATIVELY. `macos-latest` is Apple Silicon, and everything the
93+
# 1.8.0 macOS path added keys off the HOST arch: fetch-ffmpeg-macos.mjs configures
94+
# with `--arch=${process.arch}`, and build-macos-compositor-addon.mjs installs into
95+
# `darwin-${process.arch}` and runs cargo without `--target`. So the x64 job on an
96+
# arm64 runner produced arm64 output in darwin-arm64/, and packaging then failed
97+
# with "Refusing to package an incomplete macOS payload — looked in darwin-x64".
98+
# v1.7.0 shipped an x64 DMG because it had neither the compositor addon nor a
99+
# vendored ffmpeg to build; both arrived with 1.8.0 and nobody could see the
100+
# breakage while this job sat behind `if: false`.
101+
# Running x64 on an Intel runner fixes it without threading a target arch through
102+
# ffmpeg's configure, cargo and the output paths — four blind changes on a release
103+
# branch, none of them testable without a Mac.
104+
runs-on: ${{ matrix.arch == 'x64' && 'macos-15-intel' || 'macos-latest' }}
96105
strategy:
97106
fail-fast: false
98107
matrix:
@@ -300,8 +309,6 @@ jobs:
300309

301310
build-linux:
302311
name: Linux packages
303-
# RELEASE-BRANCH-ONLY: see the note on build-macos above.
304-
if: false
305312
runs-on: ubuntu-latest
306313
steps:
307314
- name: Checkout code
@@ -337,11 +344,10 @@ jobs:
337344
publish-release:
338345
name: Publish GitHub release
339346
runs-on: ubuntu-latest
340-
# RELEASE-BRANCH-ONLY: build-macos / build-linux are disabled for this
341-
# Windows-only release. A skipped job in `needs` skips this one too, so they
342-
# must come out of the list, not just be gated. Restore all three on main.
343347
needs:
344348
- build-windows
349+
- build-macos
350+
- build-linux
345351
if: ${{ (github.event_name == 'push' && github.ref_type == 'tag') || (github.event_name == 'workflow_dispatch' && github.event.inputs.release_tag != '') }}
346352
steps:
347353
- name: Checkout code
@@ -409,23 +415,18 @@ jobs:
409415
path: artifacts/windows
410416

411417
- name: Download macOS arm64 DMG
412-
continue-on-error: true
413418
uses: actions/download-artifact@v4
414419
with:
415420
name: openscreen-mac-arm64
416421
path: artifacts/mac-arm64
417422

418423
- name: Download macOS x64 DMG
419-
continue-on-error: true
420424
uses: actions/download-artifact@v4
421425
with:
422426
name: openscreen-mac-x64
423427
path: artifacts/mac-x64
424428

425429
- name: Download Linux packages
426-
# RELEASE-BRANCH-ONLY: tolerate the missing artifact from the disabled
427-
# Linux job (the macOS downloads below already do). Drop with the rest.
428-
continue-on-error: true
429430
uses: actions/download-artifact@v4
430431
with:
431432
name: openscreen-linux

.github/workflows/docs.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ on:
1111
paths:
1212
- "website/**"
1313
- ".github/workflows/docs.yml"
14+
# The /download page resolves the current release's assets at build time so it
15+
# can link each platform to its actual file. Without this trigger that data
16+
# would freeze at whatever the last website/** change saw, and the page would
17+
# keep serving the previous version's binaries after every release.
18+
# Pre-releases are skipped: /releases/latest ignores them, so the built output
19+
# would be byte-identical.
20+
release:
21+
types: [published]
1422
workflow_dispatch:
1523

1624
# Cancel in-flight runs on the same ref so fast follow-up pushes
@@ -26,6 +34,9 @@ jobs:
2634
build:
2735
name: Build site
2836
runs-on: ubuntu-latest
37+
# A pre-release does not change what /releases/latest resolves to, so
38+
# rebuilding for one would burn a run to produce identical output.
39+
if: github.event_name != 'release' || github.event.release.prerelease == false
2940
steps:
3041
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3142
with:
@@ -53,7 +64,9 @@ jobs:
5364
name: Deploy to GitHub Pages
5465
runs-on: ubuntu-latest
5566
needs: build
56-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
67+
if: >-
68+
(github.event_name == 'push' && github.ref == 'refs/heads/main')
69+
|| github.event_name == 'release'
5770
environment:
5871
name: github-pages
5972
url: ${{ steps.deployment.outputs.page_url }}

electron/native/whisper-stt/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,21 @@ set(HTTPLIB_USE_OPENSSL_IF_AVAILABLE OFF CACHE BOOL "" FORCE)
127127
set(HTTPLIB_USE_ZLIB_IF_AVAILABLE OFF CACHE BOOL "" FORCE)
128128
set(HTTPLIB_USE_BROTLI_IF_AVAILABLE OFF CACHE BOOL "" FORCE)
129129

130+
# ponytail: on Linux, ggml/whisper build as separate shared objects and CMake
131+
# bakes the absolute build-tree `bin/` path into each RUNPATH. The build script
132+
# then copies the binary and its libs side by side into
133+
# `electron/native/bin/linux-x64/`, where that absolute path is meaningless the
134+
# moment the build cache is wiped or the app is packaged on another machine.
135+
# Resolve relative to the executable instead. `$ORIGIN/bin` keeps the binary in
136+
# the build tree runnable too (it lands at the build root while the libs go to
137+
# `bin/`). Set before MakeAvailable so the whisper/ggml targets inherit it.
138+
# macOS is left alone: it needs @loader_path rather than $ORIGIN and is not
139+
# testable from here.
140+
if(UNIX AND NOT APPLE)
141+
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
142+
set(CMAKE_INSTALL_RPATH "$ORIGIN:$ORIGIN/bin")
143+
endif()
144+
130145
FetchContent_MakeAvailable(whisper httplib json)
131146

132147
add_executable(whisper-stt-server src/main.cpp)

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"build:native:linux": "node scripts/build-linux-pipewire-helper.mjs",
3737
"build:win": "npm run build:native:win && npm run fetch:ffmpeg && npm run build:native:compositor && tsc && vite build && electron-builder --win --config.npmRebuild=false",
3838
"build:win:store": "npm run build:native:win && npm run fetch:ffmpeg && npm run build:native:compositor && tsc && vite build && electron-builder --win appx --config.npmRebuild=false",
39-
"build:linux": "npm run build:native:linux && npm run build:native:compositor:linux && tsc && vite build && electron-builder --linux AppImage deb pacman --config.npmRebuild=false",
39+
"build:linux": "npm run fetch:ffmpeg:sdk && npm run build:native:linux && npm run build:native:compositor:linux && tsc && vite build && electron-builder --linux AppImage deb pacman --config.npmRebuild=false",
4040
"build:whisper-binaries": "bash scripts/build-whisper-stt.sh",
4141
"test:whisper-stt": "node scripts/test-whisper-stt.mjs",
4242
"test": "vitest --run",
@@ -66,7 +66,8 @@
6666
"test:e2e:windows-native-checklist": "playwright test tests/e2e/windows-native-checklist.spec.ts",
6767
"prepare": "husky",
6868
"fetch:ffmpeg": "node scripts/fetch-ffmpeg.mjs",
69-
"fetch:ffmpeg:mac": "node scripts/fetch-ffmpeg-macos.mjs"
69+
"fetch:ffmpeg:mac": "node scripts/fetch-ffmpeg-macos.mjs",
70+
"fetch:ffmpeg:sdk": "node scripts/fetch-ffmpeg.mjs --sdk-only"
7071
},
7172
"dependencies": {
7273
"@fix-webm-duration/fix": "^1.0.1",

scripts/fetch-ffmpeg-macos.mjs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ run(
9393
"--disable-static",
9494
"--disable-doc",
9595
"--disable-debug",
96+
// ffmpeg's configure AUTO-DETECTS these from whatever the build machine happens
97+
// to have installed, and a GitHub macOS runner has a large Homebrew prefix. That
98+
// is how libavformat came to link /opt/homebrew/opt/libx11/lib/libX11.6.dylib and
99+
// trip build-macos-compositor-addon.mjs's "no absolute build-machine paths" check,
100+
// which is the check doing its job: such a dylib is unresolvable on a user's Mac.
101+
// Disabled explicitly rather than left to chance, so the vendored tree depends on
102+
// the source tarball and the SDK, never on the runner's incidental packages.
103+
// None is used here: xlib/libxcb are X11 capture, sdl2 is only ffplay, and lzma
104+
// only reaches decoders we do not ship (we decode mp4/webm).
105+
"--disable-xlib",
106+
"--disable-libxcb",
107+
"--disable-sdl2",
108+
"--disable-lzma",
96109
"--enable-videotoolbox",
97110
"--enable-audiotoolbox",
98111
"--disable-x86asm",

0 commit comments

Comments
 (0)