Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .vsts-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,17 @@ resources:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-mlnet

- container: UbuntuContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-mlnet

- container: UbuntuCrossArmContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-cross-arm
- container: AzureLinuxCrossArmContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm
env:
LDFLAGS: -fuse-ld=lld

- container: UbuntuCrossArm64Container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-cross-arm64
- container: AzureLinuxCrossArm64Container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm64
env:
LDFLAGS: -fuse-ld=lld

jobs:
- template: /build/ci/job-template.yml
Expand All @@ -55,7 +59,7 @@ jobs:
name: Ubuntu_x64_cross_arm
rootfsDir: '/crossrootfs/arm'
buildScript: ./build.sh
container: UbuntuCrossArmContainer
container: AzureLinuxCrossArmContainer
customMatrixes:
Debug_Build:
_configuration: Debug
Expand All @@ -79,7 +83,7 @@ jobs:
name: Ubuntu_x64_cross_arm64
rootfsDir: '/crossrootfs/arm64'
buildScript: ./build.sh
container: UbuntuCrossArm64Container
container: AzureLinuxCrossArm64Container
customMatrixes:
Debug_Build:
_configuration: Debug
Expand Down
6 changes: 3 additions & 3 deletions build/.night-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ resources:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-mlnet

- container: UbuntuContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-mlnet

jobs:
- template: /build/ci/job-template.yml
Expand All @@ -46,7 +46,7 @@ jobs:
_includeBenchmarkData: true
nightlyBuild: true
pool:
vmImage: ubuntu-18.04
vmImage: ubuntu-22.04

- template: /build/ci/job-template.yml
parameters:
Expand All @@ -55,7 +55,7 @@ jobs:
container: UbuntuContainer
nightlyBuild: true
pool:
vmImage: ubuntu-18.04
vmImage: ubuntu-22.04

- template: /build/ci/job-template.yml
parameters:
Expand Down
4 changes: 2 additions & 2 deletions build/ci/job-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- script: |
$(Build.SourcesDirectory)/eng/install-dependencies.sh osx
displayName: Install MacOS build dependencies
- ${{ if and( eq(parameters.nightlyBuild, 'true'), eq(parameters.pool.vmImage, 'ubuntu-18.04')) }}:
- ${{ if and( eq(parameters.nightlyBuild, 'true'), eq(parameters.pool.vmImage, 'ubuntu-22.04')) }}:
- bash: echo "##vso[task.setvariable variable=LD_LIBRARY_PATH]$(nightlyBuildRunPath):$LD_LIBRARY_PATH"
displayName: Set LD_LIBRARY_PATH for Ubuntu and CentOS to locate Native shared library in current running path
- script: ${{ parameters.buildScript }} -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:Coverage=${{ parameters.codeCoverage }} $(testTargetFramework) /p:CreateHardLinksForCopyFilesToOutputDirectoryIfPossible=True $(hardLink)
Expand All @@ -82,7 +82,7 @@ jobs:
targetType: inline
script: cd packages;find . -type d -path "*/runtimes/linux-*" -exec rm -rv {} +;find . -type d -path "*/runtimes/win-*" -exec rm -rv {} +;cd ..
displayName: Clean up non-MacOS runtime folders of NuGet Packages to save disk space
- ${{ if eq(parameters.pool.vmImage, 'ubuntu-18.04') }}:
- ${{ if eq(parameters.pool.vmImage, 'ubuntu-22.04') }}:
- task: Bash@3
inputs:
targetType: inline
Expand Down
16 changes: 10 additions & 6 deletions build/vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,14 @@ extends:
containers:
CentosContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-stream8-mlnet
UbuntuCrossArmContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-cross-arm
UbuntuCrossArm64Container:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-cross-arm64
AzureLinuxCrossArmContainer:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm
env:
LDFLAGS: -fuse-ld=lld
AzureLinuxCrossArm64Container:
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm64
env:
LDFLAGS: -fuse-ld=lld
stages:
- stage: build
displayName: Build
Expand Down Expand Up @@ -103,7 +107,7 @@ extends:
name: $(DncEngInternalBuildPool)
image: $(LinuxImage)
os: linux
container: UbuntuCrossArmContainer
container: AzureLinuxCrossArmContainer
templateContext:
outputs:
- output: buildArtifacts
Expand All @@ -123,7 +127,7 @@ extends:
name: $(DncEngInternalBuildPool)
image: $(LinuxImage)
os: linux
container: UbuntuCrossArm64Container
container: AzureLinuxCrossArm64Container
templateContext:
outputs:
- output: buildArtifacts
Expand Down
23 changes: 23 additions & 0 deletions docs/building/unix-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,26 @@ export ROOTFS_DIR=<new rootfs location>
The `<target architecture>` is typically `arm` or `arm64`. Use an Ubuntu codename supported by `eng/common/cross/build-rootfs.sh`.

Linux cross-build jobs using `build/ci/job-template.yml` must pass the sysroot path through `rootfsDir` (for example, `/crossrootfs/arm64`). The template does not infer it from the agent image or job name.

### CI build containers

Ubuntu x64 validation and nightly builds use
`mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-22.04-mlnet`, which includes
Clang 14 and OpenMP development packages.

ARM and ARM64 CI builds use the same cross-build images as dotnet/runtime's
`release/8.0` branch:

- `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm`
- `mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net8.0-cross-arm64`

These images run build tools on Azure Linux 3.0 while targeting Ubuntu Xenial
sysroots at `/crossrootfs/arm` and `/crossrootfs/arm64`. The sysroots include the
target OpenMP packages. Keep `ROOTFS_DIR` set to the matching directory when
using these images, and set `LDFLAGS=-fuse-ld=lld` to use the bundled LLVM linker
instead of the host's architecture-specific GNU linker.

The official x64 native-package build retains its CentOS Stream 8 image to avoid
raising the native libraries' minimum system-library requirements. Updating a
build container must not silently change the compatibility baseline of shipped
native assets.
5 changes: 4 additions & 1 deletion src/Native/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ export __IntermediatesDir=$__IntermediatesDir
if command -v "clang-9" > /dev/null 2>&1; then
export CC="$(command -v clang-9)"
export CXX="$(command -v clang++-9)"
elif command -v "clang-14" > /dev/null 2>&1; then
export CC="$(command -v clang-14)"
export CXX="$(command -v clang++-14)"
elif command -v "clang-6.0" > /dev/null 2>&1; then
export CC="$(command -v clang-6.0)"
export CXX="$(command -v clang++-6.0)"
Expand All @@ -139,7 +142,7 @@ elif command -v clang > /dev/null 2>&1; then
export CXX="$(command -v clang++)"
else
echo "Unable to find Clang Compiler"
echo "Install clang-3.5 or clang3.6 or clang3.9"
echo "Install Clang with matching clang and clang++ executables, or a supported versioned pair (14, 9, 6.0, 3.5, 3.6, 3.9)."
exit 1
fi

Expand Down