Skip to content

Commit

Permalink
Add support for Linux arm64 (#154)
Browse files Browse the repository at this point in the history
* Add support for Linux arm64

* Add blank container

* Add container for Linux arm64

* Update vendordep

* Fix container

* Fix

* Another fix

* Test

* Test

* Remove toolchain install

* Update versions

* Remove println

* Update vendordep JSON

* Add Python dependency install
  • Loading branch information
jwbonner authored Jan 9, 2025
1 parent 4dd43f9 commit 43a7c20
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 21 deletions.
48 changes: 32 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: "Upload local repo"
uses: actions/upload-artifact@v4
with:
name: maven_Athena
name: maven_linuxathena
path: akit/build/repos/releases
- name: "Generate template projects"
working-directory: template_projects
Expand Down Expand Up @@ -132,27 +132,37 @@ jobs:
strategy:
matrix:
include:
- name: "Linux"
- name: "Linux (x64)"
runner-image: ubuntu-22.04
classifier: "linuxx86-64"
container: ""
- name: "Linux (arm64)"
runner-image: ubuntu-22.04
classifier: "linuxarm64"
container: wpilib/aarch64-cross-ubuntu:bookworm-22.04
- name: "macOS"
runner-image: macos-latest
classifier: "osxuniversal"
container: ""
- name: "Windows"
runner-image: windows-latest
classifier: "windowsx86-64"
container: ""
name: "Build for ${{ matrix.name }}"
runs-on: ${{ matrix.runner-image }}
container: ${{ matrix.container }}
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Setup Java"
uses: actions/setup-java@v3
if: matrix.classifier != 'linuxarm64'
with:
distribution: "temurin"
java-version: "17"
- name: "Setup Python"
uses: actions/setup-python@v5
if: matrix.classifier != 'linuxarm64'
with:
python-version: "3.13"
- name: "Install Python dependencies"
Expand All @@ -176,7 +186,7 @@ jobs:
- name: "Upload local repo"
uses: actions/upload-artifact@v4
with:
name: maven_${{ matrix.name }}
name: maven_${{ matrix.classifier }}
path: akit/build/repos/releases

combine:
Expand All @@ -187,29 +197,35 @@ jobs:
- name: "Download Athena"
uses: actions/download-artifact@v4
with:
name: maven_Athena
path: maven_Athena
- name: "Download Linux"
name: maven_linuxathena
path: maven_linuxathena
- name: "Download Linux (x64)"
uses: actions/download-artifact@v4
with:
name: maven_linuxx86-64
path: maven_linuxx86-64
- name: "Download Linux (arm64)"
uses: actions/download-artifact@v4
with:
name: maven_Linux
path: maven_Linux
name: maven_linuxarm64
path: maven_linuxarm64
- name: "Download macOS"
uses: actions/download-artifact@v4
with:
name: maven_macOS
path: maven_macOS
name: maven_osxuniversal
path: maven_osxuniversal
- name: "Download Windows"
uses: actions/download-artifact@v4
with:
name: maven_Windows
path: maven_Windows
name: maven_windowsx86-64
path: maven_windowsx86-64
- name: "Combine"
run: |
rsync -a maven_Athena/* maven_offline
rsync -a maven_macOS/* maven_offline
rsync -a maven_Linux/* maven_offline
rsync -a maven_Windows/* maven_offline
rsync -a maven_linuxathena/* maven_offline
rsync -a maven_linuxx86-64/* maven_offline
rsync -a maven_linuxarm64/* maven_offline
rsync -a maven_osxuniversal/* maven_offline
rsync -a maven_windowsx86-64/* maven_offline
zip -r maven_offline.zip maven_offline
- name: "Upload artifact"
uses: actions/upload-artifact@v4
Expand Down
5 changes: 3 additions & 2 deletions akit/AdvantageKit.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
"isJar": false,
"validPlatforms": [
"linuxathena",
"windowsx86-64",
"linuxx86-64",
"osxuniversal"
"linuxarm64",
"osxuniversal",
"windowsx86-64"
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions akit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ plugins {
id("cpp")
id("java")
id("google-test")
id("edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin") version "2020.2"
id("edu.wpi.first.NativeUtils") version "2025.3.0"
id("edu.wpi.first.wpilib.repositories.WPILibRepositoriesPlugin") version "2025.0"
id("edu.wpi.first.NativeUtils") version "2025.9.0"
id("edu.wpi.first.GradleJni") version "1.1.0"
id("edu.wpi.first.GradleVsCode") version "2.1.0"
}
Expand Down
1 change: 0 additions & 1 deletion akit/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ publish.dependsOn build
model {
publishing {
def wpilibioTaskList = createComponentZipTasks($.components, ['wpilibio'], wpilibioZipBaseName, Zip, project, includeStandardZipFormat)
println(wpilibioTaskList)
def skipJava = project.hasProperty("skipJava")
publications {
wpilibio(MavenPublication) {
Expand Down

0 comments on commit 43a7c20

Please sign in to comment.