-
Notifications
You must be signed in to change notification settings - Fork 28
/
azure-pipelines.yml
75 lines (70 loc) · 2.99 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
# Azure CI/CD pipeline config file
# https://aka.ms/yaml
# Trigger builds on master branch
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml
trigger:
- master
#- develop
# We can run multiple jobs in parallel.
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases
jobs:
# Provide a name for the job
- job: Linux
timeoutInMinutes: 180 # how long to run the job before automatically cancelling
# The VM image to use for the hosted agent. For a list of possible agents
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted
# You can see the software installed on each agent at the same link.
pool:
vmImage: 'ubuntu-latest'
# The steps to run to execute the build.
steps:
- script: sudo apt-get install gcc g++ git cmake curl unzip tar yasm pkg-config libgtk2.0-dev libavformat-dev libavcodec-dev libavresample-dev libswscale-dev libopencv-dev
displayName: apt-get install prereqs
#- script: echo "set(VCPKG_BUILD_TYPE release)" >> $VCPKG_INSTALLATION_ROOT/triplets/x64-linux.cmake
# displayName: vcpkg set build type
- script: git -C "/usr/local/share/vcpkg" status
- script: git -C "/usr/local/share/vcpkg" reset --hard
displayName: reset vcpkg to master
- script: git -C "/usr/local/share/vcpkg" status
- script: git -C "/usr/local/share/vcpkg" pull
displayName: vcpkg pull latest
- script: sudo sh /usr/local/share/vcpkg/bootstrap-vcpkg.sh
displayName: rebuild vcpkg
- script: vcpkg install nlopt:x64-linux boost-asio:x64-linux
displayName: vcpkg install dependencies
- task: CMake@1
inputs:
workingDirectory: build
cmakeArgs: -D CMAKE_TOOLCHAIN_FILE=/usr/local/share/vcpkg/scripts/buildsystems/vcpkg.cmake ..
- task: CMake@1
inputs:
workingDirectory: build
cmakeArgs: --build . --config Release -- -j 4
# Provide a name for the job
- job: Windows
timeoutInMinutes: 180 # how long to run the job before automatically cancelling
# The VM image to use for the hosted agent. For a list of possible agents
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted
# You can see the software installed on each agent at the same link.
pool:
vmImage: 'windows-latest'
# The steps to run to execute the build.
steps:
- script: git -C "C:/vcpkg" status
- script: git -C "C:/vcpkg" reset --hard
displayName: reset vcpkg to master
- script: git -C "C:/vcpkg" status
- script: git -C "C:/vcpkg" pull
displayName: vcpkg pull latest
- script: C:/vcpkg/bootstrap-vcpkg.bat
displayName: rebuild vcpkg
- script: vcpkg install opencv[ffmpeg]:x64-windows nlopt:x64-windows boost-asio:x64-windows ffmpeg[x264]:x64-windows
displayName: vcpkg install dependencies
- task: CMake@1
inputs:
workingDirectory: build
cmakeArgs: -A x64 -D CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ..
- task: CMake@1
inputs:
workingDirectory: build
cmakeArgs: --build . --config Release -j 4