Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance #287

Merged
merged 4 commits into from
Sep 13, 2024
Merged
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
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ jobs:
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY}}
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.9.8
- name: Cache SonarCloud packages
uses: actions/cache@v1
if: ${{ env.SONAR_TOKEN != 0 }}
Expand All @@ -43,15 +47,15 @@ jobs:
- name: Maven test + SonarCloud
if: ${{ env.SONAR_TOKEN != 0 }}
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar
-Dsonar.java.source=17
-Dsonar.java.source=21
-Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }}
-Dsonar.organization=${{ env.SONAR_ORGANIZATION }}
-Dsonar.host.url=https://sonarcloud.io
- name: Maven test no SonarCloud
if: ${{ env.SONAR_TOKEN == 0 }}
run: mvn -B verify
- name: Upload surefire test results
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Surefire-Test-Results
path: ~/**/surefire-reports/**/*.txt
5 changes: 3 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<properties>
<application.main.class>io.lighty.yang.validator.Main</application.main.class>
<application.attach.zip>true</application.attach.zip>
<logback-version>1.5.8</logback-version>
</properties>

<dependencies>
Expand All @@ -37,12 +38,12 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.5.7</version>
<version>${logback-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.7</version>
<version>${logback-version}</version>
</dependency>

<dependency>
Expand Down
10 changes: 5 additions & 5 deletions src/main/assembly/resources/lyv
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#!/bin/bash

# Set JAVA_HOME to point to a specific Java 17+ JDK
#export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
# Set JAVA_HOME to point to a specific Java 21+ JDK
#export JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64

# If JAVA_HOME is not set, try to find it using java itself
if [ -z ${JAVA_HOME} ]; then
command -v java >/dev/null 2>&1 || { echo >&2 "java is required, but it's not installed. Set JAVA_HOME or add java to your path."; exit 1; }
JAVA_HOME=`java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | sed -e 's/^.*java.home = \(.*\)$/\1/'`
fi;

# Make sure we are using Java 17+
# Make sure we are using Java 21+
JAVA_VERSION=`${JAVA_HOME}/bin/java -version 2>&1 | head -1 | cut -d'"' -f2 | sed '/^1\./s///' | cut -d'.' -f1`
if [ -z ${JAVA_VERSION} ] || [ ${JAVA_VERSION} -lt 17 ]; then
echo "Java 17+ is required to run this application!"
if [ -z ${JAVA_VERSION} ] || [ ${JAVA_VERSION} -lt 21 ]; then
echo "Java 21+ is required to run this application!"
exit -1
fi;

Expand Down
Loading