Skip to content

Commit 4b282c9

Browse files
committed
combine bootstrap for all OS
1 parent 264fdd4 commit 4b282c9

File tree

7 files changed

+24
-34
lines changed

7 files changed

+24
-34
lines changed

script/vsts/platforms/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
parameters:
1717
OS: linux
1818

19-
- template: templates/linux-bootstrap.yml
19+
- template: templates/bootstrap.yml
2020

2121
- script: script/lint
2222
displayName: Run linter

script/vsts/platforms/macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
parameters:
1919
OS: macos
2020

21-
- template: templates/macos-bootstrap.yml
21+
- template: templates/bootstrap.yml
2222

2323
- script: script/lint
2424
displayName: Run linter
@@ -70,6 +70,6 @@ jobs:
7070

7171
# The artifact caching task does not work on forks, so we need to
7272
# bootstrap again for pull requests coming from forked repositories.
73-
- template: templates/macos-bootstrap.yml
73+
- template: templates/bootstrap.yml
7474

7575
- template: templates/macos-test.yml
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
steps:
2+
- bash: $BootstrapScript
3+
displayName: Bootstrap build environment
4+
env:
5+
CI: true
6+
CI_PROVIDER: VSTS
7+
${{ if in(variables['Agent.OS'], 'Windows_NT') }}:
8+
BootstrapScript: "node script\\vsts\\windows-run.js script\\bootstrap.cmd"
9+
NPM_BIN_PATH: "C:\\hostedtoolcache\\windows\\node\\12.13.1\\x64\\npm.cmd"
10+
BUILD_ARCH: $(buildArch)
11+
${{ if in(variables['Agent.OS'], 'Darwin', 'Linux') }}:
12+
BootstrapScript: script/bootstrap
13+
NPM_BIN_PATH: /usr/local/bin/npm
14+
${{ if in(variables['Agent.OS'], 'Darwin', 'Windows_NT') }}:
15+
npm_config_build_from_source: true
16+
${{ if in(variables['Agent.OS'], 'Linux') }}:
17+
CC: clang-5.0
18+
CXX: clang++-5.0
19+
npm_config_clang: 1
20+
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))

script/vsts/platforms/templates/linux-bootstrap.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

script/vsts/platforms/templates/macos-bootstrap.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

script/vsts/platforms/templates/windows-bootstrap.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

script/vsts/platforms/windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
parameters:
2727
OS: windows
2828

29-
- template: templates/windows-bootstrap.yml
29+
- template: templates/bootstrap.yml
3030

3131
- script: node script\vsts\windows-run.js script\lint.cmd
3232
env:

0 commit comments

Comments
 (0)