|
@@ -168,6 +168,13 @@ step-setup-env-for-build: &step-setup-env-for-build
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
+step-restore-brew-cache: &step-restore-brew-cache
|
|
|
+ restore_cache:
|
|
|
+ paths:
|
|
|
+ - /usr/local/Homebrew
|
|
|
+ keys:
|
|
|
+ - v1-brew-cache-{{ arch }}
|
|
|
+
|
|
|
step-install-nodejs-on-mac: &step-install-nodejs-on-mac
|
|
|
run:
|
|
|
name: Install Node.js 10 on MacOS
|
|
@@ -178,6 +185,34 @@ step-install-nodejs-on-mac: &step-install-nodejs-on-mac
|
|
|
echo 'export PATH="/usr/local/opt/node@10/bin:$PATH"' >> $BASH_ENV
|
|
|
fi
|
|
|
|
|
|
+# On macOS the npm install command during gclient sync was run on a linux
|
|
|
+# machine and therefore installed a slightly different set of dependencies
|
|
|
+# Notably "fsevents" is a macOS only dependency, we rerun npm install once
|
|
|
+# we are on a macOS machine to get the correct state
|
|
|
+step-install-npm-deps-on-mac: &step-install-npm-deps-on-mac
|
|
|
+ run:
|
|
|
+ name: Install NPM Dependencies on MacOS
|
|
|
+ command: |
|
|
|
+ if [ "`uname`" == "Darwin" ]; then
|
|
|
+ cd src/electron
|
|
|
+ npm install
|
|
|
+ fi
|
|
|
+
|
|
|
+# This step handles the differences between the linux "gclient sync"
|
|
|
+# and the expected state on macOS
|
|
|
+step-fix-sync-on-mac: &step-fix-sync-on-mac
|
|
|
+ run:
|
|
|
+ name: Fix Sync on macOS
|
|
|
+ command: |
|
|
|
+ if [ "`uname`" == "Darwin" ]; then
|
|
|
+ # Fix Clang Install (wrong binary)
|
|
|
+ rm -rf src/third_party/llvm-build
|
|
|
+ python src/tools/clang/scripts/update.py
|
|
|
+ # Fix Framework Header Installs (symlinks not retained)
|
|
|
+ rm -rf src/electron/external_binaries
|
|
|
+ python src/electron/script/update-external-binaries.py
|
|
|
+ fi
|
|
|
+
|
|
|
step-install-gnutar-on-mac: &step-install-gnutar-on-mac
|
|
|
run:
|
|
|
name: Install gnu-tar on macos
|
|
@@ -494,6 +529,7 @@ steps-checkout: &steps-checkout
|
|
|
- *step-checkout-electron
|
|
|
- *step-depot-tools-get
|
|
|
- *step-depot-tools-add-to-path
|
|
|
+ - *step-restore-brew-cache
|
|
|
- *step-install-nodejs-on-mac
|
|
|
- *step-install-gnutar-on-mac
|
|
|
|
|
@@ -514,6 +550,10 @@ steps-checkout: &steps-checkout
|
|
|
paths:
|
|
|
- ~/.gclient-cache
|
|
|
key: v1-gclient-cache-{{ arch }}-{{ checksum "src/electron/DEPS" }}
|
|
|
+ - save_cache:
|
|
|
+ paths:
|
|
|
+ - /usr/local/Homebrew
|
|
|
+ key: v1-brew-cache-{{ arch }}
|
|
|
|
|
|
- run:
|
|
|
name: Remove some unused data to avoid storing it in the workspace
|
|
@@ -552,7 +592,10 @@ steps-electron-build-for-tests: &steps-electron-build-for-tests
|
|
|
at: .
|
|
|
- *step-depot-tools-add-to-path
|
|
|
- *step-setup-env-for-build
|
|
|
+ - *step-restore-brew-cache
|
|
|
- *step-install-nodejs-on-mac
|
|
|
+ - *step-install-npm-deps-on-mac
|
|
|
+ - *step-fix-sync-on-mac
|
|
|
- *step-gn-gen-default
|
|
|
|
|
|
# Electron app
|
|
@@ -599,6 +642,7 @@ steps-electron-build-for-publish: &steps-electron-build-for-publish
|
|
|
- *step-checkout-electron
|
|
|
- *step-depot-tools-get
|
|
|
- *step-depot-tools-add-to-path
|
|
|
+ - *step-restore-brew-cache
|
|
|
- *step-install-nodejs-on-mac
|
|
|
- *step-gclient-sync
|
|
|
- *step-setup-env-for-build
|
|
@@ -731,6 +775,7 @@ steps-tests: &steps-tests
|
|
|
- *step-electron-dist-unzip
|
|
|
- *step-mksnapshot-unzip
|
|
|
- *step-setup-linux-for-headless-testing
|
|
|
+ - *step-restore-brew-cache
|
|
|
- *step-install-nodejs-on-mac
|
|
|
|
|
|
- run:
|
|
@@ -795,9 +840,10 @@ jobs:
|
|
|
<<: *steps-checkout
|
|
|
|
|
|
mac-checkout:
|
|
|
- <<: *machine-mac-large
|
|
|
+ <<: *machine-linux-2xlarge
|
|
|
environment:
|
|
|
- <<: *env-mac-large
|
|
|
+ <<: *env-linux-2xlarge
|
|
|
+ GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
|
|
<<: *steps-checkout
|
|
|
|
|
|
# Layer 2: Builds.
|