Skip to content

Commit 3fd83d4

Browse files
linesightclaude
andcommitted
Eliminate CEF/build-tool overhead from test job
Include CEF runtime files in the compile artifact so the test job needs nothing except: checkout, setup-python, download artifact, copy, test. No requirements.py, no CEF cache restore, no automate.py. Also add pip cache to the wheel job's setup-python to speed up repeated requirements.py installs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a547642 commit 3fd83d4

1 file changed

Lines changed: 7 additions & 28 deletions

File tree

.github/workflows/ci-windows.yml

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ jobs:
6464
New-Item -ItemType Directory -Force build/artifacts
6565
Copy-Item build/_cmake_build/Release/cefpython_py*.pyd build/artifacts/
6666
Copy-Item build/_cmake_build/subprocess_build/Release/subprocess.exe build/artifacts/
67+
$cefBin = (Get-ChildItem build/cef*_win64 -Directory | Select-Object -First 1).FullName + "/bin"
68+
Get-ChildItem $cefBin | Where-Object { $_.Name -notmatch '^(cefclient|cefsimple|ceftests)' } |
69+
ForEach-Object { Copy-Item $_.FullName build/artifacts/ -Recurse -Force }
6770
6871
- name: Upload build artifacts
6972
uses: actions/upload-artifact@v4
@@ -90,29 +93,6 @@ jobs:
9093
with:
9194
python-version: ${{ matrix.python-version }}
9295

93-
- name: Read CEF version
94-
id: cef-version
95-
run: |
96-
$ver = (Select-String -Path src/version/cef_version_win.h `
97-
-Pattern '#define CEF_VERSION "([^"]+)"').Matches[0].Groups[1].Value
98-
echo "value=$ver" >> $env:GITHUB_OUTPUT
99-
100-
- name: Cache CEF binaries
101-
uses: actions/cache@v4
102-
if: ${{ inputs.bypass_cache != true }}
103-
with:
104-
path: build/cef_binary_*
105-
key: cef-windows64-${{ steps.cef-version.outputs.value }}
106-
107-
- name: Install build tools
108-
run: python tools/requirements.py
109-
110-
- name: Download CEF binaries
111-
run: python tools/download_cef.py
112-
113-
- name: Prepare prebuilt CEF
114-
run: python tools/automate.py --prebuilt-cef
115-
11696
- name: Download build artifacts
11797
uses: actions/download-artifact@v4
11898
with:
@@ -121,11 +101,9 @@ jobs:
121101

122102
- name: Set up cefpython3 package for testing
123103
run: |
124-
Copy-Item build/artifacts/cefpython_py*.pyd cefpython3/
125-
Copy-Item build/artifacts/subprocess.exe cefpython3/
126-
$cefBin = (Get-ChildItem build/cef*_win64 -Directory | Select-Object -First 1).FullName + "/bin"
127-
Get-ChildItem $cefBin | Where-Object { $_.Name -notmatch '^(cefclient|cefsimple|ceftests)' } |
128-
ForEach-Object { Copy-Item $_.FullName cefpython3/ -Recurse -Force }
104+
Get-ChildItem build/artifacts/ | ForEach-Object {
105+
Copy-Item $_.FullName cefpython3/ -Recurse -Force
106+
}
129107
130108
- name: Run unit tests
131109
run: python unittests/_test_runner.py
@@ -149,6 +127,7 @@ jobs:
149127
uses: actions/setup-python@v5
150128
with:
151129
python-version: ${{ matrix.python-version }}
130+
cache: 'pip'
152131

153132
- name: Read CEF version
154133
id: cef-version

0 commit comments

Comments
 (0)