This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.azure-pipelines.yml
79 lines (62 loc) · 2.31 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
variables:
LIBGDIPLUS_VERSION: '6.0.5'
jobs:
- job: build
pool:
vmImage: 'macOS-10.14'
steps:
- script: |
brew install autoconf automake libtool pkg-config
displayName: Install autotools
- script: |
cd runtime.osx.10.10-x64.CoreCompat.System.Drawing
git clone https://github.com/mono/libgdiplus --depth 1 --single-branch --branch ${LIBGDIPLUS_VERSION}
brew install libtiff giflib libjpeg glib cairo freetype fontconfig libpng
displayName: Download sources, install dependencies
- script: |
cd runtime.osx.10.10-x64.CoreCompat.System.Drawing
# libffi is keg-only
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig"
./build.sh
mkdir ${BUILD_ARTIFACTSTAGINGDIRECTORY}/libgdiplus
dotnet build -c Release /p:Version=${LIBGDIPLUS_VERSION}.${BUILD_BUILDID}
dotnet pack -c Release /p:Version=${LIBGDIPLUS_VERSION}.${BUILD_BUILDID} -o ${BUILD_ARTIFACTSTAGINGDIRECTORY}/libgdiplus
displayName: Build
- task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)/libgdiplus'
artifactName: 'libgdiplus'
publishLocation: 'Container'
condition: always()
displayName: Upload NuGet package
- job: test
dependsOn: build
pool:
vmImage: 'macOS-10.14'
steps:
- task: DownloadBuildArtifacts@0
inputs:
artifactName: 'libgdiplus'
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
packageType: sdk
version: 5.0.400
installationPath: $(Agent.ToolsDirectory)/dotnet
- script: |
brew remove --force $(brew list)
echo
echo "=========================="
echo "Contents of /usr/local/opt"
echo "=========================="
echo
ls -l /usr/local/opt/
displayName: Clean dependencies
- script: |
cd runtime.osx.10.10-x64.CoreCompat.System.Drawing.Tests
$(Agent.ToolsDirectory)/dotnet/dotnet nuget list source
$(Agent.ToolsDirectory)/dotnet/dotnet nuget add source $(System.ArtifactsDirectory)/libgdiplus/ -n ci
$(Agent.ToolsDirectory)/dotnet/dotnet add package runtime.osx.10.10-x64.CoreCompat.System.Drawing --version ${LIBGDIPLUS_VERSION}.${BUILD_BUILDID}
$(Agent.ToolsDirectory)/dotnet/dotnet test
displayName: Test