Skip to content

Commit

Permalink
build: add dist, chromedriver & mksnapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
VerteDinde committed Feb 5, 2024
1 parent 03ad2a7 commit c6d6f70
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/mac-build.yml
Expand Up @@ -8,6 +8,8 @@ on:
env:
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac --custom-var=host_cpu=arm64'
IS_RELEASE: false
# GENERATE_SYMBOLS: true only on release builds
GENERATE_SYMBOLS: false
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
AZURE_STORAGE_CONTAINER_NAME: ${{ secrets.AZURE_STORAGE_CONTAINER_NAME }}
Expand Down Expand Up @@ -327,3 +329,88 @@ jobs:
NINJA_SUMMARIZE_BUILD=1 e build -j $NUMBER_OF_NINJA_PROCESSES
cp out/Default/.ninja_log out/electron_ninja_log
node electron/script/check-symlinks.js
- name: Build Electron dist.zip
run: |
cd src
if [ "$SKIP_DIST_ZIP" != "1" ]; then
if [ "$IS_RELEASE"]; then
ADDITIONAL_TARGETS = "electron:node_headers third_party/electron_node:overlapped-checker electron:hunspell_dictionaries_zip"
fi
e build electron:electron_dist_zip $ADDITIONAL_TARGETS -j $NUMBER_OF_NINJA_PROCESSES
if [ "$CHECK_DIST_MANIFEST" == "1" ]; then
target_os=mac
target_cpu=arm64
if [ "$MAS_BUILD" == x"true" ]; then
target_os=mac_mas
fi
if [ "$TARGET_ARCH" == "x64" ]; then
target_cpu=x64
fi
electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.$target_os.$target_cpu.manifest
fi
fi
- name: Build Mksnapshot
run: |
cd src
e build electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
# Remove unused args from mksnapshot_args
SEDOPTION="-i ''"
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
sed $SEDOPTION '/The gn arg use_goma=true .*/d' out/Default/mksnapshot_args
if [ "$SKIP_DIST_ZIP" != "1" ]; then
e build electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
(cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
fi
- name: Build Chromedriver
run: |
cd src
e build electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES
e build electron:electron_chromedriver_zip
- name: Generate & Zip Symbols
run: |
if [ "$GENERATE_SYMBOLS" == "true" ]; then
e build electron:electron_symbols
fi
cd src
export BUILD_PATH="$PWD/out/Default"
e build electron:licenses
e build electron:electron_version_file
electron/script/zip-symbols.py -b $BUILD_PATH
# TODO(vertedinde): handle creating ffmpeg and hunspell for release builds
- name: Move all Generated Artifacts to Upload Folder
run: |
rm -rf generated_artifacts_darwin-arm64
mkdir generated_artifacts_darwin-arm64
mv_if_exist() {
if [ -f "$1" ] || [ -d "$1" ]; then
echo Storing $1
mv $1 generated_artifacts_darwin-arm64
else
echo Skipping $1 - It is not present on disk
fi
}
cp_if_exist() {
if [ -f "$1" ] || [ -d "$1" ]; then
echo Storing $1
cp $1 generated_artifacts_darwin-arm64
else
echo Skipping $1 - It is not present on disk
fi
}
mv_if_exist src/out/Default/dist.zip
mv_if_exist src/out/Default/gen/node_headers.tar.gz
mv_if_exist src/out/Default/symbols.zip
mv_if_exist src/out/Default/mksnapshot.zip
mv_if_exist src/out/Default/chromedriver.zip
mv_if_exist src/out/ffmpeg/ffmpeg.zip
mv_if_exist src/out/Default/hunspell_dictionaries.zip
mv_if_exist src/cross-arch-snapshots
cp_if_exist src/out/electron_ninja_log
cp_if_exist src/out/Default/.ninja_log
- name: Upload Artifacts for Testing
uses: actions/upload-artifact@v4
with:
name: generated_artifacts_darwin-arm64
path: ./generated_artifacts_darwin-arm64

0 comments on commit c6d6f70

Please sign in to comment.