-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
137 lines (116 loc) · 3.38 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
trigger:
branches:
exclude:
- no_ci_*
variables:
WORK_DIR: "$(Agent.BuildDirectory)/s"
BUILD_DIR: "$(WORK_DIR)/build"
DEPS_DIR: "$(BUILD_DIR)/deps"
DEFAULT_CMAKE_FLAGS: "-DWITH_NETWORK=1 \
-DWITH_DOC=0 \
-DCI_BUILD=1"
NUM_JOBS: 4
IS_PULL_REQUEST: ${{ eq('$(Build.Reason)', 'PullRequest') }}
BRANCH_NAME: $(Build.SourceBranchName)
REPO_SLUG: $(Build.Repository.Name)
CURRENT_COMMIT: $(Build.SourceVersion)
jobs:
- job: LinuxBuilds
strategy:
matrix:
#PC
ubuntu_20_04_x86_64:
imageName: 'ubuntu-20.04'
ubuntu_22_04_x86_64:
imageName: 'ubuntu-22.04'
ubuntu_22_04_x86_64_offline:
imageName: 'ubuntu-22.04'
EXTRA_CMAKE_FLAGS: "-DWITH_OFFLINE=on"
#IMX
ubuntu_20_04_imx:
imageName: 'ubuntu-20.04'
DOCKER: "septimiuvana/tof-imx8-docker"
EXTRA_CMAKE_FLAGS: "-DNXP=1"
#NVIDIA
ubuntu_20_04_nvidia:
imageName: 'ubuntu-20.04'
DOCKER: "adismartcamtest/tof_nvidia:4.0"
EXTRA_CMAKE_FLAGS: "-DNVIDIA=1"
#code quality, TO DO: once entire code is formatted enable clang-format
clang_format:
imageName: 'ubuntu-22.04'
BUILD_TYPE: "clang_format"
cppcheck:
imageName: 'ubuntu-20.04'
BUILD_TYPE: "cppcheck"
deploy_doxygen:
imageName: 'ubuntu-20.04'
BUILD_TYPE: "deploy_doxygen"
pool:
vmImage: $(imageName)
steps:
- checkout: self
fetchDepth: 1
clean: true
persistCredentials: true
- task: Cache@2
condition: and(
eq(variables['DOCKER'], ''),
ne(variables['BUILD_TYPE'], 'clang_format'),
ne(variables['BUILD_TYPE'], 'cppcheck'),
ne(variables['BUILD_TYPE'], 'deploy_doxygen')
)
inputs:
key: mykeyx | "$(imageName)"
restoreKeys: mykeyx | "$(imageName)"
path: $(DEPS_DIR)
cacheHitVar: CACHE_RESTORED
- script: ./ci/azure/deps.sh
condition: or(
eq(variables.CACHE_RESTORED, 'false'),
eq(variables['BUILD_TYPE'], 'clang_format'),
eq(variables['BUILD_TYPE'], 'cppcheck'),
eq(variables['BUILD_TYPE'], 'deploy_doxygen')
)
displayName: "Install Dependencies"
- script: ./ci/azure/run_build.sh
displayName: "Build"
- job: WindowsBuild
strategy:
matrix:
VS2019_Win64:
imageName: 'windows-2019'
COMPILER: 'Visual Studio 16 2019'
ARCH: 'x64'
artifactName: 'Windows-VS-16-2019-x64'
VS2022_Win64:
imageName: 'windows-2022'
COMPILER: 'Visual Studio 17 2022'
ARCH: 'x64'
artifactName: 'Windows-VS-17-2022-x64'
pool:
vmImage: $[ variables['imageName'] ]
steps:
- checkout: self
fetchDepth: 1
clean: true
- task: UsePythonVersion@0
inputs:
versionSpec: '3.9'
- task: Cache@2
inputs:
key: deps_windows | "$(imageName)"
restoreKeys: deps_windows | "$(imageName)"
path: $(Agent.BuildDirectory)/s/deps_installed
cacheHitVar: CACHE_RESTORED
- task: PowerShell@2
inputs:
targetType: 'filePath'
filePath: ./ci/azure/windows-build/install_deps.ps1
condition: eq(variables.CACHE_RESTORED, 'false')
displayName: "Install Dependencies"
- task: PowerShell@2
inputs:
targetType: 'filePath'
filePath: ./ci/azure/windows-build/build_sdk.ps1
displayName: "Build"