[ci] Remove spaces in pipeline-netcore-runtime.yml
[mono-project.git] / scripts / ci / pipeline-netcore-runtime.yml
blob309725eabe98e231788f968b6cec087429e4237c
1 variables:
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
7   - name: dotnetFeedUrl
8     value: https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
9   # Variables used by arcade to gather asset manifests
10   - name: _DotNetPublishToBlobFeed
11     value: true
13 jobs:
14 - job: Build
15   strategy:
16     matrix:
17       Linux_x64:
18         poolname: Hosted Ubuntu 1604
19         manifest: linux-x64
20         sed: sed
21       Windows_x64:
22         poolname: Hosted VS2017
23         manifest: win-x64
24         sed: sed
25       OSX_x64:
26         poolname: Hosted macOS
27         manifest: osx-x64
28         sed: gsed
29   pool:
30     name: $(poolname)
31   steps:
32   - bash: |  
33       brew install autoconf automake libtool gnu-sed
34     displayName: 'Prepare OSX dependencies'
35     condition: eq(variables['poolname'], 'Hosted macOS')
37   - bash: |  
38       sudo apt update
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')
42   
43   - script: |
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
50     env:
51       CHERE_INVOKING: yes
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')) }}:
56     - bash: |
57         ${sed} -i "s#git://github.com/#https://dn-bot:${dncengPat}@dev.azure.com/dnceng/internal/_git/#; s#\.git\$##; s#\(url = .*\)/\(.*\)#\1-\2#" .gitmodules
58       env:
59         dncengPat: $(dn-bot-dotnet-build-rw-code-rw)
60         sed: $(sed)
61       displayName: 'Rewrite .gitmodules'
63   - task: DotNetCoreInstaller@0
64     inputs:
65       packageType: 'sdk'
66       version: '2.2.203'
67     displayName: Install .NET Core 2.2 latest
68     condition: eq(variables['poolname'], 'Hosted VS2017')
70   - script: |
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)'
78     env:
79       CHERE_INVOKING: yes
80     condition: eq(variables['poolname'], 'Hosted VS2017')
82   - bash: |
83       ./autogen.sh --with-core=only
84       make
85       make -C netcore nupkg
86     displayName: 'Build (Make)'
87     condition: ne(variables['poolname'], 'Hosted VS2017')
88   
89   - ${{ if and(ne(variables['System.TeamProject'], 'public'), ne(variables['Build.Reason'], 'PullRequest')) }}:
90     - powershell: |
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')
94     - bash: |
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')
98     - bash: |
99         rm -f ./artifacts/Microsoft.NETCore.Runtime.Mono*nupkg
100       displayName: 'Delete metapackage, except on Windows'
101       condition: ne(variables['poolname'], 'Hosted VS2017')
102     - bash: |
103         dotnet msbuild eng/publishwitharcade.proj -p:AzureFeedUrl=$(dotnetfeedUrl) -p:AzureAccountKey=${dotnetFeedPat} -p:AssetManifest=${manifest}
104       env:
105         dotnetFeedPat: $(dotnetfeed-storage-access-key-1)
106         manifest: $(manifest)
107       displayName: 'publish with Arcade'
108     - task: CopyFiles@2
109       displayName: Gather Asset Manifests
110       inputs:
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
117       inputs:
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
126     parameters:
127       dependsOn:
128         - Build
129       queue:
130         name: Hosted VS2017