-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
236 lines (222 loc) · 9.85 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
parameters:
- name: runtimeBranch
displayName: Tag for runtime repository
type: string
default: v6.0.35
- name: aspBranch
displayName: Tag for aspnetcore repository
type: string
default: v6.0.35
- name: sdkBranch
displayName: Tag for sdk repository
type: string
default: v6.0.427
- name: installerBranch
displayName: Tag for installer repository
type: string
default: v6.0.427
variables:
runCounter: $[counter('runNumber', 1)]
resources:
repositories:
- repository: runtime
type: github
endpoint: Servarr
name: dotnet/runtime
ref: release/6.0
- repository: aspnetcore
type: github
endpoint: Servarr
name: dotnet/aspnetcore
ref: release/6.0
- repository: sdk
type: github
endpoint: Servarr
name: dotnet/sdk
ref: release/6.0.4xx
- repository: installer
type: github
endpoint: Servarr
name: dotnet/installer
ref: release/6.0.4xx
trigger:
branches:
include:
- v6
pr:
- v6
stages:
- stage: Runtime
pool:
vmImage: 'ubuntu-20.04'
jobs:
- job: Setup
steps:
- bash: |
BRANCH=${{ parameters.runtimeBranch }}
echo "##vso[build.updatebuildnumber]${BRANCH/\//-}-${RUNCOUNTER}"
displayName: Set Build Name
- job: Runtime
timeoutInMinutes: 0
steps:
- checkout: self
- checkout: runtime
- bash: |
set -e
git -C runtime checkout ${{ parameters.runtimeBranch }}
git -C runtime apply ../dotnet-linux-x86/patches/runtime/0001-Fix-duplicate-definition-of-_RUNTIME_FUNCTION-on-lin.patch
git -C runtime cherry-pick -n 7263ce5562ffd4bc515269add609886ea3d907d8
git -C runtime cherry-pick -n -Xtheirs 7d7b56e4416555c41c55ef2dc25d3f65d6c3d471
git -C runtime cherry-pick -n -Xtheirs bfcb5426ebec6cbfa67d5ca09bcc4a1d5a5216a3
sed -i 's/return/__SkipCrossArchBuild=0/' runtime/src/coreclr/build-runtime.sh
sed -i '/AppHostRuntimeIdentifier/d' runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
sed -i '/\/dnceng\/internal\//d' runtime/NuGet.config
sed -i '/PublishReadyToRun Condition/a \ \ \ \ <PublishReadyToRun>false<\/PublishReadyToRun>' runtime/src/installer/pkg/sfx/Microsoft.NETCore.App/Microsoft.NETCore.App.Runtime.props
sed -i '/crossgen-corelib/d' runtime/eng/Subsets.props
displayName: Checkout and patch
- bash: |
docker build -t dotnet-linux-x86 - < dotnet-linux-x86/Dockerfile
displayName: Build cross root
- bash: |
set -e
source dotnet-linux-x86/common.sh
calculate_build_id $(git -C runtime tag --points-at HEAD)
echo $OFFICIALBUILDID
docker run -v ${BUILD_SOURCESDIRECTORY}/runtime:/runtime dotnet-linux-x86 /runtime/eng/build.sh -ci -c Release -cross -os Linux -arch x86 /p:OfficialBuildId=$OFFICIALBUILDID -subset Clr.Native+Host.Native
docker run -v ${BUILD_SOURCESDIRECTORY}/runtime:/runtime dotnet-linux-x86 /runtime/eng/build.sh -ci -c Release -cross -os Linux -arch x86 /p:OfficialBuildId=$OFFICIALBUILDID /p:AppHostSourcePath=/runtime/artifacts/obj/linux-x86.Release/apphost/standalone/apphost || true
displayName: Build Runtime
continueOnError: true
- publish: '$(Build.SourcesDirectory)/runtime/artifacts/packages/Release/Shipping'
artifact: RuntimePackages
displayName: Publish Runtime
- stage: Sdk
dependsOn: []
pool:
vmImage: 'ubuntu-20.04'
jobs:
- job: Sdk
timeoutInMinutes: 0
steps:
- checkout: self
- checkout: sdk
- bash: |
set -e
git -C sdk checkout ${{ parameters.sdkBranch }}
displayName: Checkout and patch
- bash: |
source dotnet-linux-x86/common.sh
calculate_build_id $(git -C sdk tag --points-at HEAD)
echo $OFFICIALBUILDID
sdk/build.sh -c Release -pack -ci /p:OfficialBuildId=$OFFICIALBUILDID
displayName: Build SDK
- publish: '$(Build.SourcesDirectory)/sdk/artifacts/packages/Release/NonShipping/'
artifact: SdkPackages
displayName: Publish SDK
- publish: '$(Build.SourcesDirectory)/sdk/artifacts/log'
condition: succeededOrFailed()
artifact: SdkLogs
displayName: Publish Build Logs
- stage: AspNetCore
dependsOn: Runtime
pool:
vmImage: 'ubuntu-20.04'
jobs:
- job: AspNetCore
timeoutInMinutes: 0
steps:
- checkout: self
- checkout: aspnetcore
submodules: true
- bash: |
set -e
git -C aspnetcore checkout ${{ parameters.aspBranch }}
git -C aspnetcore submodule update --init
sed -i '/linux-x64;/a \ \ \ \ \ \ linux-x86;' aspnetcore/Directory.Build.props
sed -i '/<LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-x64" \/>/a \ \ \ \ <LatestPackageReference Include="Microsoft.NETCore.App.Runtime.linux-x86" \/>' aspnetcore/eng/Dependencies.props
dotnet nuget add source ../runtime/artifacts/packages/Release/Shipping --name local --configfile aspnetcore/NuGet.config
sed -i '/\/dnceng\/internal\//d' aspnetcore/NuGet.config
displayName: Checkout and patch
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: RuntimePackages
targetPath: '$(Build.SourcesDirectory)/runtime/artifacts/packages/Release/Shipping'
patterns: |
dotnet-runtime-*-linux-x86.tar.gz
Microsoft.*.linux-x86.*.nupkg
- task: NodeTool@0
inputs:
versionSource: 'spec'
versionSpec: '16.x'
- bash: |
set -e
source dotnet-linux-x86/common.sh
calculate_build_id $(git -C aspnetcore tag --points-at HEAD)
echo $OFFICIALBUILDID
ls -lR runtime
mkdir -p aspnetcore/artifacts/obj/Microsoft.AspNetCore.App.Runtime
cp runtime/artifacts/packages/Release/Shipping/dotnet-runtime-*-linux-x86.tar.gz aspnetcore/artifacts/obj/Microsoft.AspNetCore.App.Runtime
aspnetcore/eng/build.sh -c Release -ci -arch x86 -pack /p:CrossgenOutput=false /p:OfficialBuildId=$OFFICIALBUILDID
displayName: Build AspNetCore
- publish: '$(Build.SourcesDirectory)/aspnetcore/artifacts/packages/Release/Shipping'
artifact: AspNetCorePackages
displayName: Publish AspNetCore Packages
- publish: '$(Build.SourcesDirectory)/aspnetcore/artifacts/installers/Release'
artifact: AspNetCoreInstallers
displayName: Publish AspNetCore Installers
- stage: Installer
dependsOn: AspNetCore
pool:
vmImage: 'ubuntu-20.04'
jobs:
- job: Installer
timeoutInMinutes: 0
steps:
- checkout: self
- checkout: installer
- bash: |
set -e
git -C installer checkout ${{ parameters.sdkBranch }}
dotnet nuget remove source msbuild --configfile installer/NuGet.config || true
dotnet nuget remove source nuget-build --configfile installer/NuGet.config || true
dotnet nuget add source ../runtime/artifacts/packages/Release/Shipping --name runtime --configfile installer/NuGet.config
dotnet nuget add source ../aspnetcore/artifacts/packages/Release/Shipping --name aspnetcore --configfile installer/NuGet.config
sed -i '/\/dnceng\/internal\//d' installer/NuGet.config
sed -i 's/linux-s390x/linux-s390x;linux-x86/g' installer/src/redist/targets/GenerateBundledVersions.targets
displayName: Apply patches
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: RuntimePackages
targetPath: '$(Build.SourcesDirectory)/runtime/artifacts/packages/Release/Shipping'
patterns: |
dotnet-runtime-*-linux-x86.tar.gz
Microsoft.*.linux-x86.*.nupkg
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: AspNetCorePackages
targetPath: '$(Build.SourcesDirectory)/aspnetcore/artifacts/packages/Release/Shipping'
patterns: |
Microsoft.*.linux-x86.*.nupkg
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: AspNetCoreInstallers
targetPath: '$(Build.SourcesDirectory)/aspnetcore/artifacts/installers/Release'
patterns: 'aspnetcore-runtime-*'
- bash: |
set -e
source dotnet-linux-x86/common.sh
calculate_build_id $(git -C installer tag --points-at HEAD)
echo $OFFICIALBUILDID
ls -lR runtime
ls -lR aspnetcore
mkdir -p installer/artifacts/obj/redist/Release/downloads/
cp runtime/artifacts/packages/Release/Shipping/dotnet-runtime-*-linux-x86.tar.gz installer/artifacts/obj/redist/Release/downloads/
cp aspnetcore/artifacts/installers/Release/aspnetcore-runtime-* installer/artifacts/obj/redist/Release/downloads/
installer/build.sh -c Release -ci -pack --architecture x86 --runtime-id linux-x86 /p:DISABLE_CROSSGEN=True /p:OfficialBuildId=$OFFICIALBUILDID /p:IncludeAspNetCoreRuntime=True /p:HostRid=linux-x64
displayName: Build Installer
- publish: '$(Build.SourcesDirectory)/installer/artifacts/packages/Release/Shipping'
artifact: Installer
displayName: Publish Installer