-
-
Notifications
You must be signed in to change notification settings - Fork 475
Add CEF 147, Python 3.10–3.14, Linux/macOS ARM64/Windows support with modern build system #691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
linesight
wants to merge
160
commits into
cztomczak:cefpython147
Choose a base branch
from
linesight:cefpython147-qt
base: cefpython147
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 136 commits
Commits
Show all changes
160 commits
Select commit
Hold shift + click to select a range
98cd08e
Modernize build toolchain for CEF 123+ and Python 3.10+
linesight 252b5da
fix x86/x64 mismatch in MSVC compiler initialization on Windows
linesight e813552
CEF 146: fix windowed rendering with Alloy runtime and deferred brows…
linesight 71afdf0
CEF 146: update CEF headers, client handlers, and build tools
linesight 7ad34c6
ignore .claude/ directory
linesight a933a32
CEF 146: fix unit tests for Chrome 130+ behavioral changes
linesight 22a939f
fix CEFPYTHON_BINARY_NOTSET when build.py is run without explicit ver…
linesight 249129e
CEF 146: fix Initialize() race condition and update unit tests
linesight ca4d507
CEF 146: fix GPU crash on Windows by defaulting to ANGLE OpenGL backend
linesight 9eaacaa
CEF 146: fix JS bindings race condition and update snippet examples
linesight af5a2bf
CEF 146: add crossdomain_bindings.py snippet and update README
linesight f4f589a
CEF 146: fix cookie visitor thread assertion and update snippet URLs
linesight 15a65ca
CEF 146: fix CanSendCookie/CanSaveCookie and cookie API issues
linesight 5cb6c38
Add Windows CI workflow with timeout guard
linesight fbb6011
Add Python 3.12/3.13/3.14 support and fix Python 3.12 SyntaxWarnings
linesight d0c2908
Upgrade Cython 0.29.36 to 3.2.4 for Python 3.13 compatibility
linesight 6d3587e
Fix Cython 3.x deprecation warnings and performance hints
linesight 7849fb0
Add workflow_dispatch with bypass_cache option to CI
linesight 0dbdf15
Fix first-pass C++ build error for Python 3.14 (and all versions)
linesight f9a5aaf
Migrate build system to scikit-build-core + CMake
linesight 77cbf1d
Track cefpython3/__init__.py; gitignore build outputs in cefpython3/
linesight aa14253
Fix missing docopt in CI test job
linesight b8a6d6d
Move 'Install build tools' before automate.py in all CI jobs
linesight 8180b39
Fix cefpython3 not importable during unit tests
linesight f3c23c7
Eliminate CEF/build-tool overhead from test job
linesight 36bb856
Rewrite build_distrib.py to package pre-built artifacts into a wheel
linesight b9679b0
Make .pxi files static; remove cmake_generate_pxi.py
linesight b5cff20
Add Linux CI workflow and make build.py cross-platform
linesight 39f201e
Fix CEF prebuilt build failing on GCC 13 (Ubuntu 24.04)
linesight 24d0a6d
Fix Linux cmake --build failures: update CEF 146 Linux headers and ad…
linesight 0808057
Fix CEF 146 API changes in GTK handlers; exclude dpi_aware on Linux
linesight ed41dde
Guard dpi_aware.cpp with #ifdef OS_WIN instead of CMake exclusion
linesight c941cd5
Fix Linux-specific compile errors in x11.cpp and print_handler_gtk.cpp
linesight 383bc90
Fix print_handler_gtk.cpp for CEF 146 / GTK 3.24 API changes
linesight d38b533
Fix CEF 146 API changes in Linux message loop and print handler
linesight f36d710
Add GTK3 includes/libs to main module target on Linux
linesight 62fc993
Fix Linux CI build: C++20 standard, subprocess link, removed APIs
linesight 6b1abee
Fix dpi_aware.cpp guard: OS_WIN -> _WIN32
linesight f0d242f
Fix X11/CEF 'Status' typedef conflict in x11.h on Linux
linesight 5bfa8fc
Fix Linux CI tests: add --no-sandbox for subprocess launch
linesight 228bfb4
add windows CI at this branch
linesight d9f75a5
Add --disable-dev-shm-usage for Linux CI to fix shared memory failure
linesight c41ec22
Fix Linux CI test failures and improve cache hit speed
linesight f6f2494
Fix Linux CI: add --no-zygote to bypass zygote FD-passing failure
linesight 73ccde9
Replace pkg_resources with packaging.version in examples
linesight a8745e8
Add --in-process-gpu for Linux CI to fix OnContextInitialized timeout
linesight e159e35
Add macOS ARM (Apple Silicon) CI workflow and build support
linesight 58b92ad
Fix macOS ARM64 compilation errors in macOS message loop and CMake
linesight b6ffe1b
Retry download on truncated response in download_cef.py
linesight 0e8c637
Fix CEF_API_HASH_PLATFORM missing from cef_version_macarm64.h
linesight 9b84fdb
Fix CI: resize /dev/shm and disable out-of-process storage service
linesight 1afdedb
disable windows ci for this branch for now
linesight 359ddd2
Fix macOS ARM64 compile errors: update stale cef_types_mac.h and cef_…
linesight 7e94c8b
Revert diagnostic LOG(ERROR) back to LOG(INFO) in OnBeforeChildProces…
linesight 3428095
Add missing cef_application_mac.h to bundled headers
linesight 517d352
Fix util_mac.mm: explicit cast void* -> NSView* for ARM64
linesight 06af762
Remove -std=gnu++11 from macOS target_compile_options
linesight 9e77690
Fix window_info.pyx Darwin SetAsChild: use CefRect instead of 5-arg form
linesight 756edd2
Update cef_mac.pxd: fix SetAsChild signature, add runtime_style/enum
linesight 91ad3a3
Extend OnContextInitialized wait from 6s to 30s; add fallback in Crea…
linesight 259417d
Add --single-process for Linux CI to fix renderer Mojo bootstrap failure
linesight 1e6ebc9
Fix macOS ARM CI: bust stale x86_64 CEF cache, add arch check
linesight 6b138dc
Pass all switches in argv to CefMainArgs on Linux
linesight e309b80
Fix macOS ARM CI: build libcef_dll_wrapper for native arch
linesight 5ae9c4c
Fix macOS subprocess: add rpath so dyld can find CEF framework
linesight 4640a4d
Re-add utility service in-process flags for Linux CI
linesight 799d893
Fix macOS CI tests: add no-sandbox and in-process-gpu switches
linesight 2c1ef2b
Fix macOS ARM OSR: exclude disable-surfaces/begin-frame switches, ext…
linesight 1db0f0d
Use async CreateBrowser() + pump loop on Linux to avoid CreateBrowser…
linesight e2fd2df
Fix macOS CI: use --single-process to bypass Mach port rendezvous fai…
linesight e2e5a99
Use --disable-setuid-sandbox instead of --no-sandbox on Linux CI
linesight 8cf68ca
Fix macOS CI: run tests in user login session for Mach port rendezvous
linesight a524002
Fix Linux CefMainArgs empty command line; log subprocess type
linesight d73d233
Fix Linux subprocess crash: don't set no_sandbox=1 on Linux
linesight 4acd649
Add Linux CEF 146 native-windowed embedding support
linesight 59d74a4
Fix Linux unit test: close JS popup without GLib event dispatch
linesight b6b92f5
build_distrib: fix Linux/macOS support
linesight e3d1918
Fix flaky OSR test: wait for OnAccessibilityLocationChange on slow CI
linesight 978c5e9
osr_test: extend accessibility location-change grace period to 3 s
linesight cb6ef7d
Fix macOS CI V8 OOM: remove --single-process now that launchctl asuse…
linesight 0519110
Fix macOS CI: run network service in-process to avoid Mach port rende…
linesight 307c7f9
gitignore: add Linux build artifacts for cefpython3/
linesight cec7ee4
cookie: sync CefCookie struct and thread assertion with CEF 146
linesight 9a54787
linux: fix heap corruption in _wait_for_map XWindowAttributes buffer
linesight ecfc97e
osr_test: fix flaky OnAccessibilityLocationChange on Linux CI
linesight d1e6f9b
osr_test: drop OnAccessibilityLocationChange assert
linesight 7c104fc
api, docs: sync with source and drop Python 2 / pre-3.10 support
linesight 87d25a8
wxpython, x11: fix browser not resizing on Linux window resize
linesight 66049fb
qt: context menu + PyQt6/PySide6 Linux embedding fixes
linesight 03ff1bd
linux: fix window-close hang, popup lifecycle, PDF frame crash
linesight 06f9ead
macos: fix Mach rendezvous crash by dropping sudo launchctl asuser
linesight 5912f0d
macos: fix CI tests, build.py runtime/codesign, and gitignore
linesight 95fbddc
macos: fix Mach rendezvous by injecting CFBundleIdentifier + CFProces…
linesight 050db65
macos/linux: fix NetworkServiceInProcess feature name (was "2"-less v…
linesight 741359b
macos: ad-hoc codesign subprocess and .so to fix MachPortRendezvous f…
linesight 7f99583
macos: inject CFBundleIdentifier in subprocess before MachPortRendezv…
linesight 2110147
macos: fix extern C SubprocessMacInit declaration scope
linesight e6143d9
macos: link subprocess against CoreFoundation
linesight 500a9d2
macos: embed Info.plist in subprocess binary via -sectcreate
linesight a4dad65
macos: codesign Python interpreter to fix bootstrap namespace restric…
linesight 9fb5c91
macos: replace removed --in-process-renderer with --single-process
linesight f5682bc
macos: add --jitless to fix V8 CodeRange OOM in --single-process mode
linesight 1e2cac4
macos: minimize diff vs 146-linux in build.py and unit test files
linesight 9373155
macos: fix CRLF line endings in .gitignore
linesight 44339c1
macos: drop Intel Mac support, arm64 only
linesight f45f0d0
macos: fix GPU crash, drop redundant switches, codesign wheel binaries
linesight 388cb4d
download_cef: add HTTP Range resume support and increase retries
linesight 0d8549d
build_distrib: preserve executable permissions in wheel zip entries
linesight f7c75a0
build: suppress false-positive -Wstringop-overflow warnings with GCC …
linesight 6fa9f76
ci: ensure subprocess is executable in wheel job
linesight 596bb61
ci: flatten wheel pipeline and deduplicate CEF download
linesight 9a16e85
build: extend -Wno-stringop-overflow to LTO link step
linesight 756ba5a
build: update CEF to 147.0.10 and configure CI for cefpython147 branch
linesight e44b0b4
fix: force xcb on Linux and warn on handle=0 in Wayland sessions
linesight 230f562
fix: Wayland xcb forcing, HiDPI scaling, and handle=0 diagnostic for …
linesight 53495ec
docs: use upstream wording in README search instructions
linesight 5ebbbea
ci: add download-cef job to macOS workflow so CEF is downloaded once
linesight 2a47d56
cleanup: remove dead legacy build.py fallback from cefpython_public_a…
linesight 03aecfb
examples: replace packaging.version with stdlib tuple comparison
linesight e9d3ff1
fix: guard against NULL CefBrowser during rapid frame lifecycle trans…
linesight 1eaf4e7
fix: make OnTextSelectionChanged click target robust against CI layou…
linesight f06df36
Sync cefpython147-qt with cefpython147 (2026-05-09)
linesight 0c8544d
fix: embed CEF compatibility.manifest in Windows subprocess.exe
linesight e978a7a
build: remove unused src/include/capi/ headers
linesight b6636b9
ci: trigger workflows on PRs targeting cefpython147
linesight 7cef195
tools: drop Python 2.7/3.4-3.9 remnants; fix download_cef copyright year
linesight 796481b
build: CMake/build-system fixes, de-duplication and cleanups
linesight 0052472
refactor(linux): rewrite windowing/message-loop/embedding for CEF 147…
linesight e84ccad
build(cmake): drop pointless Windows chrome-sandbox exclude; document…
linesight f05414c
examples(qt): embed via direct SetAsChild; defer window close to OnBe…
linesight dd3b982
docs(knowledge-base): document the conditional Linux sandbox behavior
linesight 0193357
refactor(linux): drop child-process switch stripping (fixed upstream …
linesight 073982f
refactor(cef): re-import clean CEF 147 headers; source generated head…
linesight f72bd37
feat(helpers): add cef.UnraisableHook for exceptions escaping handlers
linesight 47477fc
build: derive CEF API hash from cef_api_versions.h
linesight cf415ae
refactor(cython): make C++ callback boundaries noexcept consistently
linesight 8227edb
build(cython): drop platform_cimports.pxi workaround; keep IF/DEF usa…
linesight e225ce1
fix(#676): reference and debug-log the NULL-browser fallback in cooki…
linesight 816c5c3
docs(linux): correct x11/runtime-style/ozone comments
linesight 34323da
refactor: remove RunContextMenu handler; use CEF's native context menu
linesight 3d86403
docs: fix copyright year on resource_request_handler.h (2012 -> 2026)
linesight 9547623
ci: harmonize linux/macOS/windows workflows; test the built wheel
linesight 33815de
build,ci: unique per-build dev wheel versions
linesight d4fe107
docs(build_distrib): add packaging-workflow overview to the module do…
linesight a4d10d4
build: complete wheel metadata, single-sourced from pyproject [project]
linesight 869e736
tools: de-duplicate CEF version-header reading into cef_version.py
linesight 02a57bb
build: remove unused tools/cython_setup.py
linesight 200b686
build: shrink the Linux wheel (strip libcef.so + compress) [#262]
linesight c8bd3ef
build: bundle msvcp140.dll in the Windows wheel (Issue #359)
linesight 978a0fd
ci: run the unit tests once, against the installed wheel
linesight 055cbbd
Create browser from OnContextInitialized instead of polling for conte…
linesight 3743d8f
build: add long project description to wheel metadata
linesight 80b17cb
refactor(linux): drop sandbox-availability probe; --no-sandbox uncond…
linesight 8e2e732
Align ResourceRequestHandler NULL frame/browser handling with CEF's c…
linesight b9a6de7
Correct the NULL-browser comment in GetPyFrame
linesight 12112f4
ci: publish the wheel as a non-zipped artifact for direct download
linesight 053c458
Report CEF API hash and version from CEF's cef_api_hash.h macros
linesight 5090073
Clarify UnraisableHook covers all noexcept callbacks, not just handlers
linesight 8ca1ba8
Create the browser immediately after Initialize() instead of via OnCo…
linesight cd47d09
build: keep libcef.so symbol table in the Linux wheel
linesight File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} | ||
|
|
||
| - 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 | ||
|
linesight marked this conversation as resolved.
Outdated
|
||
|
|
||
| - 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 | ||
|
linesight marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Upload wheel artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cefpython3-py${{ matrix.python-version }}-linux64 | ||
| path: build/dist/*.whl | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} | ||
|
linesight marked this conversation as resolved.
Outdated
|
||
|
|
||
| - 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)) | ||
| ") | ||
|
linesight marked this conversation as resolved.
Outdated
|
||
| 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 }} | ||
|
linesight marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Install build tools | ||
| run: python tools/requirements.py | ||
|
|
||
| - name: Prepare prebuilt CEF | ||
| run: python tools/automate.py --prebuilt-cef | ||
|
|
||
| - name: Verify CEF architecture | ||
|
linesight marked this conversation as resolved.
Outdated
|
||
| 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 | ||
|
linesight marked this conversation as resolved.
Outdated
|
||
|
|
||
| - name: Upload wheel artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cefpython3-py${{ matrix.python-version }}-macosarm64 | ||
| path: build/dist/*.whl | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.