mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
ci: use hermetic mac SDK for the release ffmpeg build (#50756)
* ci: use hermetic mac SDK for the release ffmpeg build gn gen out/ffmpeg runs as a raw gn invocation, so it never receives the mac_sdk_path arg that e build injects for out/Default. On macOS runners that means out/Default builds against the hermetic build-tools SDK while out/ffmpeg falls through to the runner's system Xcode SDK. Reuse the value e build already wrote so both builds share the same sysroot. Co-authored-by: Samuel Attard <sattard@anthropic.com> * ci: copy hermetic SDK symlink into out/ffmpeg and rewrite path mac_sdk_path must live under root_build_dir, so pointing out/ffmpeg at //out/Default/... doesn't work. Copy the xcode_links symlink tree into out/ffmpeg and rewrite the path. Gate on Darwin so Windows/Linux don't run the sed/cp at all. Co-authored-by: Samuel Attard <sattard@anthropic.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Samuel Attard <sattard@anthropic.com>
This commit is contained in:
12
.github/actions/build-electron/action.yml
vendored
12
.github/actions/build-electron/action.yml
vendored
@@ -208,7 +208,17 @@ runs:
|
||||
if: ${{ inputs.is-release == 'true' }}
|
||||
run: |
|
||||
cd src
|
||||
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true use_siso=true $GN_EXTRA_ARGS"
|
||||
# Reuse the hermetic mac_sdk_path that `e build` wrote for out/Default so
|
||||
# out/ffmpeg builds against the same SDK instead of the runner's system Xcode.
|
||||
# The path has to live under root_build_dir, so copy the symlink tree and
|
||||
# rewrite Default -> ffmpeg.
|
||||
MAC_SDK_ARG=""
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
mkdir -p out/ffmpeg
|
||||
cp -a out/Default/xcode_links out/ffmpeg/
|
||||
MAC_SDK_ARG=$(sed -n 's|^\(mac_sdk_path = "//out/\)Default/|\1ffmpeg/|p' out/Default/args.gn)
|
||||
fi
|
||||
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true use_siso=true $MAC_SDK_ARG $GN_EXTRA_ARGS"
|
||||
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg
|
||||
- name: Remove Clang problem matcher
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user