This repository has been archived by the owner on Oct 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
azure-pipelines.yml
159 lines (142 loc) · 5.3 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
trigger:
- master
jobs:
- job: 'Build'
strategy:
matrix:
windows:
imageName: 'windows-latest'
plat: 'win'
rid: 'win'
def: '-DBUILD_WINDOWS=on'
arch: x64
windows_x86:
imageName: 'windows-latest'
plat: 'win'
rid: 'win'
def: '-DBUILD_WINDOWS=on'
arch: x86
mingw:
imageName: 'windows-latest'
plat: 'win'
rid: 'mingw'
def: '-DBUILD_GTK3=on'
arch: 'x64'
arch_pkg: 'x86_64'
msystem: 'MINGW64'
bindir: 'C:\msys64\mingw64\bin'
bindir2: 'C:/msys64/mingw64/bin'
mingw_x86:
imageName: 'windows-latest'
plat: 'win'
rid: 'mingw'
def: '-DBUILD_GTK3=on -DUSE_FUNCTION2=off'
arch: 'x86'
arch_pkg: 'i686'
msystem: 'MINGW32'
bindir: 'C:\msys64\mingw32\bin'
bindir2: 'C:/msys64/mingw32/bin'
linux_gtk:
imageName: 'ubuntu-20.04'
plat: 'linux'
rid: 'linux'
def: '-DBUILD_GTK3=on'
linux_qt:
imageName: 'ubuntu-20.04'
plat: 'linux'
rid: 'linux-qt'
def: '-DBUILD_QT5=on'
mac:
imageName: 'macos-latest'
plat: 'mac'
rid: 'mac'
def: '-DBUILD_COCOA=on'
pool:
vmImage: $(imageName)
variables:
macLLVMPath: /usr/local/opt/llvm/bin
steps:
- script: |
git submodule init
git submodule update --init
displayName: 'Init git submodule'
- script: |
vcpkg install wil:$(arch)-windows
displayName: 'Install wil'
condition: eq(variables.rid, 'win')
- pwsh: |
C:\msys64\usr\bin\bash --login -c "pacman -S --noconfirm mingw-w64-$(arch_pkg)-gcc mingw-w64-$(arch_pkg)-pkg-config mingw-w64-$(arch_pkg)-gtk3 mingw-w64-$(arch_pkg)-boost"
displayName: 'Install msys2'
condition: eq(variables.rid, 'mingw')
env:
MSYSTEM: $(msystem)
- script: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo add-apt-repository ppa:mhier/libboost-latest
sudo apt-get install gcc-10 g++-10 ninja-build libboost1.74-dev
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 --slave /usr/bin/gcov gcov /usr/bin/gcov-10
displayName: 'Install ninja & boost & gcc'
condition: eq(variables.plat, 'linux')
- script: |
sudo apt-get install libgtk-3-dev libwebkit2gtk-4.0-dev
displayName: 'Install gtk'
condition: eq(variables.rid, 'linux')
- script: |
sudo apt-get install qtbase5-dev qtwebengine5-dev
displayName: 'Install qt5'
condition: eq(variables.rid, 'linux-qt')
- script: |
brew install ninja boost llvm
displayName: 'Install ninja & boost & llvm'
condition: eq(variables.plat, 'mac')
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" $(arch)
mkdir build & cd build
cmake .. -GNinja $(def) -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/$(rid)-$(arch) -DVCPKG_TARGET_TRIPLET=$(arch)-windows -DCMAKE_TOOLCHAIN_FILE=$(VCPKG_INSTALLATION_ROOT)/scripts/buildsystems/vcpkg.cmake -DBUILD_TESTS=on
displayName: 'Configure all projects'
condition: eq(variables.rid, 'win')
env:
BOOST_ROOT: $(BOOST_ROOT_1_72_0)
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" $(arch)
mkdir build & cd build
cmake .. -GNinja $(def) -DCMAKE_C_COMPILER=$(bindir2)/gcc.exe -DCMAKE_CXX_COMPILER=$(bindir2)/g++.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/$(rid)-$(arch) -DBUILD_TESTS=on
displayName: 'Configure all projects'
condition: eq(variables.rid, 'mingw')
env:
MSYSTEM: $(msystem)
PATH: $(bindir)
- task: CMake@1
displayName: 'Configure all projects'
condition: eq(variables.plat, 'linux')
inputs:
cmakeArgs: .. $(def) -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/$(rid) -DBUILD_TESTS=on
- task: CMake@1
displayName: 'Configure all projects'
condition: eq(variables.plat, 'mac')
inputs:
cmakeArgs: .. $(def) -GNinja -DCMAKE_C_COMPILER=$(macLLVMPath)/clang -DCMAKE_CXX_COMPILER=$(macLLVMPath)/clang++ -DCMAKE_OBJC_COMPILER=$(macLLVMPath)/clang -DCMAKE_OBJCXX_COMPILER=$(macLLVMPath)/clang++ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(Build.ArtifactStagingDirectory)/$(rid) -DBUILD_TESTS=on
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" $(arch)
cd build
ninja install
displayName: 'Install all projects'
condition: eq(variables.rid, 'win')
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" $(arch)
cd build
ninja install
displayName: 'Install all projects'
condition: eq(variables.rid, 'mingw')
env:
MSYSTEM: $(msystem)
PATH: $(bindir)
- script: |
cd build
ninja install
displayName: 'Install all projects'
condition: ne(variables.plat, 'win')
- task: PublishBuildArtifacts@1
displayName: 'Publish'
inputs:
artifactName: 'publish'