diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2da6cec408..063432218c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,6 +9,8 @@ resources: image: wpilib/roborio-cross-ubuntu:2020-18.04 - container: raspbian image: wpilib/raspbian-cross-ubuntu:10-18.04 + - container: aarch64 + image: wpilib/aarch64-cross-ubuntu:bionic-18.04 - container: ubuntu image: wpilib/ubuntu-base:18.04 @@ -92,6 +94,40 @@ stages: artifactName: 'Raspbian' targetPath: 'build/allOutputs' + - job: Linux_Aarch64 + pool: + vmImage: 'Ubuntu 16.04' + + container: aarch64 + + steps: + - task: Gradle@2 + condition: and(succeeded(), not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v'))) + inputs: + workingDirectory: '' + gradleWrapperFile: 'gradlew' + gradleOptions: '-Xmx3072m' + publishJUnitResults: true + testResultsFiles: '**/TEST-*.xml' + tasks: 'build' + options: '-Ponlylinuxaarch64bionic -PbuildServer' + + - task: Gradle@2 + condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) + inputs: + workingDirectory: '' + gradleWrapperFile: 'gradlew' + gradleOptions: '-Xmx3072m' + publishJUnitResults: true + testResultsFiles: '**/TEST-*.xml' + tasks: 'build' + options: '-Ponlylinuxaarch64bionic -PreleaseMode -PbuildServer' + + - task: PublishPipelineArtifact@0 + inputs: + artifactName: 'Aarch64' + targetPath: 'build/allOutputs' + - job: Linux pool: vmImage: 'Ubuntu 16.04' @@ -312,6 +348,10 @@ stages: inputs: artifactName: 'Athena' targetPath: 'build-tools/combiner/products/build/allOutputs' + - task: DownloadPipelineArtifact@0 + inputs: + artifactName: 'Aarch64' + targetPath: 'build-tools/combiner/products/build/allOutputs' # PR Builds - task: Gradle@2 diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index cefc3bbd86..e8b6c02105 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -5,5 +5,5 @@ repositories { } } dependencies { - compile "edu.wpi.first:native-utils:2020.0.5" + compile "edu.wpi.first:native-utils:2020.0.6" } diff --git a/shared/config.gradle b/shared/config.gradle index a8b5c7e5a4..986ed48664 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -2,6 +2,7 @@ import org.gradle.internal.os.OperatingSystem nativeUtils.addWpiNativeUtils() nativeUtils.withRaspbian() +nativeUtils.withBionic() nativeUtils { wpi { configureDependencies { diff --git a/shared/java/javacommon.gradle b/shared/java/javacommon.gradle index 05e3948841..4ade36940f 100644 --- a/shared/java/javacommon.gradle +++ b/shared/java/javacommon.gradle @@ -82,7 +82,7 @@ test { finalizedBy jacocoTestReport } -if (project.hasProperty('onlylinuxathena') || project.hasProperty('onlylinuxraspbian')) { +if (project.hasProperty('onlylinuxathena') || project.hasProperty('onlylinuxraspbian') || project.hasProperty('onlylinuxaarch64bionic')) { test.enabled = false } diff --git a/shared/plugins/setupBuild.gradle b/shared/plugins/setupBuild.gradle index e7b340c878..4feb8a973d 100644 --- a/shared/plugins/setupBuild.gradle +++ b/shared/plugins/setupBuild.gradle @@ -57,7 +57,7 @@ if (!project.hasProperty('onlylinuxathena')) { } } binaries.all { - if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian')) { + if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian') && !project.hasProperty('onlylinuxaarch64bionic')) { project(':hal').addHalDependency(it, 'shared') lib library: pluginName if (project.hasProperty('includeNtCore')) { @@ -78,7 +78,7 @@ if (!project.hasProperty('onlylinuxathena')) { model { tasks { def c = $.components - if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian')) { + if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian') && !project.hasProperty('onlylinuxaarch64bionic')) { project.tasks.create('runCpp', Exec) { group = 'WPILib' description = "Run the ${pluginName}Dev executable" diff --git a/simulation/halsim_adx_gyro_accelerometer/build.gradle b/simulation/halsim_adx_gyro_accelerometer/build.gradle index fac7d16605..baea2d7d08 100644 --- a/simulation/halsim_adx_gyro_accelerometer/build.gradle +++ b/simulation/halsim_adx_gyro_accelerometer/build.gradle @@ -127,7 +127,7 @@ if (!project.hasProperty('onlylinuxathena')) { } binaries { withType(GoogleTestTestSuiteBinarySpec) { - if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian')) { + if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian') && !project.hasProperty('onlylinuxaarch64bionic')) { lib project: ':ntcore', library: 'ntcore', linkage: 'shared' lib project: ':cscore', library: 'cscore', linkage: 'shared' project(':hal').addHalDependency(it, 'shared') @@ -148,7 +148,7 @@ if (!project.hasProperty('onlylinuxathena')) { model { testSuites { - if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian')) { + if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian') && !project.hasProperty('onlylinuxaarch64bionic')) { "${nativeName}Test"(GoogleTestTestSuiteSpec) { for(NativeComponentSpec c : $.components) { if (c.name == nativeName) { diff --git a/simulation/halsim_ds_socket/build.gradle b/simulation/halsim_ds_socket/build.gradle index 98c5fe7ccb..46e48f4018 100644 --- a/simulation/halsim_ds_socket/build.gradle +++ b/simulation/halsim_ds_socket/build.gradle @@ -21,7 +21,7 @@ apply from: "${rootDir}/shared/plugins/setupBuild.gradle" model { testSuites { def comps = $.components - if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian')) { + if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian') && !project.hasProperty('onlylinuxaarch64bionic')) { "${pluginName}Test"(GoogleTestTestSuiteSpec) { for(NativeComponentSpec c : comps) { if (c.name == pluginName) { diff --git a/simulation/lowfi_simulation/build.gradle b/simulation/lowfi_simulation/build.gradle index 3665303862..fb9f0de867 100644 --- a/simulation/lowfi_simulation/build.gradle +++ b/simulation/lowfi_simulation/build.gradle @@ -151,7 +151,7 @@ if (!project.hasProperty('onlylinuxathena')) { model { testSuites { - if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian')) { + if (!project.hasProperty('onlylinuxathena') && !project.hasProperty('onlylinuxraspbian') && !project.hasProperty('onlylinuxaarch64bionic')) { "${nativeName}Test"(GoogleTestTestSuiteSpec) { for(NativeComponentSpec c : $.components) { if (c.name == nativeName) { diff --git a/wpiutil/src/main/java/edu/wpi/first/wpiutil/RuntimeDetector.java b/wpiutil/src/main/java/edu/wpi/first/wpiutil/RuntimeDetector.java index 17070a6e4d..553529b072 100644 --- a/wpiutil/src/main/java/edu/wpi/first/wpiutil/RuntimeDetector.java +++ b/wpiutil/src/main/java/edu/wpi/first/wpiutil/RuntimeDetector.java @@ -55,6 +55,8 @@ public final class RuntimeDetector { filePath = "/linux/athena/"; } else if (isRaspbian()) { filePath = "/linux/raspbian/"; + } else if (isAarch64Bionic()) { + filePath = "/linux/aarch64bionic/"; } else { filePath = "/linux/nativearm/"; } @@ -126,6 +128,14 @@ public final class RuntimeDetector { } } + /** check if os is bionic aarch64. + * + * @return if os is bionic aarch64 + */ + public static boolean isAarch64Bionic() { + return false; + } + public static boolean isLinux() { return System.getProperty("os.name").startsWith("Linux"); }