mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Add support for aarch64 jetson bionic builds (#1844)
This commit is contained in:
committed by
Peter Johnson
parent
d787b5d609
commit
9afea33403
@@ -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
|
||||
|
||||
@@ -5,5 +5,5 @@ repositories {
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
compile "edu.wpi.first:native-utils:2020.0.5"
|
||||
compile "edu.wpi.first:native-utils:2020.0.6"
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import org.gradle.internal.os.OperatingSystem
|
||||
|
||||
nativeUtils.addWpiNativeUtils()
|
||||
nativeUtils.withRaspbian()
|
||||
nativeUtils.withBionic()
|
||||
nativeUtils {
|
||||
wpi {
|
||||
configureDependencies {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user