-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
/
azure-pipelines.yml
111 lines (87 loc) · 2.74 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
trigger:
- master
jobs:
# LINUX
- job: Linux
pool:
vmImage: 'Ubuntu-16.04'
container: trailofbits/osql-experimental:ubuntu-18.04
steps:
- script: mkdir $(Build.BinariesDirectory)/build
displayName: "Create build folder"
- task: CMake@1
displayName: "Configure osquery"
inputs:
workingDirectory: $(Build.BinariesDirectory)/build
cmakeArgs: -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DBUILD_TESTING=ON $(Build.SourcesDirectory)
- task: CMake@1
displayName: "Check code formatting"
inputs:
workingDirectory: $(Build.BinariesDirectory)/build
cmakeArgs: --build . --target format_check
- task: CMake@1
displayName: "Build osquery"
inputs:
workingDirectory: $(Build.BinariesDirectory)/build
cmakeArgs: --build . -j 3
- script: |
ctest --build-nocmake -V
displayName: "Run tests"
workingDirectory: $(Build.BinariesDirectory)/build
env:
GTEST_COLOR: 1
# LINUX
# MACOS
- job: macOS
pool:
vmImage: macos-10.14
steps:
- script: |
brew upgrade
brew install ccache
displayName: "Install Homebrew and prerequisites"
timeoutInMinutes: 20
- script: mkdir $(Build.BinariesDirectory)/build
displayName: "Create build folder"
- task: CMake@1
displayName: "Configure osquery"
inputs:
workingDirectory: $(Build.BinariesDirectory)/build
cmakeArgs: -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON $(Build.SourcesDirectory)
- task: CMake@1
displayName: "Build osquery"
inputs:
workingDirectory: $(Build.BinariesDirectory)/build
cmakeArgs: --build . -j 3
- script: |
ctest --build-nocmake -V
displayName: "Run tests"
workingDirectory: $(Build.BinariesDirectory)/build
env:
GTEST_COLOR: 1
# MACOS
# WINDOWS
- job: Windows
pool:
vmImage: vs2017-win2016
steps:
- powershell: |
mkdir $(Build.BinariesDirectory)\build
displayName: "Create build folder"
- task: CMake@1
displayName: "Configure osquery"
inputs:
workingDirectory: $(Build.BinariesDirectory)\build
cmakeArgs: -G "Visual Studio 15 2017 Win64" -T host=x64 -DBUILD_TESTING=ON $(Build.SourcesDirectory)
- task: CMake@1
displayName: "Build osquery"
inputs:
workingDirectory: $(Build.BinariesDirectory)\build
cmakeArgs: --build . -j 3 --config Release
- powershell: |
ctest --build-nocmake -C Release -V
displayName: "Run tests"
workingDirectory: $(Build.BinariesDirectory)/build
env:
GTEST_COLOR: 1
# WINDOWS