build: try a sync

This commit is contained in:
Keeley Hammond
2023-12-01 10:22:38 -08:00
committed by Shelley Vohr
parent 9a3b05de7b
commit 3d8e477522

View File

@@ -3,6 +3,10 @@ name: Build MacOS
on:
push
env:
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac --custom-var=host_cpu=arm64'
IS_RELEASE: false
jobs:
install-dependencies:
runs-on: macos-13-xlarge
@@ -30,45 +34,47 @@ jobs:
# Ensure depot_tools does not update.
test -d depot_tools && cd depot_tools
touch .disable_auto_update
- run: echo 'export PATH="$PATH:'"$PWD"'/depot_tools"' >> $BASH_ENV
# - name: Gclient Sync
# run: |
# # If we did not restore a complete sync then we need to sync for realz
# if [ ! -s "src/electron/.circle-sync-done" ]; then
# gclient config \
# --name "src/electron" \
# --unmanaged \
# $GCLIENT_EXTRA_ARGS \
# "$CIRCLE_REPOSITORY_URL"
- run: echo 'export PATH="$PATH:'"$PWD"'/depot_tools"' >> $GITHUB_PATH
# step-gclient-sync, L287
- name: Gclient Sync
run: |
# If we did not restore a complete sync then we need to sync for realz
if [ ! -s "src/electron/.circle-sync-done" ]; then
gclient config \
--name "src/electron" \
--unmanaged \
$GCLIENT_EXTRA_ARGS \
"$GITHUB_ACTION_REPOSITORY"
# ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags
# if [ "$IS_RELEASE" != "true" ]; then
# # Re-export all the patches to check if there were changes.
# python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
# cd src/electron
# git update-index --refresh || true
# if ! git diff-index --quiet HEAD --; then
# # There are changes to the patches. Make a git commit with the updated patches
# git add patches
# GIT_COMMITTER_NAME="PatchUp" GIT_COMMITTER_EMAIL="73610968+patchup[bot]@users.noreply.github.com" git commit -m "chore: update patches" --author="PatchUp <73610968+patchup[bot]@users.noreply.github.com>"
# # Export it
# mkdir -p ../../patches
# git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
# if (node ./script/push-patch.js 2> /dev/null > /dev/null); then
# echo
# echo "======================================================================"
# echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch"
# echo "A new CI job will kick off shortly"
# echo "======================================================================"
# exit 1
# else
# echo
# echo "======================================================================"
# echo "There were changes to the patches when applying."
# echo "Check the CI artifacts for a patch you can apply to fix it."
# echo "======================================================================"
# exit 1
# fi
# fi
# fi
# fi
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags
if [ "$IS_RELEASE" != "true" ]; then
# Re-export all the patches to check if there were changes.
python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
cd src/electron
git update-index --refresh || true
# TODO(vertedinde): Let's not stress on patchup right now, just sync it
# if ! git diff-index --quiet HEAD --; then
# # There are changes to the patches. Make a git commit with the updated patches
# git add patches
# GIT_COMMITTER_NAME="PatchUp" GIT_COMMITTER_EMAIL="73610968+patchup[bot]@users.noreply.github.com" git commit -m "chore: update patches" --author="PatchUp <73610968+patchup[bot]@users.noreply.github.com>"
# # Export it
# mkdir -p ../../patches
# git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
# if (node ./script/push-patch.js 2> /dev/null > /dev/null); then
# echo
# echo "======================================================================"
# echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch"
# echo "A new CI job will kick off shortly"
# echo "======================================================================"
# exit 1
# else
# echo
# echo "======================================================================"
# echo "There were changes to the patches when applying."
# echo "Check the CI artifacts for a patch you can apply to fix it."
# echo "======================================================================"
# exit 1
# fi
# fi
fi
fi