Skip to content

Commit c299e42

Browse files
authored
Add CEF 156 modular formula for desktop platforms (#731)
* Add a CEF 156 modular formula for desktop binary distributions. Spotify Current Stable 156.0.15 is downloaded from cef-builds.spotifycdn.com and verified with per-platform SHA-256 values. The formula compiles only libcef_dll_wrapper (USE_SANDBOX=OFF, VS /MD) and packages headers, CMake helpers, the wrapper, runtime, resources, locales and licences. CEF has official binaries for osx, linux and vs on x86_64 and arm64. There is no iOS, Android, Emscripten, MSYS2 or ARM64EC distribution. * Register CEF in the upstream version checker. The registry must name every formula. CEF is a Spotify binary SDK pin, so it is skipped rather than compared to GitHub release tags. * Stop MSYS2 from turning CEF /MD into C:/msys64/MD. optional cef-vs-64 failed with C1083 because bash converted -DCEF_RUNTIME_LIBRARY_FLAG=/MD into a path. MSVC then tried to compile C:/msys64/MD as a source file. Exclude that CMake argument from MSYS path conversion so the wrapper uses the OF /MD runtime. * Build CEF for Windows x64, ARM64 and ARM64EC. x64 uses windows64 and ARM64 uses windowsarm64. Spotify does not publish ARM64EC Chromium binaries, so ARM64EC downloads windows64 (x64 libcef.dll, which ARM64EC can load) and compiles libcef_dll_wrapper with -A ARM64EC.
1 parent d5c4f1d commit c299e42

9 files changed

Lines changed: 524 additions & 7 deletions

File tree

‎.github/workflows/build-modular-optional.yml‎

Lines changed: 103 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
- 'apothecary/formulas/metalangle/**'
1010
- 'apothecary/formulas/glon12.sh'
1111
- 'apothecary/formulas/dawn/**'
12+
- 'apothecary/formulas/cef/**'
13+
- 'scripts/tests/test-cef-formula.sh'
1214
- 'scripts/tests/test-angle-bootstrap.sh'
1315
- 'scripts/tests/test-angle-xros-runtime.sh'
1416
- 'scripts/tests/test-secure-compiler.sh'
@@ -51,6 +53,7 @@ jobs:
5153
- run: bash scripts/tests/test-glon12-runtime.sh
5254
- run: bash scripts/tests/test-modular-cache.sh
5355
- run: bash scripts/tests/test-apple-install-tools.sh
56+
- run: bash scripts/tests/test-cef-formula.sh
5457
- run: ruby scripts/tests/test-workflow-scheduling.rb
5558

5659
apple:
@@ -61,10 +64,14 @@ jobs:
6164
fail-fast: false
6265
matrix:
6366
target: [osx, ios, tvos, catos, xros]
64-
library: [angle, metalangle, dawn]
67+
library: [angle, metalangle, dawn, cef]
6568
exclude:
6669
- {target: catos, library: metalangle}
6770
- {target: xros, library: metalangle}
71+
- {target: ios, library: cef}
72+
- {target: tvos, library: cef}
73+
- {target: catos, library: cef}
74+
- {target: xros, library: cef}
6875
include:
6976
- {target: osx, runner: xcode-27, xcode: Xcode_27.1.app, archs: 'x86_64 arm64', install: osx}
7077
- {target: ios, runner: xcode-27, xcode: Xcode_27.1.app, archs: 'arm64 x86_64 SIM_arm64', install: ios}
@@ -123,30 +130,49 @@ jobs:
123130
path: |
124131
out/${{ matrix.library }}
125132
xout/${{ matrix.library }}
133+
- name: Upload CEF package artifact
134+
if: matrix.library == 'cef'
135+
uses: actions/upload-artifact@v7.0.2
136+
with:
137+
name: cef-${{ matrix.target }}
138+
path: out/oF_cef_*.tar.bz2
139+
if-no-files-found: error
126140
- name: Upload to latest-modular
127-
if: github.event_name == 'push' && github.repository == 'openframeworks/apothecary'
141+
if: github.event_name == 'push' && github.repository == 'openframeworks/apothecary' && matrix.library != 'cef'
128142
uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852
129143
with:
130144
token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
131145
tag_name: latest-modular
132146
fail_on_unmatched_files: true
133147
files: xout/oF_${{ matrix.library }}_*.tar.bz2
148+
- name: Upload CEF to latest-modular
149+
if: github.event_name == 'push' && github.repository == 'openframeworks/apothecary' && matrix.library == 'cef'
150+
uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852
151+
with:
152+
token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
153+
tag_name: latest-modular
154+
fail_on_unmatched_files: true
155+
files: out/oF_cef_*.tar.bz2
134156

135157
vs:
136158
needs: test
137-
name: optional ${{ matrix.library }}-vs-64
159+
name: optional ${{ matrix.library }}-vs-${{ matrix.arch }}
138160
runs-on: windows-2022
139161
strategy:
140162
fail-fast: false
141163
matrix:
142-
library: [angle, dawn]
164+
library: [angle, dawn, cef]
165+
arch: ['64']
166+
include:
167+
- {library: cef, arch: arm64}
168+
- {library: cef, arch: arm64ec}
143169
defaults:
144170
run:
145171
shell: msys2 {0}
146172
env:
147173
TARGET: vs
148174
TYPE: vs
149-
ARCH: 64
175+
ARCH: ${{ matrix.arch }}
150176
VS_VER: 17
151177
PACKAGE_LIBS: ${{ matrix.library }}
152178
ALWAYS_BUILD: 1
@@ -191,6 +217,13 @@ jobs:
191217
with:
192218
key: ${{ steps.key.outputs.key }}
193219
path: out/${{ matrix.library }}
220+
- name: Upload CEF package artifact
221+
if: matrix.library == 'cef'
222+
uses: actions/upload-artifact@v7.0.2
223+
with:
224+
name: cef-vs-${{ matrix.arch }}
225+
path: out/oF_cef_*.zip
226+
if-no-files-found: error
194227
- name: Upload to latest-modular
195228
if: github.event_name == 'push' && github.repository == 'openframeworks/apothecary'
196229
uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852
@@ -200,6 +233,71 @@ jobs:
200233
fail_on_unmatched_files: true
201234
files: out/oF_${{ matrix.library }}_*.zip
202235

236+
linux:
237+
needs: test
238+
name: optional cef-linux-${{ matrix.arch }}
239+
runs-on: ${{ matrix.runner }}
240+
strategy:
241+
fail-fast: false
242+
matrix:
243+
include:
244+
- {arch: '64', runner: ubuntu-24.04}
245+
- {arch: arm64, runner: ubuntu-24.04-arm}
246+
env:
247+
TARGET: linux
248+
TYPE: linux
249+
ARCH: ${{ matrix.arch }}
250+
PACKAGE_LIBS: cef
251+
ALWAYS_BUILD: 1
252+
NO_FORCE: 1
253+
NO_COLOR: '1'
254+
UI_ANIM: '0'
255+
steps:
256+
- uses: actions/checkout@v7.0.1
257+
- name: Install build tools
258+
run: |
259+
sudo apt-get update
260+
sudo apt-get install -y cmake ninja-build g++ bzip2 pkg-config
261+
- name: Compute exact modular cache key
262+
id: key
263+
run: bash scripts/modular-cache-key.sh "$PACKAGE_LIBS" >> "$GITHUB_OUTPUT"
264+
- name: Restore compiled modular outputs
265+
id: cache
266+
uses: actions/cache/restore@v6.1.0
267+
with:
268+
key: ${{ steps.key.outputs.key }}
269+
path: out/cef
270+
- name: Report modular cache result
271+
env:
272+
CACHE_KEY: ${{ steps.key.outputs.key }}
273+
CACHE_HIT: ${{ steps.cache.outputs.cache-hit }}
274+
run: |
275+
printf '### Modular cache: %s / %s\n\nKey: `%s`\n\nExact hit: `%s`\n' "$TARGET" "$PACKAGE_LIBS" "$CACHE_KEY" "${CACHE_HIT:-false}" >> "$GITHUB_STEP_SUMMARY"
276+
- name: Build or reuse and package CEF
277+
env:
278+
MODULAR_CACHE_HIT: ${{ steps.cache.outputs.cache-hit }}
279+
run: bash scripts/build-modular-optional.sh
280+
- name: Save compiled modular outputs
281+
if: steps.cache.outputs.cache-hit != 'true'
282+
uses: actions/cache/save@v6.1.0
283+
with:
284+
key: ${{ steps.key.outputs.key }}
285+
path: out/cef
286+
- name: Upload CEF package artifact
287+
uses: actions/upload-artifact@v7.0.2
288+
with:
289+
name: cef-linux-${{ matrix.arch }}
290+
path: out/oF_cef_*.tar.bz2
291+
if-no-files-found: error
292+
- name: Upload to latest-modular
293+
if: github.event_name == 'push' && github.repository == 'openframeworks/apothecary'
294+
uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852
295+
with:
296+
token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }}
297+
tag_name: latest-modular
298+
fail_on_unmatched_files: true
299+
files: out/oF_cef_*.tar.bz2
300+
203301
glon12:
204302
needs: test
205303
name: optional glon12-vs-${{ matrix.arch }}

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Curated from the git history of [openframeworks/apothecary](https://github.com/o
1616

1717
## 2026 (Jan – Sep)
1818

19+
- **CEF** 156.0.15 (Chromium 156.0.8078.80) modular-optional formula: Spotify desktop binary distributions, compile `libcef_dll_wrapper`, package runtime/resources/locales. osx, linux and vs (x64, arm64, ARM64EC).
1920
- **Android** NDK `28.2.13676358` → **r29 `29.0.14206865`**, SDK build-tools `36.0.0` → **`37.0.0`** (latest on ubuntu-24.04 Actions). Min compile API **24 → 25**.
2021
- **MetalANGLE** ships as `MetalANGLE.xcframework` (same pattern as Dawn). copy() seals `MetalANGLE.a`; iOS simulator lipo covers COMBINED + thin slices. Docs: `libs/metalangle`, not OF’s stale `libs/metal`.
2122
- **CMake/pkg-config install** (#405): after each formula copy, emit relocatable `.pc` and `cmake/*Config.cmake` next to the binary; rewrite cmake `--install` absolute prefixes.

‎FORMULA_VERSION_MATRIX.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ A **pin** is not “we forgot to bump”. If status is compatibility / major-beh
5151
| **boost** | `1.92.0` | `boost-1.92.0` | updated | `FORMULA_TYPES=()` — unused. filesystem with header-only System; OF is C++17+. Do not treat as a live dep. | boostorg tarball |
5252
| **brotli** | `1.2.1` | `v1.2.1` | current | Security update for CVE-2026-111497; checked 2026-10-25. | https://github.com/google/brotli |
5353
| **cairo** | `1.18.4` | `1.18.4` | current | Latest stable. | https://gitlab.freedesktop.org/cairo/cairo |
54+
| **cef** | `156.0.15` (`156.0.15+gcf671c0+chromium-156.0.8078.80`) | Spotify Current Stable 156 | current | Desktop binary SDK from cef-builds.spotifycdn.com. Compile `libcef_dll_wrapper` only (`USE_SANDBOX=OFF`, VS `/MD`). osx/linux/vs x86_64+arm64; VS ARM64EC uses the windows64 runtime. No iOS/Android/emscripten/msys2. | https://cef-builds.spotifycdn.com |
5455
| **curl** | `8.23.0` | `curl-8_22_0` / `8.23.0` | current | HTTP/2, HTTP/3 and SSH dependency integration retained. TLS-SRP is removed upstream. | https://github.com/curl/curl |
5556
| **dawn** | `2026.07.31` (`cd2d5a667d1140af6e89f4c4c24f6545e1d5d2d7`) | Dawn `v20260911.162847` (rolling) | pinned-dev | ofLibs-era SHA. `DAWN_BUILD_MONOLITHIC_LIBRARY=STATIC`. Linux off until GCC 11. watchOS: no Metal. | https://dawn.googlesource.com/dawn |
5657
| **fmt** | `12.2.1` | `12.2.1` | current | Latest stable. | https://github.com/fmtlib/fmt |

0 commit comments

Comments
 (0)