-
Notifications
You must be signed in to change notification settings - Fork 171
/
.azure-pipelines.yml
173 lines (150 loc) · 5.58 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
trigger:
batch: true
branches:
include:
- main
- release/*
stages:
- stage: build
displayName: Build
jobs:
############ LINUX BUILD ############
- job: Build_Linux_x64
displayName: Linux x64
timeoutInMinutes: 120
pool:
vmImage: ubuntu-18.04
steps:
- bash: |
sudo apt update
sudo apt -y install libpango1.0-dev libgif-dev libjpeg-dev libtiff-dev autoconf libtool automake build-essential cmake
displayName: 'Install Linux dependencies'
- bash: |
export CFLAGS="-ggdb3 -O2"
./autogen.sh --prefix=/usr --enable-warnaserror
make -j4
sudo make install
displayName: 'Build and Install libgdiplus'
- bash: |
if ! make check; then
cat ./tests/test-suite.log
exit 1
fi
displayName: 'Run libgdiplus tests'
- bash: |
make -C tests run-gtest
displayName: 'Run libgdiplus googletests'
- bash: |
sudo apt -y install xvfb gettext
git clone --depth 1 --recurse-submodules https://github.com/mono/mono /tmp/mono
cd /tmp/mono
./autogen.sh --prefix=/tmp/mono-dev --disable-boehm
make -j4
displayName: 'Clone and Build mono'
- bash: |
make -C /tmp/mono/mcs/class/System.Drawing run-test
displayName: 'Run mono System.Drawing tests'
- bash: |
make -C /tmp/mono/mcs/class/System.Drawing run-xunit-test
displayName: 'Run mono System.Drawing xunit tests'
- bash: |
xvfb-run make -C /tmp/mono/mcs/class/System.Windows.Forms run-test
displayName: 'Run mono System.Windows.Forms tests'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: 'tests/TestResult.xml'
failTaskOnFailedTests: true
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: NUnit
testResultsFiles: '/tmp/mono/mcs/class/**/TestResult*.xml'
failTaskOnFailedTests: true
############ MACOS BUILD ############
- job: Build_Mac_x64
displayName: macOS x64
timeoutInMinutes: 30
pool:
vmImage: macOS-10.14
steps:
- bash: |
brew install glib cairo libexif libjpeg giflib libtiff autoconf libtool automake pango pkg-config cmake
displayName: 'Install macOS dependencies'
- bash: |
export CFLAGS="-m64 -arch x86_64 -mmacosx-version-min=10.9"
export LDFLAGS="-m64 -arch x86_64"
./autogen.sh --prefix=/tmp/libgdiplus-dev --enable-warnaserror --without-x11 --host=x86_64-apple-darwin13.0.0 --build=x86_64-apple-darwin13.0.0
make -j4
make install
displayName: 'Build and Install libgdiplus'
- bash: |
if ! make check; then
cat ./tests/test-suite.log
exit 1
fi
displayName: 'Run libgdiplus tests'
- bash: |
make -C tests run-gtest
displayName: 'Run libgdiplus googletests'
- bash: |
brew install gettext
git clone --depth 1 --recurse-submodules https://github.com/mono/mono /tmp/mono
cd /tmp/mono
./autogen.sh --prefix=/tmp/mono-dev --with-libgdiplus=/tmp/libgdiplus-dev/lib/libgdiplus.dylib --disable-boehm
make -j4
displayName: 'Clone and Build mono'
- bash: |
make -C /tmp/mono/mcs/class/System.Drawing run-test
displayName: 'Run mono System.Drawing tests'
- bash: |
make -C /tmp/mono/mcs/class/System.Drawing run-xunit-test
displayName: 'Run mono System.Drawing xunit tests'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: 'tests/TestResult.xml'
failTaskOnFailedTests: true
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: NUnit
testResultsFiles: '/tmp/mono/mcs/class/**/TestResult*.xml'
failTaskOnFailedTests: true
############ WINDOWS BUILD ############
- job: Build_Windows_x86_x64
displayName: Windows x86+x64
timeoutInMinutes: 120
pool:
vmImage: windows-2019
variables:
- name: VCPKG_DEFAULT_BINARY_CACHE
value: $(Build.BinariesDirectory)/vcpkg_archives
- name: VCPKG_LIBS_TO_INSTALL
value: 'giflib libjpeg-turbo libpng cairo glib tiff libexif glib pango'
steps:
- script: |
md "$(VCPKG_DEFAULT_BINARY_CACHE)"
vcpkg install $(VCPKG_LIBS_TO_INSTALL) --triplet x86-windows
vcpkg install $(VCPKG_LIBS_TO_INSTALL) --triplet x64-windows
vcpkg integrate install
displayName: 'Install Windows dependencies'
- task: Cache@2
displayName: Cache vcpkg binaries
inputs:
key: '$(VCPKG_LIBS_TO_INSTALL) | $(Agent.OS)'
path: '$(VCPKG_DEFAULT_BINARY_CACHE)'
- task: VSBuild@1
displayName: 'Build libgdiplus x86'
inputs:
solution: libgdiplus.sln
platform: Win32
configuration: Release
- task: VSBuild@1
displayName: 'Build libgdiplus x64'
inputs:
solution: libgdiplus.sln
platform: x64
configuration: Release