Skip to content

Commit

Permalink
Add Doc for GraalVM support
Browse files Browse the repository at this point in the history
  • Loading branch information
linghengqian committed Sep 14, 2023
1 parent aa4be56 commit 315fb7e
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 4 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/graalvm-ce-nativetest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
build:
strategy:
matrix:
java: [ '17.0.8' ]
os: [ 'windows-latest', 'ubuntu-latest' ]
graalvm: [ '17.0.8' ]
os: [ 'ubuntu-latest' ]
runs-on: ${{ matrix.os }}
steps:
- name: Configure Git
Expand All @@ -48,11 +48,13 @@ jobs:
- name: Set up GraalVM CE ${{ matrix.java }}
uses: graalvm/setup-graalvm@v1
with:
java-version: ${{ matrix.java }}
java-version: ${{ matrix.graalvm }}
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'maven'
- name: Build NativeTest with Maven
continue-on-error: true
# TODO
# ./mvnw -PgenerateMetadata -DskipNativeTests -e -T1C -B clean test native:metadata-copy
run: |
./mvnw -PnativeTestInElasticJob -T1C -B -e clean test
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
</plugin>
</plugins>
</build>
</project>
</project>
62 changes: 62 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,68 @@
</pluginManagement>
</build>
</profile>
<profile>
<id>generateMetadata</id>
<properties>
<java.version>17</java.version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>org.apache.shardingsphere.elasticjob.lite.reachability.metadata.fixture.**</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>${native-maven-plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>build-native</id>
<goals>
<goal>compile-no-fork</goal>
</goals>
<phase>package</phase>
</execution>
<execution>
<id>test-native</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<agent>
<enabled>true</enabled>
<defaultMode>Conditional</defaultMode>
<modes>
<conditional>
<userCodeFilterPath>${user.dir}/elasticjob-lite/elasticjob-lite-reachability-metadata/user-code-filter-elasticjob-lite-core.json</userCodeFilterPath>
<extraFilterPath>${user.dir}/elasticjob-lite/elasticjob-lite-reachability-metadata/extra-filter.json</extraFilterPath>
<parallel>true</parallel>
</conditional>
</modes>
<metadataCopy>
<disabledStages>
<stage>main</stage>
</disabledStages>
<merge>false</merge>
<outputDirectory>${user.dir}/elasticjob-lite/elasticjob-lite-reachability-metadata/src/main/resources/META-INF/native-image/org.apache.shardingsphere.elasticjob/elasticjob-lite-core</outputDirectory>
</metadataCopy>
</agent>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
<profile>
<id>nativeTestInElasticJob</id>
<properties>
Expand Down

0 comments on commit 315fb7e

Please sign in to comment.