Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2019-07-27 00:13:12 +0300
committerGitHub <noreply@github.com>2019-07-27 00:13:12 +0300
commit296d395535a4d27910a3ec5ac0cd087349f05f39 (patch)
tree05dbe81834b14c28199f5533f394af5e293ee181 /scripts
parent216fad51777dc5eb4f62ab43d8109629d4c13157 (diff)
[netcore] Use yaml stages in azure pipelines definition (#15838)
Arcade would like us to start using yaml stages.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/ci/pipeline-netcore-runtime.yml366
1 files changed, 207 insertions, 159 deletions
diff --git a/scripts/ci/pipeline-netcore-runtime.yml b/scripts/ci/pipeline-netcore-runtime.yml
index 1d653be3423..59ccf713237 100644
--- a/scripts/ci/pipeline-netcore-runtime.yml
+++ b/scripts/ci/pipeline-netcore-runtime.yml
@@ -18,165 +18,213 @@ variables:
- name: _DotNetPublishToBlobFeed
value: true
-jobs:
-- job: Build
- timeoutInMinutes: 90
- strategy:
- matrix:
- Linux_x64:
- poolname: Hosted Ubuntu 1604
- manifest: linux-x64
- sed: sed
- Linux_ARM64:
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
- poolname: Xamarin-ARM64
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
- poolname: Xamarin-ARM64-Private
- manifest: linux-arm64
- sed: sed
- Windows_x64:
- poolname: Hosted VS2017
- manifest: win-x64
- sed: sed
- OSX_x64:
- poolname: Hosted macOS
- manifest: osx-x64
- sed: gsed
- pool:
- name: $(poolname)
- steps:
- - bash: |
- git clean -ffdx
- git reset --hard HEAD
- displayName: 'Clean up working directory'
- - bash: |
- brew install autoconf automake libtool gnu-sed
- displayName: 'Prepare OSX dependencies'
- condition: eq(variables['poolname'], 'Hosted macOS')
-
- - bash: |
- sudo apt update
- sudo apt -y install nuget libgdiplus build-essential libtool libtool-bin cmake gettext bc
- displayName: 'Prepare Linux dependencies'
- condition: eq(variables['poolname'], 'Hosted Ubuntu 1604')
-
- - script: |
- choco install msys2 --params="/InstallDir:%CD:~0,2%\msys64 /NoUpdate /NoPath"
- %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syyuu
- %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
- %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Suy"
- %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"
- copy %CD:~0,2%\msys64\mingw64\bin\mingw32-make.exe %CD:~0,2%\msys64\mingw64\bin\make.exe
- env:
- CHERE_INVOKING: yes
- displayName: 'Prepare Windows dependencies'
- condition: eq(variables['poolname'], 'Hosted VS2017')
-
- - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- - bash: |
- ${sed} -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
- env:
- dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
- sed: $(sed)
- displayName: 'Rewrite .gitmodules'
-
- - script: |
- %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"
- CALL msvc\run-msbuild.bat build x86_64 release "/p:PlatformToolset=v140 /p:MONO_TARGET_GC=sgen"
- %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"
- MKDIR mono\mini\.libs\
- COPY msvc\build\sgen\x64\bin\Release\mono-2.0-sgen.dll mono\mini\.libs\monosgen-2.0.dll
- %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"
- displayName: 'Build (MSBuild and Make)'
- env:
- CHERE_INVOKING: yes
- condition: eq(variables['poolname'], 'Hosted VS2017')
-
- - bash: |
- cd netcore
- ./build.sh
- displayName: 'Build (Make)'
- condition: ne(variables['poolname'], 'Hosted VS2017')
-
- - bash: |
- make -C netcore nupkg
- displayName: 'Build nupkg'
- condition: ne(variables['poolname'], 'Hosted VS2017')
-
- - bash: |
- make -C netcore update-tests-corefx
- displayName: 'Download CoreFX Tests'
- condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['poolname'], 'Hosted VS2017'))
-
- - bash: |
- rm -rf .failures
- counter=0
- tests_count=$(ls -1 netcore/corefx/tests/extracted | wc -l)
- for testdir in netcore/corefx/tests/extracted/*; do
- counter=$((counter+1))
- printf "\nProcessing ($counter / $tests_count) $(basename $testdir)\n";
- scripts/ci/./run-step.sh --label=$(basename $testdir) --timeout=10m --fatal make -C netcore run-tests-corefx-$(basename $testdir) || echo $(basename $testdir) >> .failures;
- done
- displayName: 'Run CoreFX Tests'
- timeoutInMinutes: 90
- condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['poolname'], 'Hosted VS2017'))
-
- - task: PublishTestResults@2
- inputs:
- testRunTitle: $(poolname)
- testResultsFormat: 'XUnit'
- testResultsFiles: 'netcore/corefx/tests/TestResult-*.xml'
- condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['poolname'], 'Hosted VS2017'))
-
- - bash: |
- make -C netcore xunit-summary
- if [ -e ".failures" ]; then
- printf "\n\nFailures in $(<.failures)\nSee 'Run CoreFX tests' logs if Test View shows 0 failures.\n\n";
- exit 1
- fi
- displayName: 'Validate test results'
- timeoutInMinutes: 90
- condition: and(eq(variables['System.TeamProject'], 'public'), ne(variables['poolname'], 'Hosted VS2017'))
-
- - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- - powershell: |
- eng\common\build.ps1 /p:DotNetPublishToBlobFeed=true -ci -restore -projects $(Build.Repository.LocalPath)\eng\empty.proj
- displayName: 'restore Arcade stuff with PowerShell'
- condition: eq(variables['poolname'], 'Hosted VS2017')
- - bash: |
- ./eng/common/build.sh -p:DotNetPublishToBlobFeed=true --ci --restore --projects $(Build.Repository.LocalPath)/eng/empty.proj
- displayName: 'restore Arcade stuff with Bash'
- condition: ne(variables['poolname'], 'Hosted VS2017')
- - bash: |
- rm -f ./artifacts/Microsoft.NETCore.Runtime.Mono*nupkg
- displayName: 'Delete metapackage, except on Windows'
- condition: ne(variables['poolname'], 'Hosted VS2017')
- - bash: |
- dotnet msbuild eng/publishwitharcade.proj -p:AzureFeedUrl=$(dotnetfeedUrl) -p:AzureAccountKey=${dotnetFeedPat} -p:AssetManifest=${manifest}
- env:
- dotnetFeedPat: $(dotnetfeed-storage-access-key-1)
- manifest: $(manifest)
- displayName: 'publish with Arcade'
- - task: CopyFiles@2
- displayName: Gather Asset Manifests
- inputs:
- SourceFolder: '$(Build.SourcesDirectory)/artifacts/log/Debug/AssetManifest'
- TargetFolder: '$(Build.StagingDirectory)/AssetManifests'
- continueOnError: false
- condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
- - task: PublishBuildArtifacts@1
- displayName: Push Asset Manifests
- inputs:
- PathtoPublish: '$(Build.StagingDirectory)/AssetManifests'
- PublishLocation: Container
- ArtifactName: AssetManifests
- continueOnError: false
- condition: and(succeeded(), eq(variables['_DotNetPublishToBlobFeed'], 'true'))
+stages:
+- stage: build
+ displayName: Build
+ jobs:
+ - template: /eng/common/templates/jobs/jobs.yml
+ parameters:
+ enablePublishUsingPipelines: true
+ enablePublishBuildAssets: true
+ jobs:
+ - job: Build_Linux
+ displayName: Linux
+ timeoutInMinutes: 90
+ strategy:
+ matrix:
+ x64:
+ poolimage: ubuntu-16.04
+ poolname: # empty
+ ARM64:
+ poolimage: # empty
+ ${{ if eq(variables['System.TeamProject'], 'public') }}:
+ poolname: Xamarin-ARM64
+ ${{ if eq(variables['System.TeamProject'], 'internal') }}:
+ poolname: Xamarin-ARM64-Private
+ pool:
+ name: $(poolname)
+ vmImage: $(poolimage)
+ steps:
+ - bash: |
+ git clean -ffdx
+ git reset --hard HEAD
+ displayName: 'Clean up working directory'
+
+ - bash: |
+ sudo apt update
+ sudo apt -y install nuget libgdiplus build-essential libtool libtool-bin cmake gettext bc
+ displayName: 'Prepare Linux dependencies'
+
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
+ - bash: |
+ sed -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
+ env:
+ dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
+ displayName: 'Rewrite .gitmodules'
+
+ - bash: |
+ cd netcore
+ ./build.sh
+ displayName: 'Build (Make)'
+
+ - bash: |
+ make -C netcore nupkg
+ rm -f ./artifacts/Microsoft.NETCore.Runtime.Mono*nupkg
+ displayName: 'Build nupkg'
+
+ - bash: |
+ make -C netcore update-tests-corefx
+ displayName: 'Download CoreFX Tests'
+ condition: eq(variables['System.TeamProject'], 'public')
+
+ - bash: |
+ rm -rf .failures
+ counter=0
+ tests_count=$(ls -1 netcore/corefx/tests/extracted | wc -l)
+ for testdir in netcore/corefx/tests/extracted/*; do
+ counter=$((counter+1))
+ printf "\nProcessing ($counter / $tests_count) $(basename $testdir)\n";
+ scripts/ci/./run-step.sh --label=$(basename $testdir) --timeout=10m --fatal make -C netcore run-tests-corefx-$(basename $testdir) || echo $(basename $testdir) >> .failures;
+ done
+ displayName: 'Run CoreFX Tests'
+ timeoutInMinutes: 90
+ condition: eq(variables['System.TeamProject'], 'public')
+
+ - task: PublishTestResults@2
+ inputs:
+ testRunTitle: $(poolname)
+ testResultsFormat: 'XUnit'
+ testResultsFiles: 'netcore/corefx/tests/TestResult-*.xml'
+ condition: eq(variables['System.TeamProject'], 'public')
+
+ - bash: |
+ make -C netcore xunit-summary
+ if [ -e ".failures" ]; then
+ printf "\n\nFailures in $(<.failures)\nSee 'Run CoreFX tests' logs if Test View shows 0 failures.\n\n";
+ exit 1
+ fi
+ displayName: 'Validate test results'
+ timeoutInMinutes: 90
+ condition: eq(variables['System.TeamProject'], 'public')
+
+ - job: Build_macOS
+ displayName: macOS
+ timeoutInMinutes: 90
+ strategy:
+ matrix:
+ x64:
+ poolimage: macOS-10.14
+ pool:
+ vmImage: $(poolimage)
+ steps:
+ - bash: |
+ git clean -ffdx
+ git reset --hard HEAD
+ displayName: 'Clean up working directory'
+ - bash: |
+ brew install autoconf automake libtool gnu-sed
+ displayName: 'Prepare macOS dependencies'
+
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
+ - bash: |
+ gsed -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
+ env:
+ dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
+ displayName: 'Rewrite .gitmodules'
+
+ - bash: |
+ cd netcore
+ ./build.sh
+ displayName: 'Build (Make)'
+
+ - bash: |
+ make -C netcore nupkg
+ rm -f ./artifacts/Microsoft.NETCore.Runtime.Mono*nupkg
+ displayName: 'Build nupkg'
+
+ - bash: |
+ make -C netcore update-tests-corefx
+ displayName: 'Download CoreFX Tests'
+ condition: eq(variables['System.TeamProject'], 'public')
+
+ - bash: |
+ rm -rf .failures
+ counter=0
+ tests_count=$(ls -1 netcore/corefx/tests/extracted | wc -l)
+ for testdir in netcore/corefx/tests/extracted/*; do
+ counter=$((counter+1))
+ printf "\nProcessing ($counter / $tests_count) $(basename $testdir)\n";
+ scripts/ci/./run-step.sh --label=$(basename $testdir) --timeout=10m --fatal make -C netcore run-tests-corefx-$(basename $testdir) || echo $(basename $testdir) >> .failures;
+ done
+ displayName: 'Run CoreFX Tests'
+ timeoutInMinutes: 90
+ condition: eq(variables['System.TeamProject'], 'public')
+
+ - task: PublishTestResults@2
+ inputs:
+ testRunTitle: $(poolname)
+ testResultsFormat: 'XUnit'
+ testResultsFiles: 'netcore/corefx/tests/TestResult-*.xml'
+ condition: eq(variables['System.TeamProject'], 'public')
+
+ - bash: |
+ make -C netcore xunit-summary
+ if [ -e ".failures" ]; then
+ printf "\n\nFailures in $(<.failures)\nSee 'Run CoreFX tests' logs if Test View shows 0 failures.\n\n";
+ exit 1
+ fi
+ displayName: 'Validate test results'
+ timeoutInMinutes: 90
+ condition: eq(variables['System.TeamProject'], 'public')
+
+ - job: Build_Windows
+ displayName: Windows
+ timeoutInMinutes: 90
+ strategy:
+ matrix:
+ x64:
+ poolimage: vs2017-win2016
+ pool:
+ vmImage: $(poolimage)
+ steps:
+ - bash: |
+ git clean -ffdx
+ git reset --hard HEAD
+ displayName: 'Clean up working directory'
+
+ - script: |
+ choco install msys2 --params="/InstallDir:%CD:~0,2%\msys64 /NoUpdate /NoPath"
+ %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syyuu
+ %CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
+ %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Suy"
+ %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"
+ copy %CD:~0,2%\msys64\mingw64\bin\mingw32-make.exe %CD:~0,2%\msys64\mingw64\bin\make.exe
+ env:
+ CHERE_INVOKING: yes
+ displayName: 'Prepare Windows dependencies'
+
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
+ - bash: |
+ sed -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
+ env:
+ dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
+ displayName: 'Rewrite .gitmodules'
+
+ - script: |
+ %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"
+ CALL msvc\run-msbuild.bat build x86_64 release "/p:PlatformToolset=v140 /p:MONO_TARGET_GC=sgen"
+ %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"
+ MKDIR mono\mini\.libs\
+ COPY msvc\build\sgen\x64\bin\Release\mono-2.0-sgen.dll mono\mini\.libs\monosgen-2.0.dll
+ %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"
+ displayName: 'Build (MSBuild and Make)'
+ env:
+ CHERE_INVOKING: yes
- ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- - template: /eng/common/templates/phases/publish-build-assets.yml
+ - template: /eng/common/templates/post-build/post-build.yml
parameters:
- dependsOn:
- - Build
- queue:
- name: Hosted VS2017
+ enableSourceLinkValidation: false
+ enableSigningValidation: false
+ enableSymbolValidation: false
+ enableNugetValidation: false