Skip to content

Commit

Permalink
feat: GraalVM support (#1914)
Browse files Browse the repository at this point in the history
* feat: GraalVM support

* Test on Java 11

* fix: remove sniffer plugin and comments

* feat: GraalVM adjust lists

---------

Co-authored-by: Liam Newman <bitwiseman@gmail.com>
  • Loading branch information
klopfdreh and bitwiseman authored Sep 5, 2024
1 parent e62a7aa commit aaa6cde
Show file tree
Hide file tree
Showing 13 changed files with 8,410 additions and 25 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ jobs:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Set up JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17

- name: Checkout repository
uses: actions/checkout@v4

Expand Down
23 changes: 22 additions & 1 deletion .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ jobs:
run: mvn -B clean site -D enable-ci --file pom.xml
test:
name: test (${{ matrix.os }}, Java ${{ matrix.java }})
# Does not require build output, but orders execution to prevent launching test workflows when simple build fails
needs: build
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu, windows ]
java: [ 11, 17 ]
java: [ 17, 21 ]
steps:
- uses: actions/checkout@v4
- name: Set up JDK
Expand Down Expand Up @@ -128,3 +130,22 @@ jobs:
cache: 'maven'
- name: Maven Test (no build) Java 8
run: mvn -B surefire:test -DfailIfNoTests -Dsurefire.excludesFile=src/test/resources/slow-or-flaky-tests.txt

test-java-11:
name: test Java 11 (no-build)
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: maven-target-directory
path: target
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 8
distribution: 'temurin'
cache: 'maven'
- name: Maven Test (no build) Java 11
run: mvn -B surefire:test -DfailIfNoTests -Dsurefire.excludesFile=src/test/resources/slow-or-flaky-tests.txt
60 changes: 36 additions & 24 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
</distributionManagement>

<properties>
<spring.boot.version>3.3.3</spring.boot.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spotbugs-maven-plugin.version>4.8.6.1</spotbugs-maven-plugin.version>
<spotbugs.version>4.8.6</spotbugs.version>
Expand Down Expand Up @@ -240,33 +241,27 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.22</version>
<configuration>
<signature>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java18</artifactId>
<version>1.0</version>
</signature>
<ignores>
java.net.http.*
</ignores>
</configuration>
<executions>
<execution>
<id>ensure-java-1.8-class-library</id>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!--
This plugin is used to generate AOT metadata during tests so that it can be
compared against those in META-INF/native-image/org.kohsuke/github-api/*.
The tests are located in src/test/java/org.kohsuke.aot
-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<executions>
<execution>
<id>process-test-aot</id>
<goals>
<goal>process-test-aot</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
Expand Down Expand Up @@ -497,6 +492,16 @@
<version>${hamcrest.version}</version>
<scope>test</scope>
</dependency>
<!--
This plugin is used to start a spring boot application during tests
to generate AOT metadata. See also spring-boot-maven-plugin
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>${spring.boot.version}</version>
<scope>test</scope>
</dependency>
<!-- This is needed in order to force junit4 and JTH tests to use newer hamcrest version -->
<dependency>
<groupId>org.hamcrest</groupId>
Expand Down Expand Up @@ -528,6 +533,13 @@
<version>4.2.1</version>
<scope>test</scope>
</dependency>
<!-- junit vintage engine is used because junit4 and junit5 tests are required -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down
Loading

0 comments on commit aaa6cde

Please sign in to comment.