代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。