combine bootstrap for all OS

This commit is contained in:
aminya 2020-07-13 19:14:28 -05:00
parent 264fdd434f
commit 443c98ebc7
7 changed files with 28 additions and 34 deletions

View File

@ -16,7 +16,7 @@ jobs:
parameters:
OS: linux
- template: templates/linux-bootstrap.yml
- template: templates/bootstrap.yml
- script: script/lint
displayName: Run linter

View File

@ -18,7 +18,7 @@ jobs:
parameters:
OS: macos
- template: templates/macos-bootstrap.yml
- template: templates/bootstrap.yml
- script: script/lint
displayName: Run linter
@ -70,6 +70,6 @@ jobs:
# The artifact caching task does not work on forks, so we need to
# bootstrap again for pull requests coming from forked repositories.
- template: templates/macos-bootstrap.yml
- template: templates/bootstrap.yml
- template: templates/macos-test.yml

View File

@ -0,0 +1,24 @@
steps:
- bash: |
if ["$OS" == "Windows_NT"]; then
node script/vsts/windows-run.js script/bootstrap.cmd
else
script/bootstrap
fi
displayName: Bootstrap build environment
env:
OS: $(Agent.OS)
CI: true
CI_PROVIDER: VSTS
${{ if eq(variables['Agent.OS'], 'Windows_NT') }}:
NPM_BIN_PATH: C:/hostedtoolcache/windows/node/12.13.1/x64/npm.cmd
BUILD_ARCH: $(buildArch)
${{ if in(variables['Agent.OS'], 'Darwin', 'Linux') }}:
NPM_BIN_PATH: /usr/local/bin/npm
${{ if in(variables['Agent.OS'], 'Darwin', 'Windows_NT') }}:
npm_config_build_from_source: true
${{ if eq(variables['Agent.OS'], 'Linux') }}:
CC: clang-5.0
CXX: clang++-5.0
npm_config_clang: 1
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))

View File

@ -1,10 +0,0 @@
steps:
- script: script/bootstrap
displayName: Bootstrap build environment
env:
CI: true
CI_PROVIDER: VSTS
CC: clang-5.0
CXX: clang++-5.0
npm_config_clang: 1
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))

View File

@ -1,9 +0,0 @@
steps:
- script: script/bootstrap
displayName: Bootstrap build environment
env:
CI: true
CI_PROVIDER: VSTS
NPM_BIN_PATH: /usr/local/bin/npm
npm_config_build_from_source: true
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))

View File

@ -1,11 +0,0 @@
steps:
- script: |
node script\vsts\windows-run.js script\bootstrap.cmd
env:
BUILD_ARCH: $(buildArch)
CI: true
CI_PROVIDER: VSTS
NPM_BIN_PATH: "C:\\hostedtoolcache\\windows\\node\\12.13.1\\x64\\npm.cmd"
npm_config_build_from_source: true
displayName: Bootstrap build environment
condition: or(ne(variables['MainNodeModulesRestored'], 'true'), ne(variables['ScriptNodeModulesRestored'], 'true'), ne(variables['ApmNodeModulesRestored'], 'true'))

View File

@ -26,7 +26,7 @@ jobs:
parameters:
OS: windows
- template: templates/windows-bootstrap.yml
- template: templates/bootstrap.yml
- script: node script\vsts\windows-run.js script\lint.cmd
env: