Skip to content

Commit 3eacbaf

Browse files
authored
Remove usages of Ubuntu 16.04 from pipelines (#75513)
* Remove usages of Ubuntu 16.04 from pipelines * Delete old jenkins scripts * Improve handling of /p:CrossBuild=true
1 parent 32a72d3 commit 3eacbaf

File tree

17 files changed

+45
-1554
lines changed

17 files changed

+45
-1554
lines changed

eng/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,12 @@ while [[ $# > 0 ]]; do
403403
shift 1
404404
;;
405405

406+
*crossbuild=true*)
407+
crossBuild=1
408+
extraargs="$extraargs $1"
409+
shift 1
410+
;;
411+
406412
-clang*)
407413
compiler="${opt/#-/}" # -clang-9 => clang-9 or clang-9 => (unchanged)
408414
arguments="$arguments /p:Compiler=$compiler /p:CppCompilerAndLinker=$compiler"

eng/pipelines/common/global-build-job.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,19 @@ jobs:
7575
- name: _osParameter
7676
value: -os ${{ parameters.osGroup }}
7777

78-
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
79-
- name: _osParameter
80-
value: /p:RuntimeOS=linux-musl /p:OutputRid=linux-musl-${{ parameters.archType }}
81-
8278
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_bionic')) }}:
8379
- name: _osParameter
84-
value: /p:RuntimeOS=linux-bionic /p:OutputRid=linux-bionic-${{ parameters.archType }}
80+
value: /p:RuntimeOS=linux-bionic
8581

8682
# Do not rename as it clashes with MSBuild property in libraries/build-native.proj
8783
- name: _crossBuildPropertyArg
8884
value: /p:CrossBuild=${{ parameters.crossBuild }}
8985

86+
- ${{ if ne(parameters.jobParameters.crossrootfsDir, '') }}:
87+
# This is only required for cross builds.
88+
- name: ROOTFS_DIR
89+
value: ${{ parameters.jobParameters.crossrootfsDir }}
90+
9091
- name: _cxx11Parameter
9192
${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.archType, 'arm64')) }}:
9293
value: /p:MonoLLVMUseCxx11Abi=true

eng/pipelines/common/platform-matrix.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
platform: Linux_musl_arm
140140
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
141141
container:
142-
image: ubuntu-16.04-cross-arm-alpine-20210923140502-78f7860
142+
image: ubuntu-18.04-cross-arm-alpine-20220915134743-78f7860
143143
registry: mcr
144144
jobParameters:
145145
runtimeFlavor: ${{ parameters.runtimeFlavor }}
@@ -165,7 +165,7 @@ jobs:
165165
platform: Linux_musl_arm64
166166
shouldContinueOnError: ${{ parameters.shouldContinueOnError }}
167167
container:
168-
image: ubuntu-16.04-cross-arm64-alpine-20210923140502-78f7860
168+
image: ubuntu-22.04-cross-arm64-alpine-20220915142421-44c622d
169169
registry: mcr
170170
jobParameters:
171171
runtimeFlavor: ${{ parameters.runtimeFlavor }}

eng/pipelines/common/templates/runtimes/build-test-job.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
pool: ${{ parameters.pool }}
4040
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}
4141

42-
${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64'))), not(eq(parameters.osGroup, 'OSX'))) }}:
42+
${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'))), not(eq(parameters.osGroup, 'OSX'))) }}:
4343
compilerArg: '-clang9'
44-
${{ if not(and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64'))), not(eq(parameters.osGroup, 'OSX')))) }}:
44+
${{ if not(and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc'), not(and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'))), not(eq(parameters.osGroup, 'OSX')))) }}:
4545
compilerArg: ''
4646

4747
# Test jobs should continue on error for internal builds
@@ -79,8 +79,8 @@ jobs:
7979
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}:
8080
- name: compilerArg
8181
value: '-clang9'
82-
# Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there
83-
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64')) }}:
82+
# We need to use the stable version available on Alpine Linux
83+
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl')) }}:
8484
- name: compilerArg
8585
value: ''
8686
# AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH

eng/pipelines/coreclr/templates/build-jit-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
- ${{ if ne(parameters.osGroup, 'windows') }}:
5959
- name: compilerArg
6060
value: '-clang9'
61-
# Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there
62-
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64')) }}:
61+
# We need to use the stable version available on Alpine Linux
62+
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl')) }}:
6363
- name: compilerArg
6464
value: ''
6565
# AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH

eng/pipelines/coreclr/templates/build-job.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ jobs:
9393
- ${{ if and(ne(parameters.osGroup, 'windows'), ne(parameters.compilerName, 'gcc')) }}:
9494
- name: compilerArg
9595
value: '-clang9'
96-
# Building for x64 MUSL happens on Alpine Linux and we need to use the stable version available there
97-
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl'), eq(parameters.archType, 'x64')) }}:
96+
# We need to use the stable version available on Alpine Linux
97+
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubgroup, '_musl')) }}:
9898
- name: compilerArg
9999
value: ''
100100
# AppleClang has different version scheme, so we let compiler introspection pick up the available clang from PATH

eng/pipelines/coreclr/templates/helix-queues-setup.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
- ${{ if eq(variables['System.TeamProject'], 'public') }}:
7979
- (Alpine.314.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20210910135833-1848e19
8080
- ${{ if eq(variables['System.TeamProject'], 'internal') }}:
81-
- (Alpine.314.Amd64)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20210910135833-1848e19
81+
- (Alpine.314.Amd64)ubuntu.1804[email protected]/dotnet-buildtools/prereqs:alpine-3.14-helix-amd64-20210910135833-1848e19
8282

8383
# Linux musl arm32
8484
- ${{ if eq(parameters.platform, 'Linux_musl_arm') }}:
@@ -110,7 +110,7 @@ jobs:
110110
- (Debian.10.Amd64)[email protected]/dotnet-buildtools/prereqs:debian-10-helix-amd64-20220810215022-f344011
111111
- (Debian.11.Amd64)[email protected]/dotnet-buildtools/prereqs:debian-11-helix-amd64-20220810215032-f344011
112112
- Ubuntu.1804.Amd64
113-
- (Centos.8.Amd64)Ubuntu.1604[email protected]/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759
113+
- (Centos.8.Amd64)Ubuntu.1804[email protected]/dotnet-buildtools/prereqs:centos-8-helix-20201229003624-c1bf759
114114
- (Fedora.34.Amd64)[email protected]/dotnet-buildtools/prereqs:fedora-34-helix-20220809205730-e7e8d1c
115115
- RedHat.7.Amd64
116116

eng/pipelines/installer/jobs/build-job.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -200,34 +200,24 @@ jobs:
200200
value: ${{ eq(parameters.osSubgroup, '') }}
201201

202202
- ${{ if and(eq(parameters.osSubgroup, '_musl'), eq(parameters.osGroup, 'Linux')) }}:
203-
# Set output RID manually: musl isn't properly detected. Make sure to also convert linux to
204-
# lowercase for RID format. (Detection normally converts, but we're preventing it.)
205-
- name: OutputRidArg
206-
value: /p:OutputRid=linux-musl-${{ parameters.archType }}
207-
- name: RuntimeOSArg
208-
value: /p:RuntimeOS=linux-musl
209203
- name: _PortableBuild
210204
value: true
211205

206+
- ${{ if eq(parameters.crossBuild, true) }}:
207+
- name: ArchArg
208+
value: -arch ${{ parameters.archType }}
209+
212210
- name: BaseJobBuildCommand
213211
value: >-
214212
$(Build.SourcesDirectory)/build.sh -subset host+packs -ci
215213
$(BuildAction)
214+
$(ArchArg)
216215
/p:CrossBuild=${{ parameters.crossBuild }}
217216
/p:PortableBuild=$(_PortableBuild)
218217
/p:SkipTests=$(SkipTests)
219218
$(pgoInstrumentArg)
220219
$(LiveOverridePathArgs)
221220
$(CommonMSBuildArgs)
222-
$(OutputRidArg)
223-
$(RuntimeOSArg)
224-
225-
- name: PublishArguments
226-
value: >-
227-
/p:PortableBuild=$(_PortableBuild)
228-
$(CommonMSBuildArgs)
229-
$(OutputRidArg)
230-
/bl:msbuild.publish.binlog
231221
232222
- name: installersSubsetArg
233223
value: --subset packs.installers

eng/pipelines/libraries/base-job.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ jobs:
5353

5454
- _msbuildCommonParameters: ''
5555
# rename this variable, due to collision with build-native.proj
56-
- _runtimeOSArg: ''
5756
- _osArg: ''
5857
- _finalFrameworkArg: ''
5958
- _testModeArg: ''
@@ -71,12 +70,6 @@ jobs:
7170
- ${{ if eq(parameters.crossBuild, true) }}:
7271
- _crossBuildPropertyArg: /p:CrossBuild=true
7372

74-
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, '_musl')) }}:
75-
- _runtimeOSArg: /p:RuntimeOS=linux-musl
76-
77-
- ${{ if and(eq(parameters.osGroup, 'Linux'), eq(parameters.osSubGroup, ''), eq(parameters.archType, 'arm')) }}:
78-
- _runtimeOSArg: /p:RuntimeOS=ubuntu.16.04
79-
8073
# force a value for OS when cross-building
8174
- ${{ if in(parameters.osGroup, 'Browser', 'iOS', 'tvOS', 'Android', 'FreeBSD') }}:
8275
- _osArg: -os ${{ parameters.osGroup }}
@@ -111,15 +104,10 @@ jobs:
111104
- ${{ if ne(parameters.testDisplayName, '') }}:
112105
- _testRunNamePrefixSuffix: ${{ parameters.testDisplayName }}
113106

114-
# Windows variables
115-
- ${{ if eq(parameters.osGroup, 'windows') }}:
116-
- _runtimeOSArg: /p:RuntimeOS=win10
117-
118-
# Non-Windows variables
119107
- ${{ if ne(parameters.osGroup, 'windows') }}:
120108
- _buildScript: ./$(_buildScriptFileName)$(scriptExt)
121109

122-
- _buildArguments: $(_runtimeConfigurationArg) -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_testModeArg) $(_testScopeArg) $(_osArg) $(_runtimeOSArg) $(_msbuildCommonParameters) $(_runtimeArtifactsPathArg) $(_crossBuildPropertyArg)
110+
- _buildArguments: $(_runtimeConfigurationArg) -configuration ${{ parameters.buildConfig }} -ci -arch ${{ parameters.archType }} $(_finalFrameworkArg) $(_testModeArg) $(_testScopeArg) $(_osArg) $(_msbuildCommonParameters) $(_runtimeArtifactsPathArg) $(_crossBuildPropertyArg)
123111
- ${{ parameters.variables }}
124112

125113
# we need to override this value to support build-coreclr-and-libraries-job.yml

eng/pipelines/libraries/helix-queues-setup.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ jobs:
7474
- (Fedora.34.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:fedora-34-helix-20220908220224-98605e8
7575
- Ubuntu.2204.Amd64.Open
7676
- (Debian.11.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:debian-11-helix-amd64-20220908132354-59ee6b3
77-
- (Mariner.1.0.Amd64.Open)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620
78-
- (openSUSE.15.2.Amd64.Open)ubuntu.1604[email protected]/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64-20220912173041-1d2766c
77+
- (Mariner.1.0.Amd64.Open)ubuntu.1804[email protected]/dotnet-buildtools/prereqs:cbl-mariner-1.0-helix-20210528192219-92bf620
78+
- (openSUSE.15.2.Amd64.Open)ubuntu.1804[email protected]/dotnet-buildtools/prereqs:opensuse-15.2-helix-amd64-20220912173041-1d2766c
7979
- ${{ if or(ne(parameters.jobParameters.isExtraPlatforms, true), eq(parameters.jobParameters.includeAllPlatforms, true)) }}:
80-
- (Centos.7.Amd64.Open)Ubuntu.1604[email protected]/dotnet-buildtools/prereqs:centos-7-mlnet-helix-20220601183719-dde38af
80+
- (Centos.7.Amd64.Open)Ubuntu.1804[email protected]/dotnet-buildtools/prereqs:centos-7-mlnet-helix-20220601183719-dde38af
8181
- RedHat.7.Amd64.Open
8282
- (Debian.10.Amd64.Open)[email protected]/dotnet-buildtools/prereqs:debian-10-helix-amd64-20220908132009-59ee6b3
8383
- Ubuntu.1804.Amd64.Open

0 commit comments

Comments
 (0)