Skip to content

Commit d6df452

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 a6ac2f4 commit d6df452

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

script/vsts/platforms/windows.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ jobs:
2020
IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ]
2121

2222
steps:
23+
- script: |
24+
IF [%BUILD_ARCH%]==[x64] (
25+
SET RunCommand=
26+
) ELSE (
27+
SET RunCommand=node script\vsts\windows-run.js
28+
)
29+
echo RunCommand set to: %RunCommand%
30+
env:
31+
BUILD_ARCH: $(buildArch)
32+
displayName: Set RunCommand based on the arch
33+
2334
- task: UsePythonVersion@0
2435
inputs:
2536
versionSpec: '2.7'
@@ -70,7 +81,7 @@ jobs:
7081
cacheHitVar: ApmNodeModulesRestored
7182

7283
- script: |
73-
node script\vsts\windows-run.js script\bootstrap.cmd
84+
%RunCommand% script\bootstrap.cmd
7485
env:
7586
BUILD_ARCH: $(buildArch)
7687
CI: true
@@ -80,7 +91,8 @@ jobs:
8091
displayName: Bootstrap build environment
8192
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))
8293
83-
- script: node script\vsts\windows-run.js script\lint.cmd
94+
- script: |
95+
%RunCommand% script\lint.cmd
8496
env:
8597
BUILD_ARCH: $(buildArch)
8698
displayName: Run linter
@@ -91,21 +103,21 @@ jobs:
91103
IF [%IS_RELEASE_BRANCH%]==[true] (
92104
ECHO Creating production artifacts for release branch %BUILD_SOURCEBRANCHNAME%
93105
IF [%SHOULD_SIGN%]==[true] (
94-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --code-sign --compress-artifacts --create-windows-installer
106+
%RunCommand% script\build.cmd --no-bootstrap --code-sign --compress-artifacts --create-windows-installer
95107
) ELSE (
96-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --compress-artifacts --create-windows-installer
108+
%RunCommand% script\build.cmd --no-bootstrap --compress-artifacts --create-windows-installer
97109
)
98110
) ELSE (
99111
IF [%IS_SIGNED_ZIP_BRANCH%]==[true] (
100112
ECHO Creating signed CI artifacts for branch %BUILD_SOURCEBRANCHNAME%
101113
IF [%SHOULD_SIGN%]==[true] (
102-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --code-sign --compress-artifacts
114+
%RunCommand% script\build.cmd --no-bootstrap --code-sign --compress-artifacts
103115
) ELSE (
104-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --compress-artifacts
116+
%RunCommand% script\build.cmd --no-bootstrap --compress-artifacts
105117
)
106118
) ELSE (
107119
ECHO Pull request build, no code signing will be performed
108-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --compress-artifacts
120+
%RunCommand% script\build.cmd --no-bootstrap --compress-artifacts
109121
)
110122
)
111123
env:
@@ -119,7 +131,8 @@ jobs:
119131
npm_config_build_from_source: true
120132
displayName: Build Atom
121133
122-
- script: node script\vsts\windows-run.js script\test.cmd
134+
- script: |
135+
%RunCommand% script\test.cmd
123136
env:
124137
CI: true
125138
CI_PROVIDER: VSTS
@@ -130,7 +143,7 @@ jobs:
130143
condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true'))
131144
132145
- script: >
133-
node script\vsts\windows-run.js script\postprocess-junit-results.cmd
146+
%RunCommand% script\postprocess-junit-results.cmd
134147
--search-folder %TEST_JUNIT_XML_ROOT% --test-results-files "**/*.xml"
135148
env:
136149
TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit

0 commit comments

Comments
 (0)