2 - ${{ if ne(variables['System.TeamProject'], 'public') }}:
3 - group: DotNet-VSTS-Bot
4 - group: DotNet-Blob-Feed
5 - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
6 # Variables used to publish packages to blob feed
8 value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
9 # Variables used by arcade to gather asset manifests
10 - name: _DotNetPublishToBlobFeed
18 poolname: Hosted Ubuntu 1604
22 poolname: Hosted VS2017
26 poolname: Hosted macOS
33 brew install autoconf automake libtool gnu-sed
34 displayName: 'Prepare OSX dependencies'
35 condition: eq(variables['poolname'], 'Hosted macOS')
39 sudo apt -y install nuget build-essential libtool libtool-bin cmake gettext dotnet-sdk-2.2
40 displayName: 'Prepare Linux dependencies'
41 condition: eq(variables['poolname'], 'Hosted Ubuntu 1604')
44 choco install msys2 --params="/InstallDir:%CD:~0,2%\msys64 /NoUpdate /NoPath"
45 %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syyuu
46 %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
47 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Suy"
48 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -S --needed python2 gettext autoconf automake libtool mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-make"
49 copy %CD:~0,2%\msys64\mingw64\bin\mingw32-make.exe %CD:~0,2%\msys64\mingw64\bin\make.exe
52 displayName: 'Prepare Windows dependencies'
53 condition: eq(variables['poolname'], 'Hosted VS2017')
55 - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
57 ${sed} -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
59 dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
61 displayName: 'Rewrite .gitmodules'
63 - task: DotNetCoreInstaller@0
67 displayName: Install .NET Core 2.2 latest
68 condition: eq(variables['poolname'], 'Hosted VS2017')
71 %CD:~0,2%\msys64\usr\bin\bash -lc "PATH=/usr/bin:/mingw64/bin:/c/hostedtoolcache/windows/dncs/2.2.203/x64:/c/Program\ Files/Git/bin ./autogen.sh --host=x86_64-w64-mingw32 --with-core=only"
72 CALL msvc\run-msbuild.bat build x86_64 release "/p:PlatformToolset=v140 /p:MONO_TARGET_GC=sgen"
73 %CD:~0,2%\msys64\usr\bin\bash -lc "PATH=/usr/bin:/mingw64/bin:/c/hostedtoolcache/windows/dncs/2.2.203/x64:/c/Program\ Files/Git/bin make -C netcore bcl"
74 MKDIR mono\mini\.libs\
75 COPY msvc\build\sgen\x64\bin\Release\mono-2.0-sgen.dll mono\mini\.libs\monosgen-2.0.dll
76 %CD:~0,2%\msys64\usr\bin\bash -lc "PATH=/usr/bin:/mingw64/bin:/c/hostedtoolcache/windows/dncs/2.2.203/x64:/c/Program\ Files/Git/bin make -C netcore nupkg"
77 displayName: 'Build (MSBuild and Make)'
80 condition: eq(variables['poolname'], 'Hosted VS2017')
83 ./autogen.sh --with-core=only
86 displayName: 'Build (Make)'
87 condition: ne(variables['poolname'], 'Hosted VS2017')
89 - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
91 eng\common\build.ps1 /p:DotNetPublishToBlobFeed=true -ci -restore -projects $(Build.Repository.LocalPath)\eng\empty.proj
92 displayName: 'restore Arcade stuff with PowerShell'
93 condition: eq(variables['poolname'], 'Hosted VS2017')
95 ./eng/common/build.sh -p:DotNetPublishToBlobFeed=true --ci --restore --projects $(Build.Repository.LocalPath)/eng/empty.proj
96 displayName: 'restore Arcade stuff with Bash'
97 condition: ne(variables['poolname'], 'Hosted VS2017')
99 rm -f ./artifacts/Microsoft.NETCore.Runtime.Mono*nupkg
100 displayName: 'Delete metapackage, except on Windows'
101 condition: ne(variables['poolname'], 'Hosted VS2017')
103 dotnet msbuild eng/publishwitharcade.proj -p:AzureFeedUrl=$(dotnetfeedUrl) -p:AzureAccountKey=${dotnetFeedPat} -p:AssetManifest=${manifest}
105 dotnetFeedPat: $(dotnetfeed-storage-access-key-1)
106 manifest: $(manifest)
107 displayName: 'publish with Arcade'
109 displayName: Gather Asset Manifests
111 SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/Debug/AssetManifest'
112 TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
113 continueOnError: false
114 condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
115 - task: PublishBuildArtifacts@1
116 displayName: Push Asset Manifests
118 PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
119 PublishLocation: Container
120 ArtifactName: AssetManifests
121 continueOnError: false
122 condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
124 - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
125 - template: /eng/common/templates/phases/publish-build-assets.yml