-
Notifications
You must be signed in to change notification settings - Fork 41
/
azure-pipelines.yml
156 lines (155 loc) · 5.4 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
parameters:
- name: VCPKG_COMMIT
displayName: VCPKG commit
type: string
default: 2020.11-1
values:
- 2020.11-1
- 2020.11
- 2020.07
- 2020.06
- 2020.04
- 2020.01
- master
jobs:
- job: Build
variables:
VCPKG_REPOSITORY: https://github.com/Microsoft/vcpkg.git
VCPKG_OVERLAY_PORTS_REPOSITORY: https://github.com/NordicPlayground/vcpkg-overlay-ports-public
strategy:
matrix:
linux:
imageName: 'ubuntu-18.04'
nodeArch: '64'
VCPKG_ROOT_DIR: '$(Agent.HomeDirectory)/vcpkg'
VCPKG_OVERLAY_PORTS_DIR: '$(Agent.HomeDirectory)/vcpkg-overlay-ports'
mac:
imageName: 'macos-10.15'
nodeArch: '64'
VCPKG_ROOT_DIR: '$(Agent.HomeDirectory)/vcpkg'
VCPKG_OVERLAY_PORTS_DIR: '$(Agent.HomeDirectory)/vcpkg-overlay-ports'
win64:
imageName: 'vs2017-win2016'
nodeArch: '64'
driverArch: 'x64'
VCPKG_ROOT_DIR: '$(Agent.HomeDirectory)\\vcpkg'
VCPKG_OVERLAY_PORTS_DIR: '$(Agent.HomeDirectory)\\vcpkg-overlay-ports'
win32:
imageName: 'vs2017-win2016'
nodeArch: '32'
driverArch: 'x86'
VCPKG_ROOT_DIR: '$(Agent.HomeDirectory)\\vcpkg'
VCPKG_OVERLAY_PORTS_DIR: '$(Agent.HomeDirectory)\\vcpkg-overlay-ports'
pool:
vmImage: $(imageName)
steps:
- bash: |
set -o errexit -o pipefail
sudo apt-get update
sudo apt-get install ninja-build libudev-dev
condition: contains(variables['imageName'], 'ubuntu')
displayName: '[Linux] Install toolchain'
- bash: |
# Note that installing gcc@6 will not change `gcc`/`g++` on
# PATH, and those will still be Apple Clang.
brew install ninja gcc@6
condition: contains(variables['imageName'], 'mac')
displayName: '[MacOS] Install toolchain'
- bash: |
choco install -y nvm
condition: contains(variables['imageName'], 'win')
displayName: '[Windows] Install toolchain'
- bash: |
set -o errexit -o pipefail
export PATH=$VCPKG_ROOT:$PATH
git clone $(VCPKG_REPOSITORY) $(VCPKG_ROOT_DIR) --branch ${{ parameters.VCPKG_COMMIT }} --depth 1
git clone $(VCPKG_OVERLAY_PORTS_REPOSITORY) $(VCPKG_OVERLAY_PORTS_DIR) --depth 1
CC=gcc-9 CXX=g++-9 $VCPKG_ROOT/bootstrap-vcpkg.sh
echo "Using VCPKG_ROOT: $VCPKG_ROOT"
echo "Using VCPKG_OVERLAY_PORTS: $VCPKG_OVERLAY_PORTS"
ls -lart $VCPKG_OVERLAY_PORTS
vcpkg install nrf-ble-driver
env: {
VCPKG_OVERLAY_PORTS: "$(VCPKG_OVERLAY_PORTS_DIR)/ports",
VCPKG_ROOT: "$(VCPKG_ROOT_DIR)"
}
condition: contains(variables['imageName'], 'ubuntu')
displayName: '[Linux] Install nrf-ble-driver'
- bash: |
set -o errexit -o pipefail
export PATH=$VCPKG_ROOT:$PATH
git clone $(VCPKG_REPOSITORY) $(VCPKG_ROOT_DIR) --branch ${{ parameters.VCPKG_COMMIT }} --depth 1
git clone $(VCPKG_OVERLAY_PORTS_REPOSITORY) $(VCPKG_OVERLAY_PORTS_DIR) --depth 1
# Vcpkg bootstap does not work with Apple Clang and it
# refuses to use it. Explicitly point it to the GCC
# installed in the "Install toolchain" in CC/CXX.
CC=gcc-9 CXX=g++-9 $VCPKG_ROOT/bootstrap-vcpkg.sh
vcpkg install nrf-ble-driver
condition: contains(variables['imageName'], 'mac')
displayName: '[MacOS] Install nrf-ble-driver'
env: {
VCPKG_OVERLAY_PORTS: "$(VCPKG_OVERLAY_PORTS_DIR)/ports",
VCPKG_ROOT: "$(VCPKG_ROOT_DIR)"
}
- script: |
set PATH=%VCPKG_ROOT%;%PATH%
git clone $(VCPKG_REPOSITORY) $(VCPKG_ROOT_DIR) --branch ${{ parameters.VCPKG_COMMIT }} --depth 1
git clone $(VCPKG_OVERLAY_PORTS_REPOSITORY) $(VCPKG_OVERLAY_PORTS_DIR) --depth 1
%VCPKG_ROOT%\bootstrap-vcpkg.bat
condition: contains(variables['imageName'], 'win')
env: {
VCPKG_OVERLAY_PORTS: "$(VCPKG_OVERLAY_PORTS_DIR)/ports",
VCPKG_ROOT: "$(VCPKG_ROOT_DIR)"
}
displayName: '[Windows] Install vcpkg'
- script: |
set PATH=%VCPKG_ROOT%;%PATH%
vcpkg install nrf-ble-driver:$(driverArch)-windows
condition: contains(variables['imageName'], 'win')
displayName: '[Windows] Install nrf-ble-driver'
env: {
VCPKG_OVERLAY_PORTS: "$(VCPKG_OVERLAY_PORTS_DIR)\\ports",
VCPKG_ROOT: "$(VCPKG_ROOT_DIR)"
}
- template: azure-node.yml
parameters:
nodeVersion: 12.16.1
nodeArch: $(nodeArch)
npmConfigRuntime: 'node'
npmConfigTarget: 12.16.1
VCPKG_ROOT: $(VCPKG_ROOT_DIR)
- template: azure-node.yml
parameters:
nodeVersion: 13.12.0
nodeArch: $(nodeArch)
npmConfigRuntime: 'node'
npmConfigTarget: 13.12.0
VCPKG_ROOT: $(VCPKG_ROOT_DIR)
- template: azure-node.yml
parameters:
nodeVersion: 14.16.0
nodeArch: $(nodeArch)
npmConfigRuntime: 'node'
npmConfigTarget: 14.16.0
VCPKG_ROOT: $(VCPKG_ROOT_DIR)
- template: azure-node.yml
parameters:
nodeVersion: 12.16.1
nodeArch: $(nodeArch)
npmConfigRuntime: 'electron'
npmConfigTarget: 8.2.0
VCPKG_ROOT: $(VCPKG_ROOT_DIR)
- template: azure-node.yml
parameters:
nodeVersion: 12.16.1
nodeArch: $(nodeArch)
npmConfigRuntime: 'electron'
npmConfigTarget: 9.0.3
VCPKG_ROOT: $(VCPKG_ROOT_DIR)
- template: azure-node.yml
parameters:
nodeVersion: 14.16.0
nodeArch: $(nodeArch)
npmConfigRuntime: 'electron'
npmConfigTarget: 13.1.9
VCPKG_ROOT: $(VCPKG_ROOT_DIR)