13 - ${{ if ne(variables['System.TeamProject'], 'public') }}:
14 - group: DotNet-VSTS-Bot
15 - group: DotNet-Blob-Feed
16 - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
17 # Variables used to publish packages to blob feed
19 value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
20 # Variables used by arcade to gather asset manifests
21 - name: _DotNetPublishToBlobFeed
28 - template: /eng/common/templates/jobs/jobs.yml
30 enablePublishBuildArtifacts: true
31 enablePublishBuildAssets: true
32 enablePublishUsingPipelines: false
34 - _BuildConfig: Release
37 ############ LINUX BUILD ############
44 poolname: Hosted Ubuntu 1604
46 prepareDependencies: true
49 ${{ if eq(variables['System.TeamProject'], 'public') }}:
50 poolname: Xamarin-ARM64
51 ${{ if eq(variables['System.TeamProject'], 'internal') }}:
52 poolname: Xamarin-ARM64-Private
59 displayName: 'Clean up working directory'
63 sudo apt -y install nuget libgdiplus build-essential libtool libtool-bin cmake gettext bc
64 displayName: 'Prepare Linux dependencies'
65 condition: and(succeeded(), eq(variables['prepareDependencies'], 'true'))
68 sed -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
70 dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
71 displayName: 'Rewrite .gitmodules'
72 condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
76 ./build.sh -c $(_BuildConfig)
77 displayName: 'Build (Make)'
81 rm -f ./artifacts/Microsoft.NETCore.Runtime.Mono*nupkg
82 mkdir -p ./artifacts/log/$(_BuildConfig)
83 displayName: 'Build nupkg'
86 make -C netcore run-tests-corefx USE_TIMEOUT=1
87 displayName: 'Download and Run CoreFX Tests'
89 condition: and(succeeded(), eq(variables['System.TeamProject'], 'public'))
91 - task: PublishTestResults@2
93 testRunTitle: $(poolname)
94 testResultsFormat: 'XUnit'
95 testResultsFiles: 'netcore/corefx/tests/TestResult-*.xml'
96 condition: and(succeededOrFailed(), eq(variables['System.TeamProject'], 'public'))
98 - script: ./eng/common/build.sh -c $(_BuildConfig) /p:DotNetPublishToBlobFeed=true --ci --restore --projects $(Build.SourcesDirectory)/eng/empty.proj
99 displayName: Restore blob feed tasks
100 condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
102 - script: ./eng/common/msbuild.sh --ci $(Build.SourcesDirectory)/eng/publishwitharcade.proj /p:Configuration=$(_BuildConfig) /p:AzureFeedUrl=$(dotnetFeedUrl) /p:AzureAccountKey=$(dotnetfeed-storage-access-key-1) /p:AssetManifest=$(manifest)
103 displayName: Publish packages to blob feed
104 condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
106 ############ MACOS BUILD ############
109 timeoutInMinutes: 120
113 poolname: Hosted macOS
120 git reset --hard HEAD
121 displayName: 'Clean up working directory'
123 brew install autoconf automake libtool gnu-sed
124 displayName: 'Prepare macOS dependencies'
127 gsed -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
129 dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
130 displayName: 'Rewrite .gitmodules'
131 condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
135 ./build.sh -c $(_BuildConfig)
136 displayName: 'Build (Make)'
139 make -C netcore nupkg
140 rm -f ./artifacts/Microsoft.NETCore.Runtime.Mono*nupkg
141 mkdir -p ./artifacts/log/$(_BuildConfig)
142 displayName: 'Build nupkg'
145 make -C netcore run-tests-corefx USE_TIMEOUT=1
146 displayName: 'Download and Run CoreFX Tests'
148 condition: and(succeeded(), eq(variables['System.TeamProject'], 'public'))
150 - task: PublishTestResults@2
152 testRunTitle: $(poolname)
153 testResultsFormat: 'XUnit'
154 testResultsFiles: 'netcore/corefx/tests/TestResult-*.xml'
155 condition: and(succeededOrFailed(), eq(variables['System.TeamProject'], 'public'))
157 - script: ./eng/common/build.sh -c $(_BuildConfig) /p:DotNetPublishToBlobFeed=true --ci --restore --projects $(Build.SourcesDirectory)/eng/empty.proj
158 displayName: Restore blob feed tasks
159 condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
161 - script: ./eng/common/msbuild.sh --ci $(Build.SourcesDirectory)/eng/publishwitharcade.proj /p:Configuration=$(_BuildConfig) /p:AzureFeedUrl=$(dotnetFeedUrl) /p:AzureAccountKey=$(dotnetfeed-storage-access-key-1) /p:AssetManifest=$(manifest)
162 displayName: Publish packages to blob feed
163 condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
165 ############ WINDOWS BUILD ############
168 timeoutInMinutes: 120
172 poolname: Hosted VS2017
179 git reset --hard HEAD
180 displayName: 'Clean up working directory'
183 choco install msys2 --params="/InstallDir:%CD:~0,2%\msys64 /NoUpdate /NoPath"
184 %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syyuu
185 %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
186 %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Suy"
187 %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"
188 copy %CD:~0,2%\msys64\mingw64\bin\mingw32-make.exe %CD:~0,2%\msys64\mingw64\bin\make.exe
191 displayName: 'Prepare Windows dependencies'
194 sed -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
196 dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
197 displayName: 'Rewrite .gitmodules'
198 condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
201 %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"
202 CALL msvc\run-msbuild.bat build x86_64 release "/p:PlatformToolset=v140 /p:MONO_TARGET_GC=sgen"
203 %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 CORLIB_BUILD_FLAGS='-c $(_BuildConfig)'"
204 MKDIR mono\mini\.libs\
205 COPY msvc\build\sgen\x64\bin\Release\mono-2.0-sgen.dll mono\mini\.libs\monosgen-2.0.dll
206 %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"
207 MKDIR artifacts\log\$(_BuildConfig)\
208 displayName: 'Build (MSBuild and Make)'
212 - powershell: eng\common\build.ps1 /p:DotNetPublishToBlobFeed=true -c $(_BuildConfig) -ci -restore -projects $(Build.SourcesDirectory)\eng\empty.proj
213 displayName: Restore blob feed tasks
214 condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
216 - powershell: eng\common\msbuild.ps1 -ci $(Build.SourcesDirectory)\eng\publishwitharcade.proj /p:Configuration=$(_BuildConfig) /p:AzureFeedUrl=$(dotnetFeedUrl) /p:AzureAccountKey=$(dotnetfeed-storage-access-key-1) /p:AssetManifest=$(manifest)
217 displayName: Publish packages to blob feed
218 condition: and(succeeded(), ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest'))
221 # - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
222 # - template: /eng/common/templates/post-build/post-build.yml
224 # enableSourceLinkValidation: false
225 # enableSigningValidation: false
226 # enableSymbolValidation: false
227 # enableNugetValidation: true