From 1d3f6a115ececcf00d0265b9e2946db57246503e Mon Sep 17 00:00:00 2001 From: GroG Date: Thu, 12 Oct 2023 17:00:32 -0700 Subject: [PATCH 01/19] added install dependency test (#1353) --- .github/workflows/build.yml | 4 +++- Jenkinsfile | 24 +++++++++++++++++-- .../myrobotlab/framework/DependencyTest.java | 13 ++++++++++ 3 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 src/test/java/org/myrobotlab/framework/DependencyTest.java diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf668124e0..93d82942aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,5 +15,7 @@ jobs: with: java-version: '11' distribution: 'adopt' + - name: Dependency Test + run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q - name: Build with Maven - run: mvn --batch-mode -Dtest=!**/OpenCV* test -X + run: mvn --batch-mode -Dtest=!**/OpenCV* test -q diff --git a/Jenkinsfile b/Jenkinsfile index 85c66205f7..a0e8bed48e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -92,6 +92,26 @@ pipeline { } } // stage compile + stage('dependencies') { + when { + expression { params.verify == 'true' } + } + steps { + script { + // TODO - integration tests ! + if (isUnix()) { + sh ''' + mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q + ''' + } else { + bat ''' + mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q + ''' + } + } + } + } // stage verify + stage('verify') { when { expression { params.verify == 'true' } @@ -101,11 +121,11 @@ pipeline { // TODO - integration tests ! if (isUnix()) { sh ''' - mvn -Dfile.encoding=UTF-8 -Dsurefire.skipAfterFailureCount=1 -DargLine="-Xmx1024m" verify --fail-fast + mvn -Dfile.encoding=UTF-8 -DargLine="-Xmx1024m" verify --fail-fast -q ''' } else { bat ''' - mvn -Dfile.encoding=UTF-8 -Dsurefire.skipAfterFailureCount=1 -DargLine="-Xmx1024m" verify --fail-fast + mvn -Dfile.encoding=UTF-8 -DargLine="-Xmx1024m" verify --fail-fast -q ''' } } diff --git a/src/test/java/org/myrobotlab/framework/DependencyTest.java b/src/test/java/org/myrobotlab/framework/DependencyTest.java new file mode 100644 index 0000000000..4d264d9852 --- /dev/null +++ b/src/test/java/org/myrobotlab/framework/DependencyTest.java @@ -0,0 +1,13 @@ +package org.myrobotlab.framework; + +import org.junit.Test; +import org.myrobotlab.test.AbstractTest; + +public class DependencyTest extends AbstractTest { + + @Test + public void test() { + System.out.println("dependencies were successful !"); + } + +} From 0cd81c7bcd79b9407c43cff4f6f2c61b1208b560 Mon Sep 17 00:00:00 2001 From: grog Date: Thu, 12 Oct 2023 18:01:04 -0700 Subject: [PATCH 02/19] trying a gitaction release --- .github/workflows/build.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93d82942aa..43703a35cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,5 +17,24 @@ jobs: distribution: 'adopt' - name: Dependency Test run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q - - name: Build with Maven + - name: Build and Test with Maven run: mvn --batch-mode -Dtest=!**/OpenCV* test -q + - name: Package with Maven + run: mvn package -DskipTests + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Upload Release Artifacts + uses: actions/upload-release-asset@v1 + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./target/myrobotlab.zip + asset_name: myrobotlab.zip + asset_content_type: application/zip \ No newline at end of file From 8b2555a82ca363189aa5153d079e5cdd351f5bf1 Mon Sep 17 00:00:00 2001 From: grog Date: Thu, 12 Oct 2023 19:40:33 -0700 Subject: [PATCH 03/19] auto increment version --- .github/workflows/build.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43703a35cd..c2afb1369a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,16 +21,28 @@ jobs: run: mvn --batch-mode -Dtest=!**/OpenCV* test -q - name: Package with Maven run: mvn package -DskipTests + + - name: Determine Next Version + id: next_version + run: | + latest_release_tag=$(git describe --tags --abbrev=0) + major_minor="1.1." + current_version="${latest_release_tag#v}" + increment_version=$((current_version + 1)) + next_version="${major_minor}${increment_version}" + echo "::set-output name=next_version::${next_version}" + - name: Create Release id: create_release uses: actions/create-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} + tag_name: ${{ steps.next_version.outputs.next_version }} + release_name: Release ${{ steps.next_version.outputs.next_version }} draft: false - prerelease: false + prerelease: false + - name: Upload Release Artifacts uses: actions/upload-release-asset@v1 with: From 7d901e61dde6634ee4bddd17fb90d85448558310 Mon Sep 17 00:00:00 2001 From: grog Date: Thu, 12 Oct 2023 20:16:05 -0700 Subject: [PATCH 04/19] another try --- .github/workflows/build.yml | 9 ++++++--- version.txt | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 version.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2afb1369a..fbdc3a0eb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,22 +15,25 @@ jobs: with: java-version: '11' distribution: 'adopt' + - name: Dependency Test run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q + - name: Build and Test with Maven run: mvn --batch-mode -Dtest=!**/OpenCV* test -q + - name: Package with Maven run: mvn package -DskipTests - name: Determine Next Version id: next_version run: | - latest_release_tag=$(git describe --tags --abbrev=0) + current_version=$(cat version.txt) major_minor="1.1." - current_version="${latest_release_tag#v}" increment_version=$((current_version + 1)) next_version="${major_minor}${increment_version}" - echo "::set-output name=next_version::${next_version}" + echo "$next_version" > version.txt + echo "next_version=${next_version}" >> $GITHUB_OUTPUT - name: Create Release id: create_release diff --git a/version.txt b/version.txt new file mode 100644 index 0000000000..1cc5f657e0 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +1.1.0 \ No newline at end of file From 3015b11b5e311bc9977928af14b99fd42f68cd02 Mon Sep 17 00:00:00 2001 From: grog Date: Thu, 12 Oct 2023 20:54:50 -0700 Subject: [PATCH 05/19] again --- .github/workflows/build.yml | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fbdc3a0eb2..a9eb1341f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,15 +25,21 @@ jobs: - name: Package with Maven run: mvn package -DskipTests - - name: Determine Next Version - id: next_version - run: | - current_version=$(cat version.txt) - major_minor="1.1." - increment_version=$((current_version + 1)) - next_version="${major_minor}${increment_version}" - echo "$next_version" > version.txt - echo "next_version=${next_version}" >> $GITHUB_OUTPUT + # - name: Determine Next Version + # id: next_version + # run: | + # current_version=$(cat version.txt) + # major_minor="1.1." + # increment_version=$((current_version + 1)) + # next_version="${major_minor}${increment_version}" + # echo "$next_version" > version.txt + # echo "next_version=${next_version}" >> $GITHUB_OUTPUT + - name: Get next version + uses: reecetech/version-increment@2023.9.3 + id: version + with: + scheme: semver + increment: patch - name: Create Release id: create_release @@ -41,8 +47,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ steps.next_version.outputs.next_version }} - release_name: Release ${{ steps.next_version.outputs.next_version }} + tag_name: ${{ steps.next_version.outputs.version }} + release_name: Release ${{ steps.next_version.outputs.version }} draft: false prerelease: false From 8e9def55940e86efaef4852d162defc9b807d307 Mon Sep 17 00:00:00 2001 From: grog Date: Thu, 12 Oct 2023 21:13:53 -0700 Subject: [PATCH 06/19] again --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a9eb1341f3..0769273deb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,8 +47,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: ${{ steps.next_version.outputs.version }} - release_name: Release ${{ steps.next_version.outputs.version }} + tag_name: ${{ steps.version.outputs.version }} + release_name: Release ${{ steps.version.outputs.version }} draft: false prerelease: false From b7c0eddc2fa25457937bd8e94ce79df6bef87bf0 Mon Sep 17 00:00:00 2001 From: grog Date: Thu, 12 Oct 2023 21:32:31 -0700 Subject: [PATCH 07/19] non expiring token added --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0769273deb..1b0ccee019 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,8 @@ jobs: id: create_release uses: actions/create-release@v1 env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} with: tag_name: ${{ steps.version.outputs.version }} release_name: Release ${{ steps.version.outputs.version }} From 910d3340e0fc4cd54ba8fe105ff234016db503b6 Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 07:15:48 -0700 Subject: [PATCH 08/19] test --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b0ccee019..bbe3ccdb23 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,4 +59,4 @@ jobs: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./target/myrobotlab.zip asset_name: myrobotlab.zip - asset_content_type: application/zip \ No newline at end of file + asset_content_type: application/zip From 8fef9a6a6deae9634ae8478b3ee40ab409692888 Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 08:04:45 -0700 Subject: [PATCH 09/19] added token --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbe3ccdb23..aea99dc342 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,7 +45,7 @@ jobs: id: create_release uses: actions/create-release@v1 env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} with: tag_name: ${{ steps.version.outputs.version }} @@ -55,6 +55,9 @@ jobs: - name: Upload Release Artifacts uses: actions/upload-release-asset@v1 + env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires + GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./target/myrobotlab.zip From 45019e1cc0c10557a475c315c4d8608a843d059a Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 16:29:49 -0700 Subject: [PATCH 10/19] trying with gh release --- .github/workflows/build.yml | 47 +++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aea99dc342..755cef3039 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,25 +41,32 @@ jobs: scheme: semver increment: patch - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} + - name: Release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') with: - tag_name: ${{ steps.version.outputs.version }} - release_name: Release ${{ steps.version.outputs.version }} - draft: false - prerelease: false + token: ${{ secrets.ACCESS_TOKEN }} + files: ./target/myrobotlab.zip + + # - name: Create Release + # id: create_release + # uses: actions/create-release@v1 + # env: + # # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires + # GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} + # with: + # tag_name: ${{ steps.version.outputs.version }} + # release_name: Release ${{ steps.version.outputs.version }} + # draft: false + # prerelease: false - - name: Upload Release Artifacts - uses: actions/upload-release-asset@v1 - env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires - GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./target/myrobotlab.zip - asset_name: myrobotlab.zip - asset_content_type: application/zip + # - name: Upload Release Artifacts + # uses: actions/upload-release-asset@v1 + # env: + # # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires + # GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} + # asset_path: ./target/myrobotlab.zip + # asset_name: myrobotlab.zip + # asset_content_type: application/zip From f4b0d17d77b519a8a3615725dcff269ee7d2a95d Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 16:54:51 -0700 Subject: [PATCH 11/19] fake builds --- .github/workflows/build.yml | 36 +++++++++---------- .../org/myrobotlab/service/TestCatcher.java | 11 +++--- 2 files changed, 22 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 755cef3039..9c6eeb96cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,31 +9,27 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up JDK 11 - uses: actions/setup-java@v3 + # - name: Set up JDK 11 + # uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'adopt' + # with: + # java-version: '11' + # distribution: 'adopt' + + # - name: Dependency Test + # run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q - - name: Dependency Test - run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q + # - name: Build and Test with Maven + # run: mvn --batch-mode -Dtest=!**/OpenCV* test -q - - name: Build and Test with Maven - run: mvn --batch-mode -Dtest=!**/OpenCV* test -q + # - name: Package with Maven + # run: mvn package -DskipTests - - name: Package with Maven - run: mvn package -DskipTests + - name: Fake Build + run: | + mkdir -p target + echo ${{ github.sha }} > myrobotlab.zip - # - name: Determine Next Version - # id: next_version - # run: | - # current_version=$(cat version.txt) - # major_minor="1.1." - # increment_version=$((current_version + 1)) - # next_version="${major_minor}${increment_version}" - # echo "$next_version" > version.txt - # echo "next_version=${next_version}" >> $GITHUB_OUTPUT - name: Get next version uses: reecetech/version-increment@2023.9.3 id: version diff --git a/src/main/java/org/myrobotlab/service/TestCatcher.java b/src/main/java/org/myrobotlab/service/TestCatcher.java index 8babb7bd31..c5f6f4a3da 100644 --- a/src/main/java/org/myrobotlab/service/TestCatcher.java +++ b/src/main/java/org/myrobotlab/service/TestCatcher.java @@ -34,6 +34,7 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.BlockingQueue; +import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.LinkedBlockingDeque; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.TimeUnit; @@ -84,19 +85,19 @@ public Ball() { boolean isLocal = true; - public Set onCreated = new HashSet<>(); + public Set onCreated = ConcurrentHashMap.newKeySet(); public Map onRegistered = new HashMap(); - public Set onStarted = new HashSet<>(); + public Set onStarted = ConcurrentHashMap.newKeySet(); - public Set onReleased = new HashSet<>(); + public Set onReleased = ConcurrentHashMap.newKeySet(); - public Set onStopped = new HashSet<>(); + public Set onStopped = ConcurrentHashMap.newKeySet(); public List longs = new ArrayList<>(); - public Set pinSet = new HashSet<>(); + public Set pinSet = ConcurrentHashMap.newKeySet(); public String[] activePins = null; From 30381b8757d46b16f63dc78c7356ee5df860eae4 Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 16:57:50 -0700 Subject: [PATCH 12/19] test --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c6eeb96cd..1ef0195080 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: - name: Release uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') + # if: startsWith(github.ref, 'refs/tags/') with: token: ${{ secrets.ACCESS_TOKEN }} files: ./target/myrobotlab.zip From 702ae7eaa2191163d301519c40bb86bdba2e0198 Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 17:07:04 -0700 Subject: [PATCH 13/19] again --- .github/workflows/build.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ef0195080..e18e28d021 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,11 @@ name: Java CI -on: [push] +#on: [push] + +on: + push: + branches: + - develop jobs: build: @@ -39,10 +44,10 @@ jobs: - name: Release uses: softprops/action-gh-release@v1 - # if: startsWith(github.ref, 'refs/tags/') with: token: ${{ secrets.ACCESS_TOKEN }} - files: ./target/myrobotlab.zip + files: ./target/myrobotlab.zip + tag_name: ${{ steps.version.outputs.version }} # - name: Create Release # id: create_release From a5b82ed24cbca9a4287eac8a0fc0dd5fa3a03295 Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 17:10:51 -0700 Subject: [PATCH 14/19] try again --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e18e28d021..b9dcee6370 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: - name: Fake Build run: | mkdir -p target - echo ${{ github.sha }} > myrobotlab.zip + echo ${{ github.sha }} > ./target/myrobotlab.zip - name: Get next version uses: reecetech/version-increment@2023.9.3 From 9c49a083af18c1563c8c25fb3376f87d3fa45cff Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 17:37:16 -0700 Subject: [PATCH 15/19] added release template --- .github/workflows/build.yml | 27 ++++----------------------- release-template.md | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 23 deletions(-) create mode 100644 release-template.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9dcee6370..bbf9a253e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,31 +43,12 @@ jobs: increment: patch - name: Release + id: release uses: softprops/action-gh-release@v1 with: token: ${{ secrets.ACCESS_TOKEN }} files: ./target/myrobotlab.zip + name: "${{ steps.version.outputs.version }} Nixie" tag_name: ${{ steps.version.outputs.version }} - - # - name: Create Release - # id: create_release - # uses: actions/create-release@v1 - # env: - # # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires - # GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - # with: - # tag_name: ${{ steps.version.outputs.version }} - # release_name: Release ${{ steps.version.outputs.version }} - # draft: false - # prerelease: false - - # - name: Upload Release Artifacts - # uses: actions/upload-release-asset@v1 - # env: - # # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} default expires - # GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} - # with: - # upload_url: ${{ steps.create_release.outputs.upload_url }} - # asset_path: ./target/myrobotlab.zip - # asset_name: myrobotlab.zip - # asset_content_type: application/zip + generate_release_notes: true + body_path: diff --git a/release-template.md b/release-template.md new file mode 100644 index 0000000000..9704cfa430 --- /dev/null +++ b/release-template.md @@ -0,0 +1,16 @@ +## MyRobotLab Nixie Release + +Open Source Framework for Robotics and Creative Machine Control + + *You know, for robots!* + + +* Project Website http://myrobotlab.org + +* Project Discord https://discord.gg/AfScp5x8r5 + +* [JavDocs](https://build.myrobotlab.org:8443/job/myrobotlab/job/develop/$build/artifact/target/site/apidocs/org/myrobotlab/service/package-summary.html) + +## Base Requirements + +You will need Java 11 or newer. If you are only running MyRobotLab you need the JRE (Java Runtime Environment.) If you are going to be building from source, you'll need the JDK (Java Development Kit) Oracle or OpenJDK will work. \ No newline at end of file From 86f4b33c2f48b1f9ad8b4367e4326b5fe0833246 Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 17:45:27 -0700 Subject: [PATCH 16/19] added md --- .github/workflows/build.yml | 2 +- release-template.md | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bbf9a253e2..b4968faf2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,4 +51,4 @@ jobs: name: "${{ steps.version.outputs.version }} Nixie" tag_name: ${{ steps.version.outputs.version }} generate_release_notes: true - body_path: + body_path: ./release-template.md diff --git a/release-template.md b/release-template.md index 9704cfa430..0dd0e06299 100644 --- a/release-template.md +++ b/release-template.md @@ -4,13 +4,14 @@ Open Source Framework for Robotics and Creative Machine Control *You know, for robots!* - * Project Website http://myrobotlab.org * Project Discord https://discord.gg/AfScp5x8r5 * [JavDocs](https://build.myrobotlab.org:8443/job/myrobotlab/job/develop/$build/artifact/target/site/apidocs/org/myrobotlab/service/package-summary.html) +* To start MyRobotLab, download the latest 'myrobotlab.zip', extract the contents, and then execute the appropriate startup script for your operating system. For example, on Windows, double click on the myrobotlab.bat file. On Linux or Mac, execute the myrobotlab.sh script. + ## Base Requirements -You will need Java 11 or newer. If you are only running MyRobotLab you need the JRE (Java Runtime Environment.) If you are going to be building from source, you'll need the JDK (Java Development Kit) Oracle or OpenJDK will work. \ No newline at end of file +You will need Java 11 or newer. If you are only running MyRobotLab you need the JRE (Java Runtime Environment.) If you are going to be building from source, you'll need the JDK (Java Development Kit) Oracle or OpenJDK will work. From 7c8293a04f001af90e29049981149d56d16ff922 Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 17:49:15 -0700 Subject: [PATCH 17/19] added command line version input for mvn --- .github/workflows/build.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4968faf2f..ce89b8e47b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,26 +14,18 @@ jobs: steps: - uses: actions/checkout@v3 - # - name: Set up JDK 11 - # uses: actions/setup-java@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 - # with: - # java-version: '11' - # distribution: 'adopt' - - # - name: Dependency Test - # run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q - - # - name: Build and Test with Maven - # run: mvn --batch-mode -Dtest=!**/OpenCV* test -q + with: + java-version: '11' + distribution: 'adopt' - # - name: Package with Maven - # run: mvn package -DskipTests + - name: Dependency Test + run: mvn test -Dtest=org.myrobotlab.framework.DependencyTest -q - - name: Fake Build - run: | - mkdir -p target - echo ${{ github.sha }} > ./target/myrobotlab.zip + - name: Build and Test with Maven + run: mvn --batch-mode -Dtest=!**/OpenCV* test -q - name: Get next version uses: reecetech/version-increment@2023.9.3 @@ -42,6 +34,14 @@ jobs: scheme: semver increment: patch + - name: Package with Maven + run: "mvn package -DskipTests -Dversion=${{ steps.version.outputs.version }} -q" + + # - name: Fake Build + # run: | + # mkdir -p target + # echo ${{ github.sha }} > ./target/myrobotlab.zip + - name: Release id: release uses: softprops/action-gh-release@v1 From 1038b40c9a01b2f72917a5761231c4b5d77e5fa4 Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 19:50:58 -0700 Subject: [PATCH 18/19] enabled full version from command line --- pom.xml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 41e93b8aab..f5f7390a58 100644 --- a/pom.xml +++ b/pom.xml @@ -78,13 +78,11 @@ maven or jenkins can do this --> - - 1.1. ${maven.build.timestamp} yyyyMMddHHmm ${timestamp} - ${version.prefix}${build.number} + ${version} ${git.branch} ${NODE_NAME} ${NODE_LABELS} From 5ee2ad197c632744a24980864b45a0c9ac6ae67d Mon Sep 17 00:00:00 2001 From: grog Date: Fri, 13 Oct 2023 20:35:51 -0700 Subject: [PATCH 19/19] version refactor of pom --- assembly.xml | 4 +- build.properties | 1 - pom.xml | 45 +---------------- .../resource/framework/pom.xml.template | 49 +------------------ 4 files changed, 5 insertions(+), 94 deletions(-) delete mode 100644 build.properties diff --git a/assembly.xml b/assembly.xml index 69f4e96e06..562bd86cf8 100644 --- a/assembly.xml +++ b/assembly.xml @@ -14,7 +14,7 @@ myrobotlab.sh ./ - myrobotlab-${version.prefix}${build.number} + myrobotlab-${version} 0755 @@ -22,7 +22,7 @@ myrobotlab.jar target - myrobotlab-${version.prefix}${build.number} + myrobotlab-${version} diff --git a/build.properties b/build.properties deleted file mode 100644 index 775fc8f8ca..0000000000 --- a/build.properties +++ /dev/null @@ -1 +0,0 @@ -global.build.number=0 \ No newline at end of file diff --git a/pom.xml b/pom.xml index f5f7390a58..a00bd0db4f 100644 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,6 @@ MyRobotLab Open Source Creative Machine Control - false ${maven.build.timestamp} yyyyMMddHHmm - ${timestamp} ${version} ${git.branch} ${NODE_NAME} @@ -1814,47 +1812,6 @@ - - - org.codehaus.mojo - properties-maven-plugin - - - initialize - - read-project-properties - - - - build.properties - - - - - - - - org.apache.maven.plugins maven-shade-plugin @@ -1884,7 +1841,7 @@ ${version} ${version} - ${build.number} + ${version} ${maven.build.timestamp} ${agent.name} ${user.name} diff --git a/src/main/resources/resource/framework/pom.xml.template b/src/main/resources/resource/framework/pom.xml.template index 7713649881..ce45f6285a 100644 --- a/src/main/resources/resource/framework/pom.xml.template +++ b/src/main/resources/resource/framework/pom.xml.template @@ -68,7 +68,6 @@ MyRobotLab Open Source Creative Machine Control - false - - 1.1. ${maven.build.timestamp} yyyyMMddHHmm - ${timestamp} - ${version.prefix}${build.number} + ${version} ${git.branch} ${NODE_NAME} ${NODE_LABELS} @@ -182,47 +178,6 @@ - - - org.codehaus.mojo - properties-maven-plugin - - - initialize - - read-project-properties - - - - build.properties - - - - - - - - org.apache.maven.plugins maven-shade-plugin @@ -252,7 +207,7 @@ ${version} ${version} - ${build.number} + ${version} ${maven.build.timestamp} ${agent.name} ${user.name}