diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 93d82942aa..ce89b8e47b 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: @@ -15,7 +20,35 @@ jobs: with: java-version: '11' 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: Get next version + uses: reecetech/version-increment@2023.9.3 + id: version + with: + 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 + with: + token: ${{ secrets.ACCESS_TOKEN }} + files: ./target/myrobotlab.zip + name: "${{ steps.version.outputs.version }} Nixie" + tag_name: ${{ steps.version.outputs.version }} + generate_release_notes: true + body_path: ./release-template.md 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 123bbbbf24..28f05b627c 100644 --- a/pom.xml +++ b/pom.xml @@ -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} @@ -1867,47 +1863,6 @@ - - - org.codehaus.mojo - properties-maven-plugin - - - initialize - - read-project-properties - - - - build.properties - - - - - - - - org.apache.maven.plugins maven-shade-plugin @@ -1937,7 +1892,7 @@ ${version} ${version} - ${build.number} + ${version} ${maven.build.timestamp} ${agent.name} ${user.name} diff --git a/release-template.md b/release-template.md new file mode 100644 index 0000000000..0dd0e06299 --- /dev/null +++ b/release-template.md @@ -0,0 +1,17 @@ +## 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) + +* 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. 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; 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} 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