forked from JSandusky/rbfx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
182 lines (158 loc) · 5.67 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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
trigger:
branches:
include:
- '*'
exclude:
- 'no-ci-*'
- 'skip-ci-*'
variables:
CMAKE_BUILD_ARGS: ""
CMAKE_GENERATE_ARGS: ""
URHO3D_CSHARP: ON
URHO3D_SAMPLES: ON
URHO3D_PACKAGING: ON
TRACY_NO_INVARIANT_CHECK: 1
jobs:
- job: Web
pool:
vmImage: 'ubuntu-18.04'
variables:
URHO3D_CSHARP: OFF
BUILD_SHARED_LIBS: OFF
CMAKE_GENERATE_ARGS: -DCMAKE_TOOLCHAIN_FILE=CMake/Toolchains/Emscripten.cmake
EMSCRIPTEN_ROOT_PATH: $(Build.SourcesDirectory)/emsdk-master/upstream/emscripten
steps:
- template: .ci/cmake.yml
- bash: |
# Default compiler on this build worker image does not support c++17.
sudo apt-get install -y --no-install-recommends uuid-dev gcc-8 g++-8
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-8 100
sudo update-alternatives --set cc /usr/bin/gcc-8
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 100
sudo update-alternatives --set c++ /usr/bin/g++-8
# Emscripten
wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
tar -xvf master.tar.gz
emsdk-master/emsdk install latest
emsdk-master/emsdk activate latest
displayName: 'Setup'
- template: .ci/build.yml
- job: Windows
pool:
vmImage: 'windows-2019'
strategy:
matrix:
static-msvc-d3d11:
BUILD_SHARED_LIBS: OFF
shared-msvc-d3d11:
BUILD_SHARED_LIBS: ON
static-mingw-d3d9:
BUILD_SHARED_LIBS: OFF
CMAKE_GENERATE_ARGS: -G Ninja -DURHO3D_GRAPHICS_API=D3D9
shared-mingw-d3d9:
BUILD_SHARED_LIBS: ON
CMAKE_GENERATE_ARGS: -G Ninja -DURHO3D_GRAPHICS_API=D3D9
URHO3D_CSHARP: OFF
steps:
- script: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
echo '##vso[task.setvariable variable=PATH]%PATH%;%VSINSTALLDIR%\MSBuild\%VisualStudioVersion%;%WindowsSDK_ExecutablePath_x64%'
displayName: 'Setup'
- template: .ci/build.yml
- job: Linux
pool:
vmImage: 'ubuntu-18.04'
variables:
CMAKE_GENERATE_ARGS: -G Ninja
strategy:
matrix:
static-gcc-opengl:
CC: gcc-8
CXX: g++-8
BUILD_SHARED_LIBS: OFF
EXTRA_PACKAGES: gcc-8 g++-8
shared-gcc-opengl:
CC: gcc-8
CXX: g++-8
BUILD_SHARED_LIBS: ON
EXTRA_PACKAGES: gcc-8 g++-8 mono-devel msbuild-libhostfxr msbuild-sdkresolver msbuild
static-clang-opengl:
BUILD_SHARED_LIBS: OFF
CC: clang-8
CXX: clang++-8
EXTRA_PACKAGES: clang-8
shared-clang-opengl:
BUILD_SHARED_LIBS: ON
CC: clang-8
CXX: clang++-8
EXTRA_PACKAGES: clang-8 mono-devel msbuild-libhostfxr msbuild-sdkresolver msbuild
steps:
- bash: |
# Mono
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
# Clang
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main"
displayName: 'Add Repositories'
- template: .ci/cmake.yml
- bash: |
sudo apt-get install -y --no-install-recommends libasound2-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev uuid-dev ninja-build $(EXTRA_PACKAGES)
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/$(CC) 100
sudo update-alternatives --set cc /usr/bin/$(CC)
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/$(CXX) 100
sudo update-alternatives --set c++ /usr/bin/$(CXX)
mkdir "$(Build.SourcesDirectory)/SDK"
displayName: 'Setup'
- template: .ci/build.yml
- job: MacOS
pool:
vmImage: 'macOS-10.13'
strategy:
matrix:
static-clang-opengl:
BUILD_SHARED_LIBS: OFF
shared-clang-opengl:
BUILD_SHARED_LIBS: ON
steps:
- bash: |
brew install pkg-config
wget -q https://download.mono-project.com/archive/5.10.1/macos-10-universal/MonoFramework-MDK-5.10.1.57.macos10.xamarin.universal.pkg -O /tmp/Mono.pkg
sudo installer -pkg /tmp/Mono.pkg -target /
displayName: 'Setup'
- template: .ci/build.yml
- job: iOS
pool:
vmImage: 'macOS-10.13'
variables:
BUILD_SHARED_LIBS: OFF
URHO3D_CSHARP: OFF
CMAKE_GENERATE_ARGS: -G Xcode -DCMAKE_TOOLCHAIN_FILE=CMake/Toolchains/IOS.cmake -DPLATFORM=SIMULATOR64
steps:
- template: .ci/build.yml
- job: Android
pool:
vmImage: 'ubuntu-18.04'
steps:
- template: .ci/cmake.yml
- bash: |
# Setup
cd $(Build.SourcesDirectory)/android
gradle wrapper
- task: Gradle@2
inputs:
workingDirectory: android
gradleWrapperFile: android/gradlew
gradleOptions: -Xmx3072m
publishJUnitResults: false
tasks: assembleRelease
- task: CopyFiles@2
inputs:
contents: '**/*.apk'
targetFolder: $(build.artifactStagingDirectory)
- task: PublishBuildArtifacts@1
inputs:
pathToPublish: $(build.artifactStagingDirectory)
artifactName: rbfx-APK-$(Agent.JobName)-$(Build.SourceVersion)
artifactType: container