Skip to content

Commit 3682a01

Browse files
committed
use RunCommand to call scripts
- on x64: Direct cmd call is much faster - on x86 we will still use node script\vsts\windows-run.js
1 parent 4bf419d commit 3682a01

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

script/vsts/platforms/windows.yml

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,20 @@ jobs:
1818
ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ]
1919
IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ]
2020
IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ]
21-
21+
2222
steps:
23+
- script: |
24+
IF [%BUILD_ARCH%]==['x64'] (
25+
SET RunCommand=
26+
ECHO RunCommand set to a space
27+
) ELSE (
28+
SET RunCommand=node script\vsts\windows-run.js
29+
ECHO RunCommand set to a %RunCommand%
30+
)
31+
env:
32+
BUILD_ARCH: $(buildArch)
33+
displayName: Set RunCommand based on the arch
34+
2335
- task: UsePythonVersion@0
2436
inputs:
2537
versionSpec: '2.7'
@@ -70,7 +82,7 @@ jobs:
7082
cacheHitVar: ApmNodeModulesRestored
7183

7284
- script: |
73-
node script\vsts\windows-run.js script\bootstrap.cmd
85+
%RunCommand% script\bootstrap.cmd
7486
env:
7587
BUILD_ARCH: $(buildArch)
7688
CI: true
@@ -80,7 +92,8 @@ jobs:
8092
displayName: Bootstrap build environment
8193
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))
8294
83-
- script: node script\vsts\windows-run.js script\lint.cmd
95+
- script: |
96+
%RunCommand% script\lint.cmd
8497
env:
8598
BUILD_ARCH: $(buildArch)
8699
displayName: Run linter
@@ -91,21 +104,21 @@ jobs:
91104
IF [%IS_RELEASE_BRANCH%]==[true] (
92105
ECHO Creating production artifacts for release branch %BUILD_SOURCEBRANCHNAME%
93106
IF [%SHOULD_SIGN%]==[true] (
94-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --code-sign --compress-artifacts --create-windows-installer
107+
%RunCommand% script\build.cmd --no-bootstrap --code-sign --compress-artifacts --create-windows-installer
95108
) ELSE (
96-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --compress-artifacts --create-windows-installer
109+
%RunCommand% script\build.cmd --no-bootstrap --compress-artifacts --create-windows-installer
97110
)
98111
) ELSE (
99112
IF [%IS_SIGNED_ZIP_BRANCH%]==[true] (
100113
ECHO Creating signed CI artifacts for branch %BUILD_SOURCEBRANCHNAME%
101114
IF [%SHOULD_SIGN%]==[true] (
102-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --code-sign --compress-artifacts
115+
%RunCommand% script\build.cmd --no-bootstrap --code-sign --compress-artifacts
103116
) ELSE (
104-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --compress-artifacts
117+
%RunCommand% script\build.cmd --no-bootstrap --compress-artifacts
105118
)
106119
) ELSE (
107120
ECHO Pull request build, no code signing will be performed
108-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --compress-artifacts
121+
%RunCommand% script\build.cmd --no-bootstrap --compress-artifacts
109122
)
110123
)
111124
env:
@@ -119,7 +132,8 @@ jobs:
119132
npm_config_build_from_source: true
120133
displayName: Build Atom
121134
122-
- script: node script\vsts\windows-run.js script\test.cmd
135+
- script: |
136+
%RunCommand% script\test.cmd
123137
env:
124138
CI: true
125139
CI_PROVIDER: VSTS
@@ -130,7 +144,7 @@ jobs:
130144
condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true'))
131145
132146
- script: >
133-
node script\vsts\windows-run.js script\postprocess-junit-results.cmd
147+
%RunCommand% script\postprocess-junit-results.cmd
134148
--search-folder %TEST_JUNIT_XML_ROOT% --test-results-files "**/*.xml"
135149
env:
136150
TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit

0 commit comments

Comments
 (0)