Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Java CI with Gradle

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

permissions:
contents: read
Expand All @@ -14,22 +14,25 @@ jobs:
runs-on: ubuntu-latest

steps:
# FIX 1: Move submodules here and update to v4
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
submodules: recursive

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
java-version: "17"
distribution: "temurin"

- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5

# FIX 2: Clean up the Gradle action (removed submodules from here)
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
run: ./gradlew build

- name: Upload Build Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
arguments: build
name: reports
path: build/reports/
Comment on lines +33 to +38
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider a more descriptive artifact name.

The failure-triggered artifact upload works correctly, but the name "reports" is generic. Consider something more specific like "build-reports" or "gradle-reports" for easier identification when multiple artifacts exist.

♻️ Suggested improvement
       - name: Upload Build Artifacts
         if: failure()
         uses: actions/upload-artifact@v4
         with:
-          name: reports
+          name: build-reports
           path: build/reports/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Upload Build Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
arguments: build
name: reports
path: build/reports/
- name: Upload Build Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: build-reports
path: build/reports/

Empty file modified gradlew
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ public class CameraConstants {
public static final double OBJECT_POSE_ESTIMATOR_DELETION_THRESHOLD_SECONDS = 0.5;
public static final ObjectDetectionCamera OBJECT_DETECTION_CAMERA = new ObjectDetectionCamera(
"ObjectDetectionCamera",
ROBOT_CENTER_TO_OBJECT_DETECTION_CAMERA
0
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Type mismatch causes compilation failure.

The constructor expects a Transform3d but receives int. Based on the commit message ("add error to check build artifact"), this appears intentional to test CI artifact upload on failure. If so, revert this change before merging—use ROBOT_CENTER_TO_OBJECT_DETECTION_CAMERA instead of 0.

Fix
-            0
+            ROBOT_CENTER_TO_OBJECT_DETECTION_CAMERA
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
0
ROBOT_CENTER_TO_OBJECT_DETECTION_CAMERA
🧰 Tools
🪛 GitHub Actions: Java CI with Gradle

[error] 18-18: incompatible types: int cannot be converted to Transform3d. (Gradle compileJava error during ./gradlew build)

);
}
Loading