From d83d53650a951f79e477ad9dc098266edc64129f Mon Sep 17 00:00:00 2001 From: Jordan McMichael Date: Sat, 12 Jul 2025 00:35:09 -0400 Subject: [PATCH] [2027] Add systemcore as a photonlib build target (#1995) ## Description Added systemcore to a couple of build files in order for `./gradlew publishToMavenLocal` to generate systemcore-compatible dependencies. Needed to support deploying photonlib to systemcore. ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2024.3.1 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added --------- Co-authored-by: Gold856 <117957790+Gold856@users.noreply.github.com> --- .github/workflows/build.yml | 3 +++ photon-lib/src/generate/photonlib.json.in | 6 +++--- photon-targeting/build.gradle | 2 +- shared/config.gradle | 1 + 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e60130f52..c7d0af6e3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -266,6 +266,9 @@ jobs: fail-fast: false matrix: include: + - container: wpilib/systemcore-cross-ubuntu:2025-24.04 + artifact-name: SystemCore + build-options: "-Ponlylinuxsystemcore" - container: wpilib/raspbian-cross-ubuntu:bookworm-24.04 artifact-name: Raspbian build-options: "-Ponlylinuxarm32" diff --git a/photon-lib/src/generate/photonlib.json.in b/photon-lib/src/generate/photonlib.json.in index 5df9ae5d2..a1a62268e 100644 --- a/photon-lib/src/generate/photonlib.json.in +++ b/photon-lib/src/generate/photonlib.json.in @@ -18,7 +18,7 @@ "isJar": false, "validPlatforms": [ "windowsx86-64", - "linuxathena", + "linuxsystemcore", "linuxx86-64", "osxuniversal" ] @@ -35,7 +35,7 @@ "skipInvalidPlatforms": true, "binaryPlatforms": [ "windowsx86-64", - "linuxathena", + "linuxsystemcore", "linuxx86-64", "osxuniversal" ] @@ -50,7 +50,7 @@ "skipInvalidPlatforms": true, "binaryPlatforms": [ "windowsx86-64", - "linuxathena", + "linuxsystemcore", "linuxx86-64", "osxuniversal" ] diff --git a/photon-targeting/build.gradle b/photon-targeting/build.gradle index 7bf667bcc..ed132739a 100644 --- a/photon-targeting/build.gradle +++ b/photon-targeting/build.gradle @@ -66,7 +66,7 @@ model { enableCheckTask project.hasProperty('doJniCheck') javaCompileTasks << compileJava - jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.roborio) + jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.systemcore) jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm32) jniCrossCompileOptions << JniCrossCompileOptions(nativeUtils.wpi.platforms.linuxarm64) diff --git a/shared/config.gradle b/shared/config.gradle index fbb48de0a..ebc32468b 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -2,6 +2,7 @@ nativeUtils.addWpiNativeUtils() nativeUtils.withCrossLinuxArm32() nativeUtils.withCrossLinuxArm64() +nativeUtils.withCrossSystemCore() // Configure WPI dependencies. nativeUtils.wpi.configureDependencies {