Skip to content

Ooops, fixes (again) demo.yml workflow #15

Ooops, fixes (again) demo.yml workflow

Ooops, fixes (again) demo.yml workflow #15

Workflow file for this run

name: Check java class version
on:
push:
branches:
- "*"
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
name: Build and check class release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu' # Alternative distribution options are available.
- name: Cache Maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and check
run: |
mvn -P sonar package
curl -sS https://repo1.maven.org/maven2/com/fathzer/java-check-class-version/0.0.1/java-check-class-version-0.0.1.jar > ./checkReleaseTest.jar
echo "checking ./javaluator-demo/target/javaluator-demo.jar is compatible with java ${{vars.MIN_JAVA_VERSION}}"
java -jar ./checkReleaseTest.jar ./javaluator-demo/target/javaluator-demo.jar -j ${{vars.MIN_JAVA_VERSION}} -i
# Let check the library itself in case demo pom points to an older release of the library
OUT="$(ls ./javaluator/target/javaluator*.jar | grep -v javadoc.jar | grep -v sources.jar)"
echo "checking $OUT is compatible with java ${{vars.MIN_JAVA_VERSION}}"
java -jar ./checkReleaseTest.jar $OUT -j ${{vars.MIN_JAVA_VERSION}} -i
OUT="$(ls ./javaluator-examples/target/javaluator-examples*.jar | grep -v javadoc.jar | grep -v sources.jar)"
echo "checking $OUT is compatible with java ${{vars.MIN_JAVA_VERSION}}"
java -jar ./checkReleaseTest.jar $OUT -j ${{vars.MIN_JAVA_VERSION}} -i