-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update to electron 11 (#110759)
* chore: bump [email protected] * build: add mac arm64 target * chore: bump [email protected] * fix: remove macOS workaround for devtools with custom titlebar electron/electron#26395 * chore: bump [email protected] * chore: bump [email protected] * fixup! remove macOS workaround for devtools with custom titlebar
- Loading branch information
1 parent
10d92e5
commit 0baf6bb
Showing
44 changed files
with
604 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
disturl "https://electronjs.org/headers" | ||
target "9.3.3" | ||
target "11.0.2" | ||
runtime "electron" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2020-11-23T10:00:34.612Z | ||
2020-11-23T17:57:03.428Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ steps: | |
|
||
- task: NodeTool@0 | ||
inputs: | ||
versionSpec: "12.14.1" | ||
versionSpec: "12.18.3" | ||
|
||
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2 | ||
inputs: | ||
|
@@ -53,35 +53,68 @@ steps: | |
git merge $(node -p "require('./package.json').distro") | ||
displayName: Merge distro | ||
|
||
- script: | | ||
echo -n $VSCODE_ARCH > .build/arch | ||
displayName: Prepare arch cache flag | ||
|
||
- script: | | ||
npx https://aka.ms/enablesecurefeed standAlone | ||
displayName: Switch to Terrapin packages | ||
|
||
- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1 | ||
inputs: | ||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' | ||
keyfile: '.build/arch, build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' | ||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules' | ||
vstsFeed: 'npm-vscode' | ||
|
||
- script: | | ||
set -e | ||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile | ||
sudo xcode-select -s /Applications/Xcode_12.2.app | ||
displayName: Switch to Xcode 12 | ||
condition: eq(variables['VSCODE_ARCH'], 'arm64') | ||
|
||
- script: | | ||
set -e | ||
npm install -g [email protected] | ||
node-gyp --version | ||
displayName: Update node-gyp | ||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) | ||
|
||
- script: | | ||
set -e | ||
export npm_config_arch=$(VSCODE_ARCH) | ||
export npm_config_node_gyp=$(which node-gyp) | ||
export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk | ||
ls /Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ | ||
CHILD_CONCURRENCY=1 yarn --frozen-lockfile --verbose | ||
displayName: Install dependencies | ||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) | ||
|
||
- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1 | ||
inputs: | ||
keyfile: 'build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' | ||
keyfile: '.build/arch, build/.cachesalt, .yarnrc, remote/.yarnrc, **/yarn.lock, !**/node_modules/**/yarn.lock, !**/.*/**/yarn.lock' | ||
targetfolder: '**/node_modules, !**/node_modules/**/node_modules' | ||
vstsFeed: 'npm-vscode' | ||
condition: and(succeeded(), ne(variables['CacheRestored'], 'true')) | ||
|
||
- script: | | ||
set -e | ||
export npm_config_arch=$(VSCODE_ARCH) | ||
export npm_config_node_gyp=$(which node-gyp) | ||
export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk | ||
ls /Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ | ||
yarn postinstall | ||
displayName: Run postinstall scripts | ||
condition: and(succeeded(), eq(variables['CacheRestored'], 'true')) | ||
|
||
- script: | | ||
set -e | ||
export SDKROOT=/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk | ||
ls /Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ | ||
yarn electron-rebuild | ||
displayName: Rebuild native modules for ARM64 | ||
condition: eq(variables['VSCODE_ARCH'], 'arm64') | ||
|
||
- script: | | ||
set -e | ||
node build/azure-pipelines/mixin | ||
|
@@ -90,75 +123,97 @@ steps: | |
- script: | | ||
set -e | ||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ | ||
yarn gulp vscode-darwin-min-ci | ||
yarn gulp vscode-darwin-$(VSCODE_ARCH)-min-ci | ||
displayName: Build | ||
|
||
- script: | | ||
set -e | ||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ | ||
yarn gulp vscode-reh-darwin-min-ci | ||
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \ | ||
yarn gulp vscode-reh-web-darwin-min-ci | ||
displayName: Build | ||
displayName: Build reh | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64')) | ||
|
||
- script: | | ||
set -e | ||
yarn electron $(VSCODE_ARCH) | ||
displayName: Download Electron | ||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
|
||
- script: | | ||
set -e | ||
security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain | ||
security default-keychain -s $(agent.tempdirectory)/buildagent.keychain | ||
security unlock-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain | ||
echo "$(macos-developer-certificate)" | base64 -D > $(agent.tempdirectory)/cert.p12 | ||
security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(macos-developer-certificate-key)" -T /usr/bin/codesign | ||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain | ||
VSCODE_ARCH="$(VSCODE_ARCH)" DEBUG=electron-osx-sign* node build/darwin/sign.js | ||
displayName: Set Hardened Entitlements | ||
|
||
- script: | | ||
set -e | ||
./scripts/test.sh --build --tfs "Unit Tests" | ||
displayName: Run unit tests (Electron) | ||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
|
||
- script: | | ||
set -e | ||
yarn test-browser --build --browser chromium --browser webkit --browser firefox --tfs "Browser Unit Tests" | ||
displayName: Run unit tests (Browser) | ||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
|
||
- script: | | ||
# Figure out the full absolute path of the product we just built | ||
# including the remote server and configure the integration tests | ||
# to run with these builds instead of running out of sources. | ||
set -e | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) | ||
APP_NAME="`ls $APP_ROOT | head -n 1`" | ||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \ | ||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin" \ | ||
./scripts/test-integration.sh --build --tfs "Integration Tests" | ||
displayName: Run integration tests (Electron) | ||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
|
||
- script: | | ||
set -e | ||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \ | ||
./resources/server/test/test-web-integration.sh --browser webkit | ||
displayName: Run integration tests (Browser) | ||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
|
||
- script: | | ||
set -e | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) | ||
APP_NAME="`ls $APP_ROOT | head -n 1`" | ||
INTEGRATION_TEST_ELECTRON_PATH="$APP_ROOT/$APP_NAME/Contents/MacOS/Electron" \ | ||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-darwin" \ | ||
./resources/server/test/test-remote-integration.sh | ||
displayName: Run remote integration tests (Electron) | ||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
|
||
- script: | | ||
set -e | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) | ||
APP_NAME="`ls $APP_ROOT | head -n 1`" | ||
yarn smoketest --build "$APP_ROOT/$APP_NAME" | ||
continueOnError: true | ||
displayName: Run smoke tests (Electron) | ||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
|
||
- script: | | ||
set -e | ||
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \ | ||
yarn smoketest --web --headless | ||
continueOnError: true | ||
displayName: Run smoke tests (Browser) | ||
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64'), eq(variables['VSCODE_STEP_ON_IT'], 'false')) | ||
|
||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
artifactName: crash-dump-macos | ||
artifactName: crash-dump-macos-$(VSCODE_ARCH) | ||
targetPath: .build/crashes | ||
displayName: 'Publish Crash Reports' | ||
continueOnError: true | ||
|
@@ -173,25 +228,14 @@ steps: | |
|
||
- script: | | ||
set -e | ||
security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain | ||
security default-keychain -s $(agent.tempdirectory)/buildagent.keychain | ||
security unlock-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain | ||
echo "$(macos-developer-certificate)" | base64 -D > $(agent.tempdirectory)/cert.p12 | ||
security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(macos-developer-certificate-key)" -T /usr/bin/codesign | ||
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain | ||
DEBUG=electron-osx-sign* node build/darwin/sign.js | ||
displayName: Set Hardened Entitlements | ||
|
||
- script: | | ||
set -e | ||
pushd $(agent.builddirectory)/VSCode-darwin && zip -r -X -y $(agent.builddirectory)/VSCode-darwin.zip * && popd | ||
pushd $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) && zip -r -X -y $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH).zip * && popd | ||
displayName: Archive build | ||
|
||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1 | ||
inputs: | ||
ConnectedServiceName: 'ESRP CodeSign' | ||
FolderPath: '$(agent.builddirectory)' | ||
Pattern: 'VSCode-darwin.zip' | ||
Pattern: 'VSCode-darwin-$(VSCODE_ARCH).zip' | ||
signConfigType: inlineSignParams | ||
inlineOperation: | | ||
[ | ||
|
@@ -212,11 +256,11 @@ steps: | |
displayName: Codesign | ||
|
||
- script: | | ||
zip -d $(agent.builddirectory)/VSCode-darwin.zip "*.pkg" | ||
zip -d $(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH).zip "*.pkg" | ||
displayName: Clean Archive | ||
|
||
- script: | | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) | ||
APP_NAME="`ls $APP_ROOT | head -n 1`" | ||
BUNDLE_IDENTIFIER=$(node -p "require(\"$APP_ROOT/$APP_NAME/Contents/Resources/app/product.json\").darwinBundleIdentifier") | ||
echo "##vso[task.setvariable variable=BundleIdentifier]$BUNDLE_IDENTIFIER" | ||
|
@@ -226,7 +270,7 @@ steps: | |
inputs: | ||
ConnectedServiceName: 'ESRP CodeSign' | ||
FolderPath: '$(agent.builddirectory)' | ||
Pattern: 'VSCode-darwin.zip' | ||
Pattern: 'VSCode-darwin-$(VSCODE_ARCH).zip' | ||
signConfigType: inlineSignParams | ||
inlineOperation: | | ||
[ | ||
|
@@ -248,10 +292,11 @@ steps: | |
|
||
- script: | | ||
set -e | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin | ||
APP_ROOT=$(agent.builddirectory)/VSCode-darwin-$(VSCODE_ARCH) | ||
APP_NAME="`ls $APP_ROOT | head -n 1`" | ||
"$APP_ROOT/$APP_NAME/Contents/Resources/app/bin/code" --export-default-configuration=.build | ||
displayName: Verify start after signing (export configuration) | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64')) | ||
|
||
- script: | | ||
set -e | ||
|
@@ -267,6 +312,7 @@ steps: | |
AZURE_STORAGE_ACCESS_KEY="$(ticino-storage-key)" \ | ||
yarn gulp upload-vscode-configuration | ||
displayName: Upload configuration (for Bing settings search) | ||
condition: and(succeeded(), eq(variables['VSCODE_ARCH'], 'x64')) | ||
continueOnError: true | ||
|
||
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.