Skip to content

Commit

Permalink
Update linux build images (#5097)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikem8361 authored Dec 11, 2024
1 parent 70084ec commit 23e559c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 42 deletions.
13 changes: 7 additions & 6 deletions diagnostics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ extends:
parameters:
jobTemplate: ${{ variables.jobTemplate }}
osGroup: Linux
nativeBuildContainer: linux_x64
container: linux_x64
crossBuild: true
buildOnly: true
buildConfigs:
- configuration: Release
Expand All @@ -104,7 +105,7 @@ extends:
name: Linux_musl
osGroup: Linux
osSuffix: -musl
nativeBuildContainer: linux_musl_x64
container: linux_musl_x64
crossBuild: true
buildOnly: true
buildConfigs:
Expand Down Expand Up @@ -149,7 +150,7 @@ extends:
parameters:
jobTemplate: ${{ variables.jobTemplate }}
osGroup: Linux
nativeBuildContainer: linux_arm
container: linux_arm
crossBuild: true
buildOnly: true
buildConfigs:
Expand All @@ -161,7 +162,7 @@ extends:
parameters:
jobTemplate: ${{ variables.jobTemplate }}
osGroup: Linux
nativeBuildContainer: linux_arm64
container: linux_arm64
crossBuild: true
buildOnly: true
buildConfigs:
Expand All @@ -175,7 +176,7 @@ extends:
name: Linux_musl
osGroup: Linux
osSuffix: -musl
nativeBuildContainer: linux_musl_arm
container: linux_musl_arm
crossBuild: true
buildOnly: true
buildConfigs:
Expand All @@ -190,7 +191,7 @@ extends:
name: Linux_musl
osGroup: Linux
osSuffix: -musl
nativeBuildContainer: linux_musl_arm64
container: linux_musl_arm64
crossBuild: true
buildOnly: true
buildConfigs:
Expand Down
32 changes: 1 addition & 31 deletions eng/pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ parameters:
type: object
default: {}

# Optional: native build container resource name
- name: nativeBuildContainer
type: string
default: ''

# Optional: container resource name
- name: container
type: string
Expand Down Expand Up @@ -135,7 +130,6 @@ jobs:
- _PhaseName: ${{ coalesce(parameters.name, parameters.osGroup) }}_${{ config.architecture }}_${{ config.configuration }}
- _Pipeline_StreamDumpDir: $(Build.SourcesDirectory)/artifacts/tmp/${{ config.configuration }}/streams

- _ExtraBuildParams: ''
- _TestArgs: '-test'
- _Cross: ''

Expand Down Expand Up @@ -166,16 +160,6 @@ jobs:
- ${{ if eq(parameters.crossBuild, true) }}:
- _Cross: -cross

# If there is a native build container, build managed in the host vm/container and native in the nativeBuildContainer
- ${{ if ne(parameters.nativeBuildContainer, '') }}:
- _ExtraBuildParams: -skipnative

# TODO: remove this once we move to crossroot builds for all containers. We are currently blocked
# on mariner cross containers not supporting glibc versions supported in 6.0.
# Only add the cross build option if a combined build/test managed/native build (i.e. MacOS arm64)
- ${{ if eq(parameters.nativeBuildContainer, '') }}:
- _ExtraBuildParams: $(_Cross)

steps:
- ${{ if eq(parameters.testOnly, true) }}:
- ${{ if ne(parameters.osGroup, 'Linux') }}:
Expand All @@ -200,32 +184,18 @@ jobs:
-ci
-configuration ${{ config.configuration }}
-architecture ${{ config.architecture }}
$(_ExtraBuildParams)
$(_TestArgs)
$(_Cross)
$(_InternalInstallArgs)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
${{ if eq(parameters.testOnly, 'true') }}:
displayName: Test
${{ elseif eq(parameters.buildOnly, 'true') }}:
displayName: Build
${{ elseif ne(parameters.nativeBuildContainer, '') }}:
displayName: Build Managed
${{ else }}:
displayName: Build / Test
condition: succeeded()

- ${{ if ne(parameters.nativeBuildContainer, '') }}:
- script: $(_buildScript)
-ci
-configuration ${{ config.configuration }}
-architecture ${{ config.architecture }}
-skipmanaged
$(_Cross)
$(_InternalInstallArgs)
/p:OfficialBuildId=$(BUILD.BUILDNUMBER)
displayName: Build Native
target: ${{ parameters.nativeBuildContainer }}

- ${{ if eq(parameters.isCodeQLRun, 'true') }}:
- task: CodeQL3000Finalize@0
displayName: CodeQL Finalize
Expand Down
17 changes: 12 additions & 5 deletions eng/pipelines/pipeline-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,22 @@ extends:

containers:
linux_x64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-amd64
env:
ROOTFS_DIR: /crossrootfs/x64

linux_x86:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-x86
env:
ROOTFS_DIR: /crossrootfs/x86

linux_arm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm
env:
ROOTFS_DIR: /crossrootfs/arm

linux_arm64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm64
env:
ROOTFS_DIR: /crossrootfs/arm64

Expand All @@ -36,12 +43,12 @@ extends:
ROOTFS_DIR: /crossrootfs/x64

linux_musl_arm:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm-alpine
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm-alpine
env:
ROOTFS_DIR: /crossrootfs/arm

linux_musl_arm64:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64-alpine
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm64-alpine
env:
ROOTFS_DIR: /crossrootfs/arm64

Expand Down

0 comments on commit 23e559c

Please sign in to comment.