File tree Expand file tree Collapse file tree 6 files changed +13
-77
lines changed
Expand file tree Collapse file tree 6 files changed +13
-77
lines changed Original file line number Diff line number Diff line change @@ -17,12 +17,7 @@ steps:
1717 }
1818
1919 # Bootstrap
20- if (($env:AGENT_OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
21- node 'script\vsts\windows-run.js' 'script\bootstrap.cmd'
22- }
23- else {
24- script/bootstrap
25- }
20+ script/bootstrap
2621 displayName: Bootstrap build environment
2722 env:
2823 GITHUB_TOKEN: $(GITHUB_TOKEN)
Original file line number Diff line number Diff line change @@ -29,11 +29,7 @@ steps:
2929
3030 # Build
3131 $esc = '--%'
32- if (($env:AGENT_OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
33- node 'script\vsts\windows-run.js' 'script\build.cmd' --no-bootstrap --compress-artifacts $esc $CodeSign $CreateWindowsInstallaer
34- } else {
35- script/build --no-bootstrap --compress-artifacts $esc $env:LinuxArgs $CodeSign $CreateWindowsInstallaer
36- }
32+ script/build --no-bootstrap --compress-artifacts $esc $env:LinuxArgs $CodeSign $CreateWindowsInstallaer
3733 displayName: Build Atom
3834 env:
3935 GITHUB_TOKEN: $(GITHUB_TOKEN)
Original file line number Diff line number Diff line change @@ -20,9 +20,19 @@ steps:
2020 condition : eq(variables['Agent.OS'], 'Linux')
2121
2222 # Common
23+ - pwsh : |
24+ if ($env:BUILD_ARCH -eq "x86") {
25+ echo "##vso[task.setvariable variable=IsWinX86]true"
26+ }
27+ displayName: Set "IsWinX86" based on "BUILD_ARCH"
28+ # Convert "BUILD_ARCH" to a boolean ("IsWinX86") for the following NodeTool task.
29+ # Templates evaluate too early for the matrix variable "BUILD_ARCH" to be available in ${{ template expressions }}.
30+ # Scripts are interpreted at runtime, so "BUILD_ARCH" will be available to this script, and we can set "IsWinX86".
31+
2332 - task : NodeTool@0
2433 inputs :
2534 versionSpec : 12.16.3
35+ force32bit : $(IsWinX86)
2636 displayName : Install Node.js 12.16.3
2737
2838 - script : npm install --global npm@6.14.8
Original file line number Diff line number Diff line change 1010 if ($env:AGENT_OS -eq "Darwin") {
1111 osascript -e 'tell application "System Events" to keystroke "x"' # clear screen saver
1212 caffeinate -s script/test # Run with caffeinate to prevent screen saver
13- } elseif (($env:AGENT_OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
14- node 'script\vsts\windows-run.js' 'script\test.cmd'
1513 } else {
1614 script/test
1715 }
@@ -28,12 +26,7 @@ steps:
2826 condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true'))
2927
3028 # Test results
31- - pwsh : |
32- if (($env:AGENT_OS -eq "Windows_NT") -and ($env:BUILD_ARCH -eq "x86")) {
33- node 'script\vsts\windows-run.js' 'script\postprocess-junit-results.cmd' --search-folder "$env:TEST_JUNIT_XML_ROOT" --test-results-files "**/*.xml"
34- } else {
35- script/postprocess-junit-results --search-folder "$env:TEST_JUNIT_XML_ROOT" --test-results-files "**/*.xml"
36- }
29+ - pwsh : script/postprocess-junit-results --search-folder "$env:TEST_JUNIT_XML_ROOT" --test-results-files "**/*.xml"
3730 env :
3831 TEST_JUNIT_XML_ROOT : $(Common.TestResultsDirectory)/junit
3932 displayName : Post-process test results
Original file line number Diff line number Diff line change 4343 $env:FileID=""
4444 }
4545 echo "##vso[task.setvariable variable=FileID]$env:FileID" # Azure syntax
46- env:
47- BUILD_ARCH: $(BUILD_ARCH)
4846 displayName: Set FileID based on the arch
4947
5048 - template : templates/publish.yml
@@ -111,8 +109,6 @@ jobs:
111109 $env:FileID=""
112110 }
113111 echo "##vso[task.setvariable variable=FileID]$env:FileID" # Azure syntax
114- env:
115- BUILD_ARCH: $(BUILD_ARCH)
116112 displayName: Set FileID based on the arch
117113
118114 - template : templates/download-unzip.yml
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments