Skip to content

Commit

Permalink
Removes unnecessary AdvantageKit dependency, updates CI and gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
jkleiber committed Aug 21, 2024
1 parent 73d1879 commit a0ba969
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 134 deletions.
77 changes: 22 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ jobs:
- container: wpilib/roborio-cross-ubuntu:2024-22.04
artifact-name: Athena
build-options: "-Ponlylinuxathena"
# - container: wpilib/raspbian-cross-ubuntu:bullseye-22.04
# artifact-name: Arm32
# build-options: "-Ponlylinuxarm32"
# - container: wpilib/aarch64-cross-ubuntu:bullseye-22.04
# artifact-name: Arm64
# build-options: "-Ponlylinuxarm64"
- container: wpilib/ubuntu-base:22.04
artifact-name: Linux
build-options: ""
Expand All @@ -25,12 +19,10 @@ jobs:
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
submodules: true
fetch-depth: 0
- name: Fetch all history and metadata
run: |
git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}
java-version: '17'
distribution: 'temurin'
- name: Build with Gradle
run: ./gradlew build --max-workers 1 ${{ matrix.build-options }}
- uses: actions/upload-artifact@v3
Expand All @@ -45,66 +37,41 @@ jobs:
fail-fast: false
matrix:
include:
- os: windows-2022
- os: windows-latest
artifact-name: Win64
architecture: x64
- os: macos-12
artifact-name: macOS
architecture: x64
- os: ubuntu-latest
artifact-name: ubuntu
architecture: x64
name: "Build - ${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Fetch all history and metadata
run: git fetch --prune --unshallow
- uses: actions/setup-java@v3

- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
java-version: '17'
distribution: 'temurin'
architecture: ${{ matrix.architecture }}

- name: Build with Gradle
run: ./gradlew build -Pbuildalldesktop
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact-name }}
path: build/allOutputs

combine:
name: Combine
needs: [build-docker, build-host]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: wpilibsuite/build-tools
- uses: actions/download-artifact@v3
with:
path: combiner/products/build/allOutputs
- name: Flatten Artifacts
run: rsync -a --delete combiner/products/build/allOutputs/*/* combiner/products/build/allOutputs/
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Combine
# if: |
# !startsWith(github.ref, 'refs/tags/v')
run: ./gradlew publish -Pthirdparty
working-directory: combiner
# - name: Combine (Release)
# if: |
# github.repository_owner == 'wpilibsuite' &&
# startsWith(github.ref, 'refs/tags/v')
# run: |
# ./gradlew publish -Pthirdparty
# working-directory: combiner
# env:
# RUN_AZURE_ARTIFACTORY_RELEASE: 'TRUE'
# ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
# ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
- uses: actions/upload-artifact@v3
- name: Update Maven Snapshots
run: mvn --batch-mode --update-snapshots verify

- name: Create Staging Area
run: mkdir staging && cp target/*.jar staging

- uses: actions/upload-artifact@v4
with:
name: Maven
path: ~/releases
name: Package
path: staging
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ bin/


# End of https://www.gitignore.io/api/c++,java,linux,macos,gradle,windows,visualstudiocode

# Ignore Gradle build output directory
build

# Ignore Gradle build output directory
build

# Ignore auto-generated WPILib stuff.
wpi_interface/src/main/java/frc/robot/BuildConstants.java
17 changes: 0 additions & 17 deletions wpi_interface/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,6 @@ def includeDesktopSupport = true
// Defining my dependencies. In this case, WPILib (+ friends), and vendor libraries.
// Also defines JUnit 5.
dependencies {
// ...
def akitJson = new groovy.json.JsonSlurper().parseText(new File(projectDir.getAbsolutePath() + "/vendordeps/AdvantageKit.json").text)
annotationProcessor "org.littletonrobotics.akit.junction:junction-autolog:$akitJson.version"

implementation wpi.java.deps.wpilib()
implementation wpi.java.vendor.java()

Expand Down Expand Up @@ -115,13 +111,6 @@ indent = " "
}

repositories {
maven {
url = uri("https://maven.pkg.github.com/Mechanical-Advantage/AdvantageKit")
credentials {
username = "Mechanical-Advantage-Bot"
password = "\u0067\u0068\u0070\u005f\u006e\u0056\u0051\u006a\u0055\u004f\u004c\u0061\u0079\u0066\u006e\u0078\u006e\u0037\u0051\u0049\u0054\u0042\u0032\u004c\u004a\u006d\u0055\u0070\u0073\u0031\u006d\u0037\u004c\u005a\u0030\u0076\u0062\u0070\u0063\u0051"
}
}
mavenCentral()
mavenLocal()
}
Expand Down Expand Up @@ -157,12 +146,6 @@ configurations.all {
exclude group: "edu.wpi.first.wpilibj"
}

task(checkAkitInstall, dependsOn: "classes", type: JavaExec) {
mainClass = "org.littletonrobotics.junction.CheckInstall"
classpath = sourceSets.main.runtimeClasspath
}
compileJava.finalizedBy checkAkitInstall

task (commitOnDeploy, dependsOn: "spotlessApply") {
description = 'Commits when deployed.'
doLast {
Expand Down
17 changes: 0 additions & 17 deletions wpi_interface/src/main/java/frc/robot/BuildConstants.java

This file was deleted.

42 changes: 0 additions & 42 deletions wpi_interface/vendordeps/AdvantageKit.json

This file was deleted.

0 comments on commit a0ba969

Please sign in to comment.