-
Notifications
You must be signed in to change notification settings - Fork 13
/
azure-pipelines.yml
129 lines (115 loc) · 4.73 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
# 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-latest'
isMac: True
win2019:
imageName: 'windows-2019'
isWindows2019: True
isWindows: True
linux:
imageName: 'ubuntu-24.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 update
sudo apt install -y g++ cmake libncurses-dev libglew-dev libncurses5-dev nlohmann-json3-dev
sudo apt-get install -y libcurl4-openssl-dev pkg-config libasound2-dev libgtk-3-dev libwebkit2gtk-4.0-dev libglew-dev libjack-dev
sudo apt install libasound2-dev libjack-jackd2-dev \
ladspa-sdk \
libcurl4-openssl-dev \
libfreetype-dev libfontconfig1-dev \
libx11-dev libxcomposite-dev libxcursor-dev libxext-dev libxinerama-dev libxrandr-dev libxrender-dev \
libwebkit2gtk-4.1-dev \
libglu1-mesa-dev mesa-common-dev
sudo apt list --installed
displayName: Prepare Linux Host
condition: variables.isLinux
- script: git submodule update --init --recursive
displayName: Checking out submodules
# Windows runs CMake tasks
- task: NuGetCommand@2
displayName: Installing Innosetup
inputs:
command: restore
restoreSolution: $(System.DefaultWorkingDirectory)/packages.config
restoreDirectory: third_party
condition: variables.isWindows
- script: |
pip3 install wheel setuptools
pip3 install conan
conan --version
conan profile detect
conan install -of Builds\Windows -s build_type=RelWithDebInfo --build missing .
condition: variables.isWindows
- task: CMake@1
displayName: Configuring CMake for Flatbuffers
inputs:
workingDirectory: 'third_party/flatbuffers'
cmakeArgs: '-S . -B Builds -G "Visual Studio 16 2019" -A x64'
condition: variables.isWindows2019
- task: CMake@1
displayName: Running CMake build for Flatbuffers
inputs:
workingDirectory: 'third_party/flatbuffers'
cmakeArgs: '--build Builds --config RelWithDebInfo'
condition: variables.isWindows
- task: CMake@1
displayName: Configuring CMake for Windows
inputs:
workingDirectory: $(Build.SourcesDirectory)
cmakeArgs: '-S . -B Builds\Windows -G "Visual Studio 16 2019" -A x64'
condition: variables.isWindows2019
- task: CMake@1
displayName: Running CMake build for Windows
inputs:
workingDirectory: $(Build.SourcesDirectory)
cmakeArgs: '--build Builds\Windows --config RelWithDebInfo'
condition: variables.isWindows
- publish: $(System.DefaultWorkingDirectory)/Builds/Windows/Client/jammernetz_setup_2.3.0.exe
displayName: Publish Windows Installer
artifact: WindowsInstaller
condition: variables.isWindows2019
# Linux uses bash to run CMake directly
- bash: |
cd third_party/flatbuffers
cmake -S . -B LinuxBuilds
cmake --build LinuxBuilds
cd ../..
cd third_party/sentry-native
cmake -S . -B builds -DSENTRY_BACKEND=crashpad
cmake -DCMAKE_INSTALL_PREFIX=./install --build builds --target install
cd ../..
displayName: Build with CMake for Linux
condition: variables.isLinux
- bash: |
cmake -S . -B builds
cmake --build builds
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 cmake gtk+3 glew
cd third_party/flatbuffers
cmake -S . -B LinuxBuilds -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
cmake --build LinuxBuilds -- -j8
cd ../..
cmake -S . -B build -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH_USE_LINK_PATH="ON"
cmake --build build --target package -j8
displayName: Build with CMake for Mac
condition: variables.isMac
- publish: $(System.DefaultWorkingDirectory)/build/JammerNetz-2.3.0-Darwin.dmg
displayName: Publish Mac Installer
artifact: MacInstaller
condition: variables.isMac