Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64 build/test/publish. #5860

Merged
merged 45 commits into from
Jul 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
862a2d6
Arm helix
michaelgsharp Jun 24, 2021
4fddca9
yml cross fixes.
michaelgsharp Jun 24, 2021
e14727e
yml cross fixes.
michaelgsharp Jun 24, 2021
39ec16f
yml cross fixes.
michaelgsharp Jun 24, 2021
dd91bbd
yml cross fixes.
michaelgsharp Jun 24, 2021
b443e92
yml cross testing
michaelgsharp Jun 25, 2021
a3b7cff
Adding docker again.
michaelgsharp Jun 25, 2021
7f9bcb8
queue changes.
michaelgsharp Jun 25, 2021
41ab843
queue changes.
michaelgsharp Jun 25, 2021
3d6a980
queue changes.
michaelgsharp Jun 25, 2021
a01ad0f
arm pre commands
michaelgsharp Jun 25, 2021
2a779f5
arm pre commands
michaelgsharp Jun 25, 2021
536f0e9
arm pre commands
michaelgsharp Jun 25, 2021
e030bc3
arm pre commands
michaelgsharp Jun 25, 2021
d24fedb
arm pre commands
michaelgsharp Jun 26, 2021
0199ffc
arm pre commands
michaelgsharp Jun 26, 2021
cc78720
arm pre commands
michaelgsharp Jun 26, 2021
dc0bbd5
Arm helix changes.
michaelgsharp Jun 26, 2021
0621729
Arm helix changes.
michaelgsharp Jun 26, 2021
5048931
Removing arm so PR can go.
michaelgsharp Jun 28, 2021
3951590
Merge branch 'arm-helix' of https://github.com/michaelgsharp/machinel…
michaelgsharp Jun 28, 2021
2b28a06
FIxes from PR comments. Adding arm32 back.
michaelgsharp Jun 29, 2021
ea709a9
Fix using statements.
michaelgsharp Jun 29, 2021
bce6e7c
Namespace fixes.
michaelgsharp Jun 29, 2021
2d4a6c8
Added missed cmake code.
michaelgsharp Jun 29, 2021
84e16bf
Cmake fixes
michaelgsharp Jun 30, 2021
0536263
M1 Additions
michaelgsharp Jul 6, 2021
1c141c6
Changes from PR comments.
michaelgsharp Jul 7, 2021
5691342
x86x64 fact attribute.
michaelgsharp Jul 8, 2021
18230e4
Fixes from PR comments.
michaelgsharp Jul 8, 2021
d4db41c
Fixes from PR comments.
michaelgsharp Jul 8, 2021
824ed41
Fixes for Centos 7 fact and Featurizers fact.
michaelgsharp Jul 8, 2021
a5a0f0e
Code Analysis version and Not fail on M1.
michaelgsharp Jul 9, 2021
1136c80
disable m1 tests in prs.
michaelgsharp Jul 9, 2021
f84ccf3
disable m1 tests in prs.
michaelgsharp Jul 9, 2021
a527fae
disable m1 tests in prs.
michaelgsharp Jul 9, 2021
1ef3b4e
disable m1 tests in prs.
michaelgsharp Jul 9, 2021
d27fbc9
Change to full url
michaelgsharp Jul 9, 2021
43ce8d3
Look in osx-arm64 folder for baseline files.
michaelgsharp Jul 9, 2021
a9ad414
Fixed -mthumb flag issue.
michaelgsharp Jul 9, 2021
2491428
Fixes from PR comments.
michaelgsharp Jul 9, 2021
ff7e3ea
Fixes from PR comments.
michaelgsharp Jul 12, 2021
d262be4
Final test fixed.
michaelgsharp Jul 12, 2021
e720e2a
Final Fixes from PR comments.
michaelgsharp Jul 12, 2021
591a183
Merge branch 'arm-helix' of https://github.com/michaelgsharp/machinel…
michaelgsharp Jul 12, 2021
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
72 changes: 72 additions & 0 deletions .vsts-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,57 @@ resources:
- container: UbuntuContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-mlnet-20200515184230-2c829e8

- container: UbuntuCrossArmContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-cross-arm-20210512124625-2e59a5f

- container: UbuntuCrossArm64Container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-cross-arm64-20210512124625-2e59a5f

jobs:
- template: /build/ci/job-template.yml
parameters:
architecture: arm
name: Ubuntu_x64_cross_arm_NetCoreApp31
buildScript: ./build.sh
container: UbuntuCrossArmContainer
customMatrixes:
Debug_Build:
_configuration: Debug-netcoreapp3_1
_config_short: DI
_includeBenchmarkData: false
_targetFramework: netcoreapp3.1
Release_Build:
_configuration: Release-netcoreapp3_1
_config_short: RI
_includeBenchmarkData: true
_targetFramework: netcoreapp3.1
innerLoop: true
pool:
name: Hosted Ubuntu 1604
helixQueue: [email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-20210531091521-97d8652

- template: /build/ci/job-template.yml
parameters:
architecture: arm64
name: Ubuntu_x64_cross_arm64_NetCoreApp31
buildScript: ./build.sh
container: UbuntuCrossArm64Container
customMatrixes:
Debug_Build:
_configuration: Debug-netcoreapp3_1
_config_short: DI
_includeBenchmarkData: false
_targetFramework: netcoreapp3.1
Release_Build:
_configuration: Release-netcoreapp3_1
_config_short: RI
_includeBenchmarkData: true
_targetFramework: netcoreapp3.1
innerLoop: true
pool:
name: Hosted Ubuntu 1604
helixQueue: [email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-20210531091519-97d8652

- template: /build/ci/job-template.yml
parameters:
name: Centos_x64_NetCoreApp31
Expand Down Expand Up @@ -51,6 +101,28 @@ jobs:
name: Hosted macOS
helixQueue: OSX.1015.Amd64.Open

- template: /build/ci/job-template.yml
parameters:
architecture: arm64
name: MacOS_cross_arm64_NetCoreApp21
buildScript: ./build.sh
customMatrixes:
Debug_Build:
_configuration: Debug-netcoreapp3_1
_config_short: DI
_includeBenchmarkData: false
_targetFramework: netcoreapp3.1
Release_Build:
_configuration: Release-netcoreapp3_1
_config_short: RI
_includeBenchmarkData: true
_targetFramework: netcoreapp3.1
innerLoop: true
pool:
vmImage: macOS-10.15
testTargetFramework: net6.0
helixQueue: OSX.1100.Arm64.Open

- template: /build/ci/job-template.yml
parameters:
name: Windows_x64_NetCoreApp31
Expand Down
24 changes: 20 additions & 4 deletions build/ci/job-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ parameters:
container: ''
useVSTestTask: false
helixQueue: ''
testTargetFramework: ''

jobs:
- job: ${{ parameters.name }}
Expand All @@ -36,6 +37,12 @@ jobs:
spaceValue: ' '
${{ if eq(parameters.buildScript, './build.sh') }}:
spaceValue: '%20'
${{ if and(eq(parameters.pool.name, 'Hosted Ubuntu 1604'), contains(parameters.name, 'cross')) }}:
ROOTFS_DIR: '/crossrootfs/${{ parameters.architecture }}'
${{ if eq(parameters.testTargetFramework, '') }}:
testTargetFramework: ''
${{ if ne(parameters.testTargetFramework, '') }}:
testTargetFramework: '/p:TestTargetFramework=${{ parameters.testTargetFramework }}'
strategy:
matrix:
${{ if eq(parameters.customMatrixes, '') }}:
Expand Down Expand Up @@ -64,13 +71,17 @@ jobs:
displayName: MacOS Homebrew bug Workaround
continueOnError: true
# Extra MacOS step required to install OS-specific dependencies
- ${{ if eq(parameters.pool.name, 'Hosted macOS') }}:
- ${{ if and(eq(parameters.pool.name, 'Hosted macOS'), not(contains(parameters.name, 'cross'))) }}:
- script: brew update && brew install mono-libgdiplus && brew install $(Build.SourcesDirectory)/build/libomp.rb --build-from-source --formula && brew link libomp --force
displayName: Install MacOS build dependencies
# Extra Apple MacOS step required to install OS-specific dependencies
- ${{ if and(contains(parameters.pool.vmImage, 'macOS'), contains(parameters.name, 'cross')) }}:
- script: brew update && brew install mono-libgdiplus && brew install libomp && brew link libomp --force
displayName: Install MacOS ARM build dependencies
- ${{ if and( eq(parameters.nightlyBuild, 'true'), eq(parameters.pool.name, 'Hosted Ubuntu 1604')) }}:
- 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:TestArchitectures=${{ parameters.architecture }} /p:Coverage=${{ parameters.codeCoverage }}
- script: ${{ parameters.buildScript }} -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} /p:Coverage=${{ parameters.codeCoverage }} $(testTargetFramework)
displayName: Build
- ${{ if eq(parameters.pool.name, 'Hosted macOS') }}:
- task: Bash@3
Expand Down Expand Up @@ -144,7 +155,7 @@ jobs:
publishRunAttachments: true
- ${{ if eq(parameters.innerLoop, 'true') }}:
- ${{ if eq(parameters.codeCoverage, True) }}:
- script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-notrait$(spaceValue)Category=SkipInCI' /p:Coverage=${{ parameters.codeCoverage }}
- script: ${{ parameters.buildScript }} /p:Build=false -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} -test -integrationTest -ci /p:TestRunnerAdditionalArguments='-notrait$(spaceValue)Category=SkipInCI' /p:Coverage=${{ parameters.codeCoverage }} $(testTargetFramework)
displayName: Run CI Tests.
- ${{ if eq(parameters.codeCoverage, False) }}:
- template: /build/ci/send-to-helix.yml
Expand All @@ -155,9 +166,14 @@ jobs:
${{ if eq(parameters.buildScript, 'build.cmd') }}:
MsBuildScript: 'powershell $(Build.SourcesDirectory)/eng/common/msbuild.ps1'
WarnAsError: '-warnAsError 0'
TestTargetFramework: '$(testTargetFramework)'
${{ if eq(parameters.buildScript, './build.sh') }}:
MsBuildScript: '$(Build.SourcesDirectory)/eng/common/msbuild.sh'
WarnAsError: '--warnAsError false'
TestTargetFramework: '$(testTargetFramework)'
# Don't have M1 failures fail the build for now.
${{ if and(contains(parameters.pool.vmImage, 'macOS'), contains(parameters.name, 'cross')) }}:
continueOnError: true
- script: $(dotnetPath) msbuild -restore build/Codecoverage.proj
displayName: Upload coverage to codecov.io
condition: and(succeeded(), eq(${{ parameters.codeCoverage }}, True))
Expand Down Expand Up @@ -221,5 +237,5 @@ jobs:
script: Get-ChildItem -Path '.\artifacts\bin' -Recurse | Where-Object {$_.FullName -like "*runtimes*"} | Remove-Item -Recurse -Confirm:$false -Force
displayName: Clean up runtime folder for package (Unix)
- ${{ if eq(parameters.nightlyBuild, 'false') }}:
- script: ${{ parameters.buildScript }} /p:Build=false -pack -ci -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }}
- script: ${{ parameters.buildScript }} /p:Build=false -pack -ci -configuration $(_configuration) /p:TargetArchitecture=${{ parameters.architecture }} /p:TestArchitectures=${{ parameters.architecture }} $(testTargetFramework)
displayName: Build Packages
4 changes: 4 additions & 0 deletions build/ci/send-to-helix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ parameters:
Architecture: 'x64'
MsBuildScript: ''
WarnAsError: ''
TestTargetFramework: ''
HelixConfiguration: '' # optional -- additional property attached to a job
IncludeDotNetCli: true # optional -- true will download a version of the .NET CLI onto the Helix machine as a correlation payload; requires DotNetCliPackageType and DotNetCliVersion
EnableXUnitReporter: true # optional -- true enables XUnit result reporting to Mission Control
Expand Down Expand Up @@ -38,9 +39,12 @@ steps:
/p:WaitForWorkItemCompletion=${{ parameters.WaitForWorkItemCompletion }}
/p:HelixBaseUri=${{ parameters.HelixBaseUri }}
${{ parameters.WarnAsError }}
${{ parameters.TestTargetFramework }}
displayName: ${{ parameters.DisplayNamePrefix }}
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
Creator: ${{ parameters.Creator }}
HelixTargetQueues: ${{ parameters.HelixTargetQueues }}
continueOnError: ${{ parameters.continueOnError }}
${{ if and(contains(parameters.HelixTargetQueues, 'OSX.1100.Arm64.Open'), in(variables['Build.Reason'], 'PullRequest')) }}:
enabled: False
113 changes: 108 additions & 5 deletions build/vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ resources:
- container: CentosContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-mlnet-8bba86b-20190314145033

- container: UbuntuCrossArmContainer
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-cross-arm-20210512124625-2e59a5f

- container: UbuntuCrossArm64Container
image: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-cross-arm64-20210512124625-2e59a5f

phases:
################################################################################
- phase: Linux
- phase: Linux_x64
################################################################################
variables:
BuildConfig: Release
Expand All @@ -29,7 +35,67 @@ phases:
displayName: build redist
# Only build native assets to avoid conflicts.
- script: ./build.sh -configuration $(BuildConfig) -projects $(Build.SourcesDirectory)/src/Native/Native.proj /p:TargetArchitecture=x64 /p:CopyPackageAssets=true
displayName: Build
displayName: Build Native Assets

- task: PublishBuildArtifacts@1
displayName: Publish Linux package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets
artifactName: PackageAssets
artifactType: container

################################################################################
- phase: Linux_arm
################################################################################
variables:
BuildConfig: Release-netcoreapp3_1
OfficialBuildId: $(BUILD.BUILDNUMBER)
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_MULTILEVEL_LOOKUP: 0
queue:
name: DotNet-Build
demands:
- agent.os -equals linux
container: UbuntuCrossArmContainer
steps:
- script: ./restore.sh
displayName: restore all projects
- script: ./build.sh -configuration $(BuildConfig) /p:CopyPackageAssets=true /p:SkipRIDAgnosticAssets=true -projects $(Build.SourcesDirectory)/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj
displayName: build redist
# Only build native assets to avoid conflicts.
- script: ./build.sh -configuration $(BuildConfig) -projects $(Build.SourcesDirectory)/src/Native/Native.proj /p:TargetArchitecture=arm /p:CopyPackageAssets=true
displayName: Build Native Assets

- task: PublishBuildArtifacts@1
displayName: Publish Linux package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets
artifactName: PackageAssets
artifactType: container

################################################################################
- phase: Linux_arm64
################################################################################
variables:
BuildConfig: Release-netcoreapp3_1
OfficialBuildId: $(BUILD.BUILDNUMBER)
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_MULTILEVEL_LOOKUP: 0
queue:
name: DotNet-Build
demands:
- agent.os -equals linux
container: UbuntuCrossArm64Container
steps:
- script: ./restore.sh
displayName: restore all projects
- script: ./build.sh -configuration $(BuildConfig) /p:CopyPackageAssets=true /p:SkipRIDAgnosticAssets=true -projects $(Build.SourcesDirectory)/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj
displayName: build redist
# Only build native assets to avoid conflicts.
- script: ./build.sh -configuration $(BuildConfig) -projects $(Build.SourcesDirectory)/src/Native/Native.proj /p:TargetArchitecture=arm64 /p:CopyPackageAssets=true
displayName: Build Native Assets

- task: PublishBuildArtifacts@1
displayName: Publish Linux package assets
Expand Down Expand Up @@ -63,7 +129,41 @@ phases:
displayName: build redist
# Only build native assets to avoid conflicts.
- script: ./build.sh -projects $(Build.SourcesDirectory)/src/Native/Native.proj -configuration $(BuildConfig) /p:TargetArchitecture=x64 /p:CopyPackageAssets=true
displayName: Build
displayName: Build Native Assets

- task: PublishBuildArtifacts@1
displayName: Publish macOS package assets
inputs:
pathToPublish: $(Build.SourcesDirectory)/artifacts/pkgassets
artifactName: PackageAssets
artifactType: container

################################################################################
- phase: MacOS_Apple_Silicon
################################################################################
variables:
BuildConfig: Release-netcoreapp3_1
OfficialBuildId: $(BUILD.BUILDNUMBER)
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_MULTILEVEL_LOOKUP: 0
queue:
vmImage: macOS-10.15
steps:
# Work around MacOS Homebrew image/environment bug: https://github.com/actions/virtual-environments/issues/2322#issuecomment-749211076
- script: |
rm -rf /usr/local/bin/2to3
displayName: MacOS Homebrew bug Workaround
continueOnError: true
- script: brew update && brew unlink [email protected] && brew install mono-libgdiplus && brew install libomp && brew link libomp --force
displayName: Install build dependencies
- script: ./restore.sh
displayName: restore all projects
- script: ./build.sh -configuration $(BuildConfig) /p:CopyPackageAssets=true /p:SkipRIDAgnosticAssets=true -projects $(Build.SourcesDirectory)/src/Redist/Microsoft.ML.DnnImageFeaturizer.ModelRedist/Microsoft.ML.DnnImageFeaturizer.ModelRedist.proj
displayName: build redist
# Only build native assets to avoid conflicts.
- script: ./build.sh -projects $(Build.SourcesDirectory)/src/Native/Native.proj -configuration $(BuildConfig) /p:TargetArchitecture=arm64 /p:CopyPackageAssets=true
displayName: Build Native Assets

- task: PublishBuildArtifacts@1
displayName: Publish macOS package assets
Expand Down Expand Up @@ -107,7 +207,7 @@ phases:
displayName: build redist
# Only build native assets to avoid conflicts.
- script: ./build.cmd -projects $(Build.SourcesDirectory)/src/Native/Native.proj -configuration $(BuildConfig) /p:TargetArchitecture=x86 /p:CopyPackageAssets=true
displayName: Build
displayName: Build Native Assets

- script: ./sign.cmd -configuration $(BuildConfig) /p:TargetArchitecture=x86 /p:SignBinaries=true
displayName: sign binaries
Expand Down Expand Up @@ -181,10 +281,13 @@ phases:
- phase: Package
################################################################################
dependsOn:
- Linux
- Linux_x64
- Linux_arm
- Linux_arm64
- MacOS
- Windows_x86
- Windows_x64
- MacOS_Apple_Silicon
variables:
BuildConfig: Release
OfficialBuildId: $(BUILD.BUILDNUMBER)
Expand Down
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<MicrosoftBuildTasksCoreVersion>15.7.179</MicrosoftBuildTasksCoreVersion>
<MicrosoftBuildUtilitiesCoreVersion>15.7.179</MicrosoftBuildUtilitiesCoreVersion>
<MicrosoftCodeAnalysisAnalyzersVersion>2.6.3</MicrosoftCodeAnalysisAnalyzersVersion>
<MicrosoftCodeAnalysisCSharpVersion>2.9.0</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisCSharpVersion>3.7.0</MicrosoftCodeAnalysisCSharpVersion>
<MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>3.4.0</MsbuildTaskMicrosoftCodeAnalysisCSharpVersion>
<MicrosoftIdentityModelClientsActiveDirectoryVersion>3.19.8</MicrosoftIdentityModelClientsActiveDirectoryVersion>
<MicrosoftRestClientRuntimeVersion>2.3.13</MicrosoftRestClientRuntimeVersion>
Expand Down
Loading