Skip to content

Commit

Permalink
chore: build with java 21
Browse files Browse the repository at this point in the history
update dependencies and github workflows
  • Loading branch information
asmfstatoil committed Dec 22, 2023
1 parent 20730e9 commit 5b5248f
Show file tree
Hide file tree
Showing 5 changed files with 570 additions and 253 deletions.
27 changes: 26 additions & 1 deletion .github/workflows/release_with_jars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,32 @@ jobs:
with:
name: jarfiles
path: staging


compile_java_21:
name: Build Neqsim ${{ needs.get_versions.outputs.version }} with java 21
needs: get_versions

if: ${{ needs.get_versions.outputs.version_8 == needs.get_versions.outputs.version }}
runs-on: ubuntu-latest

steps:
- name: Check out neqsim java project
uses: actions/checkout@v3
- name: Set up JDK 21 environment
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Build java 21 version with Maven
run: mvn -B package --file pomJava21.xml
- name: Copy jar file to staging
run: mkdir staging && cp target/neqsim*Java21.jar staging
- uses: actions/upload-artifact@v2
with:
name: jarfiles
path: staging

create_release:
name: Create release v${{ needs.get_versions.outputs.version_8 }}
runs-on: ubuntu-latest
Expand Down
22 changes: 19 additions & 3 deletions .github/workflows/verify_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- master

jobs:
test_javadoc:
test_java_11:
name: Assert tests and javadoc with java 11
runs-on: ubuntu-latest
steps:
Expand All @@ -36,9 +36,9 @@ jobs:
tags: coverage

test_java_8:
name: Assert tests and javadoc with java 8
name: Assert tests with java 8
runs-on: ubuntu-latest
needs: test_javadoc
needs: test_java_11

steps:
- uses: actions/checkout@v3
Expand All @@ -51,3 +51,19 @@ jobs:
- name: Run tests
run: mvn -B test --file pomJava8.xml -ntp


test_java_21:
name: Assert tests with java 21
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Generate javadoc
run: mvn javadoc:javadoc
- name: Run tests
run: mvn -B test --file pomJava21.xml -ntp
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.9.3</version>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -102,7 +102,7 @@
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
<version>2.10.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -143,7 +143,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>1.3.0</version>
<version>1.5.0</version>
<configuration>
<updatePomFile>true</updatePomFile>
</configuration>
Expand All @@ -167,7 +167,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.1</version>
<executions>
<execution>
<phase>package</phase>
Expand All @@ -180,7 +180,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.12.0</version>
<configuration>
<release>11</release> <!-- Upgrade jdk version to 11 if you are having issues compiling -->
<encoding>${project.build.sourceEncoding}</encoding>
Expand All @@ -195,7 +195,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.1</version>
<version>3.6.3</version>
<configuration>
<show>private</show>
<nohelp>true</nohelp>
Expand All @@ -211,7 +211,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<version>3.2.3</version>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
Expand All @@ -220,7 +220,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.8</version>
<version>0.8.11</version>
<configuration>
<excludes>
<exclude>neqsim/physicalProperties/util/parameterFitting/**/*</exclude>
Expand Down
Loading

0 comments on commit 5b5248f

Please sign in to comment.