Skip to content

Commit 7432fdb

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 7432fdb

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

script/vsts/platforms/windows.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,18 @@ 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+
) ELSE (
27+
SET RunCommand=node script\vsts\windows-run.js
28+
)
29+
env:
30+
BUILD_ARCH: $(buildArch)
31+
displayName: Set RunCommand based on the arch
32+
2333
- task: UsePythonVersion@0
2434
inputs:
2535
versionSpec: '2.7'
@@ -70,7 +80,7 @@ jobs:
7080
cacheHitVar: ApmNodeModulesRestored
7181

7282
- script: |
73-
node script\vsts\windows-run.js script\bootstrap.cmd
83+
%RunCommand% script\bootstrap.cmd
7484
env:
7585
BUILD_ARCH: $(buildArch)
7686
CI: true
@@ -80,7 +90,8 @@ jobs:
8090
displayName: Bootstrap build environment
8191
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))
8292
83-
- script: node script\vsts\windows-run.js script\lint.cmd
93+
- script: |
94+
%RunCommand% script\lint.cmd
8495
env:
8596
BUILD_ARCH: $(buildArch)
8697
displayName: Run linter
@@ -91,21 +102,21 @@ jobs:
91102
IF [%IS_RELEASE_BRANCH%]==[true] (
92103
ECHO Creating production artifacts for release branch %BUILD_SOURCEBRANCHNAME%
93104
IF [%SHOULD_SIGN%]==[true] (
94-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --code-sign --compress-artifacts --create-windows-installer
105+
%RunCommand% script\build.cmd --no-bootstrap --code-sign --compress-artifacts --create-windows-installer
95106
) ELSE (
96-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --compress-artifacts --create-windows-installer
107+
%RunCommand% script\build.cmd --no-bootstrap --compress-artifacts --create-windows-installer
97108
)
98109
) ELSE (
99110
IF [%IS_SIGNED_ZIP_BRANCH%]==[true] (
100111
ECHO Creating signed CI artifacts for branch %BUILD_SOURCEBRANCHNAME%
101112
IF [%SHOULD_SIGN%]==[true] (
102-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --code-sign --compress-artifacts
113+
%RunCommand% script\build.cmd --no-bootstrap --code-sign --compress-artifacts
103114
) ELSE (
104-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --compress-artifacts
115+
%RunCommand% script\build.cmd --no-bootstrap --compress-artifacts
105116
)
106117
) ELSE (
107118
ECHO Pull request build, no code signing will be performed
108-
node script\vsts\windows-run.js script\build.cmd --no-bootstrap --compress-artifacts
119+
%RunCommand% script\build.cmd --no-bootstrap --compress-artifacts
109120
)
110121
)
111122
env:
@@ -119,7 +130,8 @@ jobs:
119130
npm_config_build_from_source: true
120131
displayName: Build Atom
121132
122-
- script: node script\vsts\windows-run.js script\test.cmd
133+
- script: |
134+
%RunCommand% script\test.cmd
123135
env:
124136
CI: true
125137
CI_PROVIDER: VSTS
@@ -130,7 +142,7 @@ jobs:
130142
condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true'))
131143
132144
- script: >
133-
node script\vsts\windows-run.js script\postprocess-junit-results.cmd
145+
%RunCommand% script\postprocess-junit-results.cmd
134146
--search-folder %TEST_JUNIT_XML_ROOT% --test-results-files "**/*.xml"
135147
env:
136148
TEST_JUNIT_XML_ROOT: $(Common.TestResultsDirectory)\junit

0 commit comments

Comments
 (0)