10 - ${{ if ne(variables['System.TeamProject'], 'public') }}:
11 - group: DotNet-VSTS-Bot
12 - group: DotNet-Blob-Feed
13 - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
14 # Variables used to publish packages to blob feed
16 value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
17 # Variables used by arcade to gather asset manifests
18 - name: _DotNetPublishToBlobFeed
27 poolname: Hosted Ubuntu 1604
31 ${{ if eq(variables['System.TeamProject'], 'public') }}:
32 poolname: Xamarin-ARM64
33 ${{ if eq(variables['System.TeamProject'], 'internal') }}:
34 poolname: Xamarin-ARM64-Private
38 poolname: Hosted VS2017
42 poolname: Hosted macOS
49 brew install autoconf automake libtool gnu-sed
50 displayName: 'Prepare OSX dependencies'
51 condition: eq(variables['poolname'], 'Hosted macOS')
55 sudo apt -y install nuget libgdiplus build-essential libtool libtool-bin cmake gettext bc
56 displayName: 'Prepare Linux dependencies'
57 condition: eq(variables['poolname'], 'Hosted Ubuntu 1604')
60 choco install msys2 --params="/InstallDir:%CD:~0,2%\msys64 /NoUpdate /NoPath"
61 %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syyuu
62 %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
63 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Suy"
64 %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"
65 copy %CD:~0,2%\msys64\mingw64\bin\mingw32-make.exe %CD:~0,2%\msys64\mingw64\bin\make.exe
68 displayName: 'Prepare Windows dependencies'
69 condition: eq(variables['poolname'], 'Hosted VS2017')
71 - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
73 ${sed} -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
75 dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
77 displayName: 'Rewrite .gitmodules'
80 %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"
81 CALL msvc\run-msbuild.bat build x86_64 release "/p:PlatformToolset=v140 /p:MONO_TARGET_GC=sgen"
82 %CD:~0,2%\msys64\usr\bin\bash -lc "PATH=/c/windows/System32/WindowsPowerShell/v1.0/:/usr/bin:/mingw64/bin:/c/hostedtoolcache/windows/dncs/2.2.203/x64:/c/Program\ Files/Git/bin make -C netcore bcl"
83 MKDIR mono\mini\.libs\
84 COPY msvc\build\sgen\x64\bin\Release\mono-2.0-sgen.dll mono\mini\.libs\monosgen-2.0.dll
85 %CD:~0,2%\msys64\usr\bin\bash -lc "PATH=/c/windows/System32/WindowsPowerShell/v1.0/:/usr/bin:/mingw64/bin:/c/hostedtoolcache/windows/dncs/2.2.203/x64:/c/Program\ Files/Git/bin make -C netcore nupkg"
86 displayName: 'Build (MSBuild and Make)'
89 condition: eq(variables['poolname'], 'Hosted VS2017')
92 ./autogen.sh --with-core=only
95 displayName: 'Build (Make)'
96 condition: ne(variables['poolname'], 'Hosted VS2017')
100 displayName: 'Build nupkg'
101 condition: ne(variables['poolname'], 'Hosted VS2017')
104 make -C netcore update-tests-corefx
105 displayName: 'Download CoreFX Tests'
106 condition: ne(variables['poolname'], 'Hosted VS2017')
111 tests_count=$(ls -1 netcore/corefx/tests/extracted | wc -l)
112 for testdir in netcore/corefx/tests/extracted/*; do
113 counter=$((counter+1))
114 printf "\nProcessing ($counter / $tests_count) $(basename $testdir)\n";
115 scripts/ci/./run-step.sh --label=$(basename $testdir) --timeout=10m --fatal make -C netcore run-tests-corefx-$(basename $testdir) || echo $(basename $testdir) >> .failures;
117 displayName: 'Run CoreFX Tests'
119 condition: ne(variables['poolname'], 'Hosted VS2017')
121 - task: PublishTestResults@2
123 testRunTitle: $(poolname)
124 testResultsFormat: 'XUnit'
125 testResultsFiles: 'netcore/corefx/tests/TestResult-*.xml'
126 condition: ne(variables['poolname'], 'Hosted VS2017')
129 if [ -e ".failures" ]; then
130 printf "\n\nFailures in $(<.failures)\nSee 'Run CoreFX tests' logs if Test View shows 0 failures.\n\n";
133 displayName: 'Validate test results'
135 condition: ne(variables['poolname'], 'Hosted VS2017')
137 - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
139 eng\common\build.ps1 /p:DotNetPublishToBlobFeed=true -ci -restore -projects $(Build.Repository.LocalPath)\eng\empty.proj
140 displayName: 'restore Arcade stuff with PowerShell'
141 condition: eq(variables['poolname'], 'Hosted VS2017')
143 ./eng/common/build.sh -p:DotNetPublishToBlobFeed=true --ci --restore --projects $(Build.Repository.LocalPath)/eng/empty.proj
144 displayName: 'restore Arcade stuff with Bash'
145 condition: ne(variables['poolname'], 'Hosted VS2017')
147 rm -f ./artifacts/Microsoft.NETCore.Runtime.Mono*nupkg
148 displayName: 'Delete metapackage, except on Windows'
149 condition: ne(variables['poolname'], 'Hosted VS2017')
151 dotnet msbuild eng/publishwitharcade.proj -p:AzureFeedUrl=$(dotnetfeedUrl) -p:AzureAccountKey=${dotnetFeedPat} -p:AssetManifest=${manifest}
153 dotnetFeedPat: $(dotnetfeed-storage-access-key-1)
154 manifest: $(manifest)
155 displayName: 'publish with Arcade'
157 displayName: Gather Asset Manifests
159 SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/Debug/AssetManifest'
160 TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
161 continueOnError: false
162 condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
163 - task: PublishBuildArtifacts@1
164 displayName: Push Asset Manifests
166 PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
167 PublishLocation: Container
168 ArtifactName: AssetManifests
169 continueOnError: false
170 condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
172 - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
173 - template: /eng/common/templates/phases/publish-build-assets.yml