-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathazure-pipelines.yml
98 lines (91 loc) · 3.7 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
# I looked at https://github.com/microsoft/cpprestsdk/blob/master/azure-pipelines.yml
# But this shows how to do this proper: https://github.com/surge-synthesizer/tuning-workbench-synth/blob/master/azure-pipelines.yml
jobs:
- job: Build
strategy:
matrix:
mac:
imageName: 'macos-10.14'
isMac: True
win2017:
imageName: 'vs2017-win2016'
isWindows2017: True
isWindows: True
win2019:
imageName: 'windows-2019'
isWindows2019: True
isWindows: True
linux:
imageName: 'ubuntu-18.04'
isLinux: True
pool:
vmImage: $(imageName)
steps:
# Disable automatic line ending conversion, which is enabled by default on
# Azure's Windows image. Having the conversion enabled caused cpplint of SQlite to fail on Windows
- bash: git config --global core.autocrlf false
displayName: "Disable git automatic line ending conversion"
- bash: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev pkg-config libtbb-dev libasound2-dev libboost-dev libgtk-3-dev libwebkit2gtk-4.0-dev libglew-dev libjack-dev libicu-dev libpython3-all-dev
apt list --installed
displayName: Prepare Linux Host
condition: variables.isLinux
- script: git submodule update --init --recursive
displayName: Checking out submodules
- task: UsePythonVersion@0
inputs:
versionSpec: '3.8'
addToPath: true
architecture: 'x64'
#- script: cinst innosetup
# displayName: Installing Innosetup
# Windows runs CMake tasks
- task: NuGetCommand@2
displayName: Installing Innosetup
inputs:
command: restore
restoreSolution: $(System.DefaultWorkingDirectory)/packages.config
restoreDirectory: third_party
condition: variables.isWindows
- task: CMake@1
displayName: Configuring CMake for Windows
inputs:
workingDirectory: 'build'
cmakeArgs: '-S .. -G "Visual Studio 15 2017 Win64" -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\3.8.7\x64\python.exe'
condition: variables.isWindows2017
- task: CMake@1
displayName: Configuring CMake for Windows
inputs:
workingDirectory: 'build'
cmakeArgs: '-S .. -G "Visual Studio 16 2019" -A x64 -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\3.8.7\x64\python.exe'
condition: variables.isWindows2019
- task: CMake@1
displayName: Running CMake build for Windows
inputs:
workingDirectory: 'build'
cmakeArgs: '--build . --config RelWithDebInfo'
condition: variables.isWindows
- publish: $(System.DefaultWorkingDirectory)/build/The-Orm/knobkraft_orm_setup_1.11.0.exe
displayName: Publish Windows Installer
artifact: WindowsInstaller
condition: variables.isWindows2019
# Linux uses bash to run CMake directly
- bash: |
cmake -Bbuild
cmake --build build --config Debug
cmake --build build --config Release
displayName: Build with CMake for Linux
condition: variables.isLinux
# Mac build uses bash as well
# No need to brew icu4c cmake as they are already present on Azure mac
- bash: |
brew install gtk+3 glew boost
cmake -S . -B builds/release -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
VERBOSE=1 cmake --build builds/release --target package -j8
displayName: Build with CMake for Mac
condition: variables.isMac
- publish: $(System.DefaultWorkingDirectory)/builds/release/KnobKraft_Orm-1.11.0-Darwin.dmg
displayName: Publish Mac Installer
artifact: MacInstaller
condition: variables.isMac