Skip to content

Commit 31470b6

Browse files
linesightclaude
andcommitted
ci: add download-cef job to macOS workflow so CEF is downloaded once
Matches the pattern already used in ci-linux.yml and ci-windows.yml: a dedicated download-cef job saves the cache, and each compile matrix job restores from it rather than downloading independently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9159645 commit 31470b6

1 file changed

Lines changed: 41 additions & 5 deletions

File tree

.github/workflows/ci-macos.yml

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,46 @@ on:
1313
default: false
1414

1515
jobs:
16+
download-cef:
17+
runs-on: macos-14
18+
timeout-minutes: 15
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.10"
27+
28+
- name: Read CEF version
29+
id: cef-version
30+
run: |
31+
ver=$(python3 -c "
32+
import re, sys
33+
h = open('src/version/cef_version_macarm64.h').read()
34+
m = re.search(r'#define CEF_VERSION \"([^\"]+)\"', h)
35+
print(m.group(1))
36+
")
37+
echo "value=$ver" >> $GITHUB_OUTPUT
38+
39+
- name: Cache CEF binaries
40+
uses: actions/cache@v4
41+
if: ${{ inputs.bypass_cache != true }}
42+
with:
43+
path: |
44+
build/cef_binary_*
45+
build/cef*_macarm64
46+
key: cef-macosarm64-v3-${{ steps.cef-version.outputs.value }}
47+
48+
- name: Install build tools
49+
run: python tools/requirements.py
50+
51+
- name: Download CEF binaries
52+
run: python tools/download_cef.py
53+
1654
compile:
55+
needs: download-cef
1756
runs-on: macos-14
1857
timeout-minutes: 90
1958
strategy:
@@ -41,8 +80,8 @@ jobs:
4180
")
4281
echo "value=$ver" >> $GITHUB_OUTPUT
4382
44-
- name: Cache CEF binaries
45-
uses: actions/cache@v4
83+
- name: Restore CEF cache
84+
uses: actions/cache/restore@v4
4685
if: ${{ inputs.bypass_cache != true }}
4786
with:
4887
path: |
@@ -53,9 +92,6 @@ jobs:
5392
- name: Install build tools
5493
run: python tools/requirements.py
5594

56-
- name: Download CEF binaries
57-
run: python tools/download_cef.py
58-
5995
- name: Prepare prebuilt CEF
6096
run: python tools/automate.py --prebuilt-cef
6197

0 commit comments

Comments
 (0)