Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
98cd08e
Modernize build toolchain for CEF 123+ and Python 3.10+
linesight Apr 18, 2026
252b5da
fix x86/x64 mismatch in MSVC compiler initialization on Windows
linesight Apr 18, 2026
e813552
CEF 146: fix windowed rendering with Alloy runtime and deferred brows…
linesight Apr 19, 2026
71afdf0
CEF 146: update CEF headers, client handlers, and build tools
linesight Apr 19, 2026
7ad34c6
ignore .claude/ directory
linesight Apr 19, 2026
a933a32
CEF 146: fix unit tests for Chrome 130+ behavioral changes
linesight Apr 19, 2026
22a939f
fix CEFPYTHON_BINARY_NOTSET when build.py is run without explicit ver…
linesight Apr 19, 2026
249129e
CEF 146: fix Initialize() race condition and update unit tests
linesight Apr 19, 2026
ca4d507
CEF 146: fix GPU crash on Windows by defaulting to ANGLE OpenGL backend
linesight Apr 19, 2026
9eaacaa
CEF 146: fix JS bindings race condition and update snippet examples
linesight Apr 20, 2026
af5a2bf
CEF 146: add crossdomain_bindings.py snippet and update README
linesight Apr 20, 2026
f4f589a
CEF 146: fix cookie visitor thread assertion and update snippet URLs
linesight Apr 20, 2026
15a65ca
CEF 146: fix CanSendCookie/CanSaveCookie and cookie API issues
linesight Apr 20, 2026
5cb6c38
Add Windows CI workflow with timeout guard
linesight Apr 20, 2026
fbb6011
Add Python 3.12/3.13/3.14 support and fix Python 3.12 SyntaxWarnings
linesight Apr 20, 2026
d0c2908
Upgrade Cython 0.29.36 to 3.2.4 for Python 3.13 compatibility
linesight Apr 20, 2026
6d3587e
Fix Cython 3.x deprecation warnings and performance hints
linesight Apr 20, 2026
7849fb0
Add workflow_dispatch with bypass_cache option to CI
linesight Apr 20, 2026
0dbdf15
Fix first-pass C++ build error for Python 3.14 (and all versions)
linesight Apr 20, 2026
f9a5aaf
Migrate build system to scikit-build-core + CMake
linesight Apr 20, 2026
77cbf1d
Track cefpython3/__init__.py; gitignore build outputs in cefpython3/
linesight Apr 20, 2026
aa14253
Fix missing docopt in CI test job
linesight Apr 20, 2026
b8a6d6d
Move 'Install build tools' before automate.py in all CI jobs
linesight Apr 20, 2026
8180b39
Fix cefpython3 not importable during unit tests
linesight Apr 20, 2026
f3c23c7
Eliminate CEF/build-tool overhead from test job
linesight Apr 20, 2026
36bb856
Rewrite build_distrib.py to package pre-built artifacts into a wheel
linesight Apr 20, 2026
b9679b0
Make .pxi files static; remove cmake_generate_pxi.py
linesight Apr 20, 2026
b5cff20
Add Linux CI workflow and make build.py cross-platform
linesight Apr 20, 2026
39f201e
Fix CEF prebuilt build failing on GCC 13 (Ubuntu 24.04)
linesight Apr 20, 2026
24d0a6d
Fix Linux cmake --build failures: update CEF 146 Linux headers and ad…
linesight Apr 20, 2026
0808057
Fix CEF 146 API changes in GTK handlers; exclude dpi_aware on Linux
linesight Apr 21, 2026
ed41dde
Guard dpi_aware.cpp with #ifdef OS_WIN instead of CMake exclusion
linesight Apr 21, 2026
c941cd5
Fix Linux-specific compile errors in x11.cpp and print_handler_gtk.cpp
linesight Apr 21, 2026
383bc90
Fix print_handler_gtk.cpp for CEF 146 / GTK 3.24 API changes
linesight Apr 21, 2026
d38b533
Fix CEF 146 API changes in Linux message loop and print handler
linesight Apr 21, 2026
f36d710
Add GTK3 includes/libs to main module target on Linux
linesight Apr 21, 2026
62fc993
Fix Linux CI build: C++20 standard, subprocess link, removed APIs
linesight Apr 21, 2026
6b1abee
Fix dpi_aware.cpp guard: OS_WIN -> _WIN32
linesight Apr 21, 2026
f0d242f
Fix X11/CEF 'Status' typedef conflict in x11.h on Linux
linesight Apr 21, 2026
5bfa8fc
Fix Linux CI tests: add --no-sandbox for subprocess launch
linesight Apr 21, 2026
228bfb4
add windows CI at this branch
linesight Apr 21, 2026
d9f75a5
Add --disable-dev-shm-usage for Linux CI to fix shared memory failure
linesight Apr 21, 2026
c41ec22
Fix Linux CI test failures and improve cache hit speed
linesight Apr 21, 2026
f6f2494
Fix Linux CI: add --no-zygote to bypass zygote FD-passing failure
linesight Apr 21, 2026
73ccde9
Replace pkg_resources with packaging.version in examples
linesight Apr 21, 2026
a8745e8
Add --in-process-gpu for Linux CI to fix OnContextInitialized timeout
linesight Apr 21, 2026
e159e35
Add macOS ARM (Apple Silicon) CI workflow and build support
linesight Apr 21, 2026
58b92ad
Fix macOS ARM64 compilation errors in macOS message loop and CMake
linesight Apr 21, 2026
b6ffe1b
Retry download on truncated response in download_cef.py
linesight Apr 21, 2026
0e8c637
Fix CEF_API_HASH_PLATFORM missing from cef_version_macarm64.h
linesight Apr 21, 2026
9b84fdb
Fix CI: resize /dev/shm and disable out-of-process storage service
linesight Apr 21, 2026
1afdedb
disable windows ci for this branch for now
linesight Apr 21, 2026
359ddd2
Fix macOS ARM64 compile errors: update stale cef_types_mac.h and cef_…
linesight Apr 21, 2026
7e94c8b
Revert diagnostic LOG(ERROR) back to LOG(INFO) in OnBeforeChildProces…
linesight Apr 21, 2026
3428095
Add missing cef_application_mac.h to bundled headers
linesight Apr 21, 2026
517d352
Fix util_mac.mm: explicit cast void* -> NSView* for ARM64
linesight Apr 21, 2026
06af762
Remove -std=gnu++11 from macOS target_compile_options
linesight Apr 21, 2026
9e77690
Fix window_info.pyx Darwin SetAsChild: use CefRect instead of 5-arg form
linesight Apr 21, 2026
756edd2
Update cef_mac.pxd: fix SetAsChild signature, add runtime_style/enum
linesight Apr 21, 2026
91ad3a3
Extend OnContextInitialized wait from 6s to 30s; add fallback in Crea…
linesight Apr 21, 2026
259417d
Add --single-process for Linux CI to fix renderer Mojo bootstrap failure
linesight Apr 21, 2026
1e6ebc9
Fix macOS ARM CI: bust stale x86_64 CEF cache, add arch check
linesight Apr 21, 2026
6b138dc
Pass all switches in argv to CefMainArgs on Linux
linesight Apr 21, 2026
e309b80
Fix macOS ARM CI: build libcef_dll_wrapper for native arch
linesight Apr 21, 2026
5ae9c4c
Fix macOS subprocess: add rpath so dyld can find CEF framework
linesight Apr 21, 2026
4640a4d
Re-add utility service in-process flags for Linux CI
linesight Apr 21, 2026
799d893
Fix macOS CI tests: add no-sandbox and in-process-gpu switches
linesight Apr 21, 2026
2c1ef2b
Fix macOS ARM OSR: exclude disable-surfaces/begin-frame switches, ext…
linesight Apr 21, 2026
1db0f0d
Use async CreateBrowser() + pump loop on Linux to avoid CreateBrowser…
linesight Apr 21, 2026
e2fd2df
Fix macOS CI: use --single-process to bypass Mach port rendezvous fai…
linesight Apr 21, 2026
e2e5a99
Use --disable-setuid-sandbox instead of --no-sandbox on Linux CI
linesight Apr 21, 2026
8cf68ca
Fix macOS CI: run tests in user login session for Mach port rendezvous
linesight Apr 21, 2026
a524002
Fix Linux CefMainArgs empty command line; log subprocess type
linesight Apr 21, 2026
d73d233
Fix Linux subprocess crash: don't set no_sandbox=1 on Linux
linesight Apr 23, 2026
4acd649
Add Linux CEF 146 native-windowed embedding support
linesight Apr 26, 2026
59d74a4
Fix Linux unit test: close JS popup without GLib event dispatch
linesight Apr 27, 2026
b6b92f5
build_distrib: fix Linux/macOS support
linesight Apr 27, 2026
e3d1918
Fix flaky OSR test: wait for OnAccessibilityLocationChange on slow CI
linesight Apr 27, 2026
978c5e9
osr_test: extend accessibility location-change grace period to 3 s
linesight Apr 27, 2026
cb6ef7d
Fix macOS CI V8 OOM: remove --single-process now that launchctl asuse…
linesight Apr 27, 2026
0519110
Fix macOS CI: run network service in-process to avoid Mach port rende…
linesight Apr 27, 2026
307c7f9
gitignore: add Linux build artifacts for cefpython3/
linesight Apr 27, 2026
cec7ee4
cookie: sync CefCookie struct and thread assertion with CEF 146
linesight Apr 28, 2026
9a54787
linux: fix heap corruption in _wait_for_map XWindowAttributes buffer
linesight Apr 28, 2026
ecfc97e
osr_test: fix flaky OnAccessibilityLocationChange on Linux CI
linesight Apr 28, 2026
d1e6f9b
osr_test: drop OnAccessibilityLocationChange assert
linesight Apr 28, 2026
7c104fc
api, docs: sync with source and drop Python 2 / pre-3.10 support
linesight Apr 28, 2026
87d25a8
wxpython, x11: fix browser not resizing on Linux window resize
linesight Apr 28, 2026
66049fb
qt: context menu + PyQt6/PySide6 Linux embedding fixes
linesight Apr 29, 2026
03ff1bd
linux: fix window-close hang, popup lifecycle, PDF frame crash
linesight Apr 29, 2026
06f9ead
macos: fix Mach rendezvous crash by dropping sudo launchctl asuser
linesight Apr 29, 2026
5912f0d
macos: fix CI tests, build.py runtime/codesign, and gitignore
linesight Apr 29, 2026
95fbddc
macos: fix Mach rendezvous by injecting CFBundleIdentifier + CFProces…
linesight Apr 29, 2026
050db65
macos/linux: fix NetworkServiceInProcess feature name (was "2"-less v…
linesight Apr 29, 2026
741359b
macos: ad-hoc codesign subprocess and .so to fix MachPortRendezvous f…
linesight Apr 29, 2026
7f99583
macos: inject CFBundleIdentifier in subprocess before MachPortRendezv…
linesight Apr 29, 2026
2110147
macos: fix extern C SubprocessMacInit declaration scope
linesight Apr 29, 2026
e6143d9
macos: link subprocess against CoreFoundation
linesight Apr 29, 2026
500a9d2
macos: embed Info.plist in subprocess binary via -sectcreate
linesight Apr 29, 2026
a4dad65
macos: codesign Python interpreter to fix bootstrap namespace restric…
linesight Apr 29, 2026
9fb5c91
macos: replace removed --in-process-renderer with --single-process
linesight Apr 30, 2026
f5682bc
macos: add --jitless to fix V8 CodeRange OOM in --single-process mode
linesight Apr 30, 2026
1e2cac4
macos: minimize diff vs 146-linux in build.py and unit test files
linesight Apr 30, 2026
9373155
macos: fix CRLF line endings in .gitignore
linesight Apr 30, 2026
44339c1
macos: drop Intel Mac support, arm64 only
linesight Apr 30, 2026
f45f0d0
macos: fix GPU crash, drop redundant switches, codesign wheel binaries
linesight Apr 30, 2026
388cb4d
download_cef: add HTTP Range resume support and increase retries
linesight May 3, 2026
0d8549d
build_distrib: preserve executable permissions in wheel zip entries
linesight May 3, 2026
f7c75a0
build: suppress false-positive -Wstringop-overflow warnings with GCC …
linesight May 3, 2026
6fa9f76
ci: ensure subprocess is executable in wheel job
linesight May 3, 2026
596bb61
ci: flatten wheel pipeline and deduplicate CEF download
linesight May 3, 2026
9a16e85
build: extend -Wno-stringop-overflow to LTO link step
linesight May 3, 2026
756ba5a
build: update CEF to 147.0.10 and configure CI for cefpython147 branch
linesight May 3, 2026
e44b0b4
fix: force xcb on Linux and warn on handle=0 in Wayland sessions
linesight May 3, 2026
230f562
fix: Wayland xcb forcing, HiDPI scaling, and handle=0 diagnostic for …
linesight May 3, 2026
53495ec
docs: use upstream wording in README search instructions
linesight May 3, 2026
5ebbbea
ci: add download-cef job to macOS workflow so CEF is downloaded once
linesight May 3, 2026
2a47d56
cleanup: remove dead legacy build.py fallback from cefpython_public_a…
linesight May 3, 2026
03aecfb
examples: replace packaging.version with stdlib tuple comparison
linesight May 3, 2026
e9d3ff1
fix: guard against NULL CefBrowser during rapid frame lifecycle trans…
linesight May 4, 2026
1eaf4e7
fix: make OnTextSelectionChanged click target robust against CI layou…
linesight May 4, 2026
f06df36
Sync cefpython147-qt with cefpython147 (2026-05-09)
linesight May 10, 2026
0c8544d
fix: embed CEF compatibility.manifest in Windows subprocess.exe
linesight May 11, 2026
e978a7a
build: remove unused src/include/capi/ headers
linesight May 26, 2026
b6636b9
ci: trigger workflows on PRs targeting cefpython147
linesight Jun 3, 2026
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
143 changes: 143 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: CI Linux

on:
push:
branches: ["master", "cefpython147"]
pull_request:
branches: ["master", "cefpython147"]
workflow_dispatch:
inputs:
bypass_cache:
description: "Bypass all caches for a clean run"
type: boolean
default: false

jobs:
download-cef:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Read CEF version
id: cef-version
run: |
ver=$(grep -oP '(?<=#define CEF_VERSION ")[^"]+' src/version/cef_version_linux.h)
echo "value=$ver" >> $GITHUB_OUTPUT

- name: Cache CEF binaries
uses: actions/cache@v4
if: ${{ inputs.bypass_cache != true }}
with:
path: |
build/cef_binary_*
build/cef*_linux64
key: cef-linux64-${{ steps.cef-version.outputs.value }}

- name: Install build tools
run: python tools/requirements.py

- name: Download CEF binaries
run: python tools/download_cef.py

wheel:
needs: download-cef
runs-on: ubuntu-24.04
timeout-minutes: 75
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Read CEF version
id: cef-version
run: |
ver=$(grep -oP '(?<=#define CEF_VERSION ")[^"]+' src/version/cef_version_linux.h)
echo "value=$ver" >> $GITHUB_OUTPUT

- name: Restore CEF cache
uses: actions/cache/restore@v4
if: ${{ inputs.bypass_cache != true }}
with:
path: |
build/cef_binary_*
build/cef*_linux64
key: cef-linux64-${{ steps.cef-version.outputs.value }}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this cache take into account changes to download_cef.py and automate.py scripts?


- name: Install system dependencies
run: |
sudo apt-get update -q
sudo apt-get install -y --no-install-recommends \
cmake ninja-build pkg-config \
libgtk2.0-dev libgtk-3-dev \
libglib2.0-dev libx11-dev \
libnss3-dev libatk1.0-dev \
libxcomposite-dev libxdamage-dev libxext-dev \
libxfixes-dev libxrandr-dev libxrender-dev

- name: Install build tools
run: python tools/requirements.py

- name: Prepare prebuilt CEF
run: python tools/automate.py --prebuilt-cef

- name: Configure CMake
run: cmake -S . -B build/_cmake_build -G Ninja -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build/_cmake_build --parallel

- name: Stage build outputs
run: |
mkdir -p build/artifacts
cp build/_cmake_build/cefpython_py*.so build/artifacts/
cp build/_cmake_build/subprocess_build/subprocess build/artifacts/
cef_dir=$(ls -d build/cef*_linux64 2>/dev/null | head -1)
find "$cef_dir/bin" -maxdepth 1 -mindepth 1 \
! -name 'cefclient*' ! -name 'cefsimple*' ! -name 'ceftests*' ! -name 'chrome-sandbox' \
-exec cp -r {} build/artifacts/ \;

- name: Install runtime dependencies
run: |
sudo apt-get install -y --no-install-recommends \
libnss3 libatk1.0-0 libatk-bridge2.0-0 \
libx11-6 libxcomposite1 libxdamage1 libxext6 \
libxfixes3 libxrandr2 libxrender1 \
libgtk2.0-0 libglib2.0-0 xvfb

- name: Set up cefpython3 package
run: |
cp -r build/artifacts/. cefpython3/
chmod +x cefpython3/subprocess

- name: Resize /dev/shm for Chromium shared memory
run: sudo mount -o remount,size=512m /dev/shm
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still required since --disable-dev-shm-usage fix was applied?


- name: Run unit tests
run: xvfb-run python unittests/_test_runner.py
env:
PYTHONPATH: ${{ github.workspace }}

- name: Build wheel
run: python tools/build_distrib.py
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we test the generated wheel package in CI? Previously build_distrib.py installed the built wheel and ran tests against the installed package.


- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: cefpython3-py${{ matrix.python-version }}-linux64
path: build/dist/*.whl
237 changes: 237 additions & 0 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,237 @@
name: CI macOS ARM

on:
push:
branches: ["master", "cefpython147"]
pull_request:
branches: ["master", "cefpython147"]
workflow_dispatch:
inputs:
bypass_cache:
description: "Bypass all caches for a clean run"
type: boolean
default: false

jobs:
download-cef:
runs-on: macos-14
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Read CEF version
id: cef-version
run: |
ver=$(python3 -c "
import re, sys
h = open('src/version/cef_version_macarm64.h').read()
m = re.search(r'#define CEF_VERSION \"([^\"]+)\"', h)
print(m.group(1))
")
echo "value=$ver" >> $GITHUB_OUTPUT

- name: Cache CEF binaries
uses: actions/cache@v4
if: ${{ inputs.bypass_cache != true }}
with:
path: |
build/cef_binary_*
build/cef*_macarm64
key: cef-macosarm64-v3-${{ steps.cef-version.outputs.value }}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does v3 mean here?


- name: Install build tools
run: python tools/requirements.py

- name: Download CEF binaries
run: python tools/download_cef.py

compile:
needs: download-cef
runs-on: macos-14
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Read CEF version
id: cef-version
run: |
ver=$(python3 -c "
import re, sys
h = open('src/version/cef_version_macarm64.h').read()
m = re.search(r'#define CEF_VERSION \"([^\"]+)\"', h)
print(m.group(1))
")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code duplicates.

echo "value=$ver" >> $GITHUB_OUTPUT

- name: Restore CEF cache
uses: actions/cache/restore@v4
if: ${{ inputs.bypass_cache != true }}
with:
path: |
build/cef_binary_*
build/cef*_macarm64
key: cef-macosarm64-v3-${{ steps.cef-version.outputs.value }}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does v3 mean here?


- name: Install build tools
run: python tools/requirements.py

- name: Prepare prebuilt CEF
run: python tools/automate.py --prebuilt-cef

- name: Verify CEF architecture
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verifying CEF architecture runs only on Mac? Linux and Windows not?

run: |
wrapper=$(ls build/cef*_macarm64/lib/libcef_dll_wrapper.a 2>/dev/null | head -1)
if [ -z "$wrapper" ]; then echo "libcef_dll_wrapper.a not found"; exit 1; fi
archs=$(lipo -info "$wrapper" 2>&1)
echo "$archs"
echo "$archs" | grep -q arm64 || { echo "ERROR: libcef_dll_wrapper.a is not arm64"; exit 1; }

- name: Configure CMake
run: cmake -S . -B build/_cmake_build -G Ninja -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build build/_cmake_build --parallel

- name: Stage build outputs
run: |
mkdir -p build/artifacts
cp build/_cmake_build/cefpython_py*.so build/artifacts/
cp build/_cmake_build/subprocess_build/subprocess build/artifacts/
cef_dir=$(ls -d build/cef*_macarm64 2>/dev/null | head -1)
find "$cef_dir/bin" -maxdepth 1 -mindepth 1 \
! -name 'cefclient*' ! -name 'cefsimple*' ! -name 'ceftests*' \
-exec cp -r {} build/artifacts/ \;

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-py${{ matrix.python-version }}-macosarm64
path: build/artifacts/
retention-days: 1

test:
needs: compile
runs-on: macos-14
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-py${{ matrix.python-version }}-macosarm64
path: build/artifacts/

- name: Set up cefpython3 package for testing
run: |
cp -r build/artifacts/. cefpython3/
chmod +x cefpython3/subprocess
# Ad-hoc sign our compiled binaries so macOS allows them to run.
# (Our freshly built binaries have no signature; unsigned binaries
# are blocked on macOS 14+.)
codesign --force --sign - cefpython3/subprocess
for f in cefpython3/cefpython_py*.so; do codesign --force --sign - "$f"; done

- name: Run unit tests
run: |
# Create a minimal app bundle so Python has a CFBundleIdentifier.
# CEF 130+ forms the MachPortRendezvousServer bootstrap service name
# as BaseBundleID()+".MachPortRendezvousServer."+pid. Without a
# bundle ID the name starts with "." which bootstrap_register rejects,
# causing renderer subprocesses to crash. Setting CFProcessPath
# before Python starts makes CFBundleGetMainBundle() return this
# bundle, giving BaseBundleID() a valid value before CefInitialize().
BUNDLE_DIR="${{ github.workspace }}/CEFPython.app"
mkdir -p "$BUNDLE_DIR/Contents/MacOS"
ln -sf "$(which python)" "$BUNDLE_DIR/Contents/MacOS/python"
cat > "$BUNDLE_DIR/Contents/Info.plist" << 'PLIST'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleIdentifier</key>
<string>org.cefpython</string>
<key>CFBundleName</key>
<string>CEFPython</string>
<key>CFBundleExecutable</key>
<string>python</string>
</dict>
</plist>
PLIST
PYTHONPATH="${{ github.workspace }}" \
CFProcessPath="$BUNDLE_DIR/Contents/MacOS/python" \
python unittests/_test_runner.py

wheel:
needs: test
runs-on: macos-14
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: build-py${{ matrix.python-version }}-macosarm64
path: build/artifacts/

- name: Set up cefpython3 package
run: cp -r build/artifacts/. cefpython3/

- name: Codesign binaries for distribution
run: |
# Ad-hoc sign the subprocess binary so macOS 14+ Gatekeeper allows
# it to execute when users install the wheel. Without signing,
# macOS blocks the unsigned binary and the GPU process (which uses
# the same binary with --type=gpu-process) exits with code 1003
# (GPU_DEAD_ON_ARRIVAL), causing a fatal crash.
codesign --force --sign - cefpython3/subprocess
for f in cefpython3/cefpython_py*.so; do codesign --force --sign - "$f"; done

- name: Build wheel
run: python tools/build_distrib.py
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The wheel is not tested.


- name: Upload wheel artifact
uses: actions/upload-artifact@v4
with:
name: cefpython3-py${{ matrix.python-version }}-macosarm64
path: build/dist/*.whl
Loading