From 704497ac7e4d057095aec195368801766516842c Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Tue, 28 May 2024 23:41:00 -0700 Subject: [PATCH 01/18] configure ci to cache gradle builds --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5d68490..ab56cdf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,7 @@ jobs: with: distribution: 'temurin' java-version: 17 + cache: 'gradle' - name: Setup Webots id: setupWebots From a374e8037ce3ade2157b2758bfadc5e5eaeb1360 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Tue, 28 May 2024 23:42:25 -0700 Subject: [PATCH 02/18] run build on any push (for debugging) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab56cdf5..a455f467 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - branches: [ master ] + # branches: [ master ] pull_request: branches: [ master ] From 6ded1215b932bd373129c94917a22263d2c09158 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Tue, 28 May 2024 23:57:42 -0700 Subject: [PATCH 03/18] tell gradle to use build cache --- .github/actions/run-system-test/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/run-system-test/action.yml b/.github/actions/run-system-test/action.yml index abb3c3e1..149c13f4 100644 --- a/.github/actions/run-system-test/action.yml +++ b/.github/actions/run-system-test/action.yml @@ -17,5 +17,5 @@ runs: - name: Do the system test (and any other tests) run: | - ./gradlew build --info --stacktrace + ./gradlew build --info --stacktrace --build-cache shell: bash From 19aa28670317afc6c9303dc32e8dacbd87a2083e Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 00:34:43 -0700 Subject: [PATCH 04/18] stop gradle daemons --- .github/actions/run-system-test/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/run-system-test/action.yml b/.github/actions/run-system-test/action.yml index 149c13f4..4f1ad617 100644 --- a/.github/actions/run-system-test/action.yml +++ b/.github/actions/run-system-test/action.yml @@ -19,3 +19,8 @@ runs: run: | ./gradlew build --info --stacktrace --build-cache shell: bash + + - name: Stop Gradle Daemons # https://github.com/actions/cache/blob/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9/examples.md#java---gradle + run: | + ./gradlew --stop + shell: bash From e44a1b8d4e49f11c252b41db2407563bbbb9f37f Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 03:06:31 -0700 Subject: [PATCH 05/18] enable build cache in settings.gradle --- .github/actions/run-system-test/action.yml | 2 +- settings.gradle | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/run-system-test/action.yml b/.github/actions/run-system-test/action.yml index 4f1ad617..120d8fc8 100644 --- a/.github/actions/run-system-test/action.yml +++ b/.github/actions/run-system-test/action.yml @@ -17,7 +17,7 @@ runs: - name: Do the system test (and any other tests) run: | - ./gradlew build --info --stacktrace --build-cache + ./gradlew build --info --stacktrace shell: bash - name: Stop Gradle Daemons # https://github.com/actions/cache/blob/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9/examples.md#java---gradle diff --git a/settings.gradle b/settings.gradle index 382d6856..ea47ccd2 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,3 +2,4 @@ rootProject.name = 'DeepBlueSim' includeBuild 'WPIWebSockets' includeBuild 'plugin' includeBuild 'example' +org.gradle.caching=true From 83c313ef7471075b7514c45a5d57e15d5332f77e Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 03:11:23 -0700 Subject: [PATCH 06/18] use gradle.properties instead of settings.gradle --- gradle.properties | 2 +- settings.gradle | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8b137891..16089002 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ - +org.gradle.caching=true diff --git a/settings.gradle b/settings.gradle index ea47ccd2..382d6856 100644 --- a/settings.gradle +++ b/settings.gradle @@ -2,4 +2,3 @@ rootProject.name = 'DeepBlueSim' includeBuild 'WPIWebSockets' includeBuild 'plugin' includeBuild 'example' -org.gradle.caching=true From df033610c832da3f6c15e14c7c3fea27b63f02d6 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 03:17:19 -0700 Subject: [PATCH 07/18] enable caching of generated device files --- WPIWebSockets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WPIWebSockets b/WPIWebSockets index 5f2f511d..3406685e 160000 --- a/WPIWebSockets +++ b/WPIWebSockets @@ -1 +1 @@ -Subproject commit 5f2f511d35f86ed6ba14469403365c89254d35f9 +Subproject commit 3406685ed5fc748237204547d012327391a2a2da From 24dfebb59928619614c8c11078ccd4bb05aa32c7 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 03:19:24 -0700 Subject: [PATCH 08/18] fix syntax error --- WPIWebSockets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WPIWebSockets b/WPIWebSockets index 3406685e..042a248a 160000 --- a/WPIWebSockets +++ b/WPIWebSockets @@ -1 +1 @@ -Subproject commit 3406685ed5fc748237204547d012327391a2a2da +Subproject commit 042a248a2235cd533718e55fdead5f2519ab227f From dce81104bd54ff6aaf3aa69a37711b1745e31edc Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 04:00:35 -0700 Subject: [PATCH 09/18] use gradle action for caching --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a455f467..2c8571de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,9 @@ jobs: with: distribution: 'temurin' java-version: 17 - cache: 'gradle' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 - name: Setup Webots id: setupWebots From 421dba8ba8b3cff9349efb715b91b093247d6112 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 04:29:12 -0700 Subject: [PATCH 10/18] cache archive-template tar --- WPIWebSockets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WPIWebSockets b/WPIWebSockets index 042a248a..0c5b10ce 160000 --- a/WPIWebSockets +++ b/WPIWebSockets @@ -1 +1 @@ -Subproject commit 042a248a2235cd533718e55fdead5f2519ab227f +Subproject commit 0c5b10ce850942ea336a0931e80ccfc732310254 From 6676db551134523ecc27260425bb1d20f9acaf4b Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 04:39:12 -0700 Subject: [PATCH 11/18] allow writing to cache --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c8571de..d77c6f7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,8 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 + with: + cache-read-only: false - name: Setup Webots id: setupWebots From 2449be9f3b303aebb2cff42546d8c93f909a0fcd Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 05:24:25 -0700 Subject: [PATCH 12/18] remove unnecessary step --- .github/actions/run-system-test/action.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/actions/run-system-test/action.yml b/.github/actions/run-system-test/action.yml index 120d8fc8..abb3c3e1 100644 --- a/.github/actions/run-system-test/action.yml +++ b/.github/actions/run-system-test/action.yml @@ -19,8 +19,3 @@ runs: run: | ./gradlew build --info --stacktrace shell: bash - - - name: Stop Gradle Daemons # https://github.com/actions/cache/blob/0c45773b623bea8c8e75f6c82b208c3cf94ea4f9/examples.md#java---gradle - run: | - ./gradlew --stop - shell: bash From 45afa16a4fd4d7ecd5c71d7e040eaa57ae94e08b Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 05:24:42 -0700 Subject: [PATCH 13/18] a small change to force the plugin to recompile --- plugin/controller/src/main/java/DeepBlueSim.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/controller/src/main/java/DeepBlueSim.java b/plugin/controller/src/main/java/DeepBlueSim.java index 06323d2b..9ac06b41 100644 --- a/plugin/controller/src/main/java/DeepBlueSim.java +++ b/plugin/controller/src/main/java/DeepBlueSim.java @@ -58,6 +58,8 @@ public void uncaughtException(Thread arg0, Throwable arg1) { Thread.currentThread().setUncaughtExceptionHandler(eh); } + System.out.println( + "This is a small change that will force the plugin to recompile!"); ConnectionProcessor.setThreadExecutor(queuedMessages::add); final Supervisor robot = new Supervisor(); From fb89c8c467d1dfb2e5111ab6aeda3c627486749c Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 05:36:26 -0700 Subject: [PATCH 14/18] see if we can crash the build --- plugin/controller/src/main/java/DeepBlueSim.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/controller/src/main/java/DeepBlueSim.java b/plugin/controller/src/main/java/DeepBlueSim.java index 9ac06b41..83ae2bc3 100644 --- a/plugin/controller/src/main/java/DeepBlueSim.java +++ b/plugin/controller/src/main/java/DeepBlueSim.java @@ -84,9 +84,9 @@ public void uncaughtException(Thread arg0, Throwable arg1) { Simulation.registerPeriodicMethod(() -> { Node self = robot.getSelf(); double[] pos = self.getPosition(); - webotsSupervisorSim.set("self.position.x", pos[0]); - webotsSupervisorSim.set("self.position.y", pos[1]); - webotsSupervisorSim.set("self.position.z", pos[2]); + // webotsSupervisorSim.set("self.position.x", pos[0]); + // webotsSupervisorSim.set("self.position.y", pos[1]); + // webotsSupervisorSim.set("self.position.z", pos[2]); }); Timer simPauseTimer = new Timer(); From ad109e8670e241f4736c31c67a4497b82d52bf36 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 14:54:06 -0700 Subject: [PATCH 15/18] backout debugging changes --- .github/workflows/ci.yml | 4 +--- plugin/controller/src/main/java/DeepBlueSim.java | 8 +++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d77c6f7b..ef769775 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: push: - # branches: [ master ] + branches: [ master ] pull_request: branches: [ master ] @@ -29,8 +29,6 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@v3 - with: - cache-read-only: false - name: Setup Webots id: setupWebots diff --git a/plugin/controller/src/main/java/DeepBlueSim.java b/plugin/controller/src/main/java/DeepBlueSim.java index 83ae2bc3..06323d2b 100644 --- a/plugin/controller/src/main/java/DeepBlueSim.java +++ b/plugin/controller/src/main/java/DeepBlueSim.java @@ -58,8 +58,6 @@ public void uncaughtException(Thread arg0, Throwable arg1) { Thread.currentThread().setUncaughtExceptionHandler(eh); } - System.out.println( - "This is a small change that will force the plugin to recompile!"); ConnectionProcessor.setThreadExecutor(queuedMessages::add); final Supervisor robot = new Supervisor(); @@ -84,9 +82,9 @@ public void uncaughtException(Thread arg0, Throwable arg1) { Simulation.registerPeriodicMethod(() -> { Node self = robot.getSelf(); double[] pos = self.getPosition(); - // webotsSupervisorSim.set("self.position.x", pos[0]); - // webotsSupervisorSim.set("self.position.y", pos[1]); - // webotsSupervisorSim.set("self.position.z", pos[2]); + webotsSupervisorSim.set("self.position.x", pos[0]); + webotsSupervisorSim.set("self.position.y", pos[1]); + webotsSupervisorSim.set("self.position.z", pos[2]); }); Timer simPauseTimer = new Timer(); From 15fb16d71e5bb6e833976badae7f46a520f8bcdb Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 14:58:19 -0700 Subject: [PATCH 16/18] bump WPIWebSockets --- WPIWebSockets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WPIWebSockets b/WPIWebSockets index 0c5b10ce..14045af9 160000 --- a/WPIWebSockets +++ b/WPIWebSockets @@ -1 +1 @@ -Subproject commit 0c5b10ce850942ea336a0931e80ccfc732310254 +Subproject commit 14045af9e06b3cba96cb23feb6f708030ce4c202 From 805f415ce183e4a5cd65bca934e9d8edf7278954 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 15:06:32 -0700 Subject: [PATCH 17/18] bump WPIWebSockets --- WPIWebSockets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WPIWebSockets b/WPIWebSockets index 14045af9..1532c4c4 160000 --- a/WPIWebSockets +++ b/WPIWebSockets @@ -1 +1 @@ -Subproject commit 14045af9e06b3cba96cb23feb6f708030ce4c202 +Subproject commit 1532c4c4823ae54800d92bb49f38ca1007564c0f From 0af2dc8ed17615f80fac21c0abe99bbd47179196 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 29 May 2024 15:14:45 -0700 Subject: [PATCH 18/18] bump WPIWebSockets --- WPIWebSockets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WPIWebSockets b/WPIWebSockets index 1532c4c4..16f9c8c9 160000 --- a/WPIWebSockets +++ b/WPIWebSockets @@ -1 +1 @@ -Subproject commit 1532c4c4823ae54800d92bb49f38ca1007564c0f +Subproject commit 16f9c8c9639a7700e0ee9636df96e730ce2dcad0