Skip to content

Commit

Permalink
testing custom windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
lwluc committed Nov 10, 2023
1 parent a460287 commit 094944d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 16 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/native-image.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
name: GraalVM Native Image builds

on:
workflow_dispatch:
inputs:
TAG:
description: 'The tag to be built'
required: true
type: string
on: push

jobs:
build:
name: Optimize-to-xes on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
os: [windows-latest]
steps:
- uses: actions/checkout@v4

Expand All @@ -24,11 +18,14 @@ jobs:
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Build native-image
run: mvn -Pnative native:compile
name: Build native-image
- run: mvn -Pnative native:compile
- run: |
java -Dspring.aot.enabled=true -agentlib:native-image-agent=config-output-dir=./src/main/resources/META-INF/native-image -Doptimize.base-url="$BASE_URL" -Doptimize.report-id="$REPORT_ID" -Doptimize.client-id="$CLIENT_ID" -Doptimize.client-secret="$CLIENT_SECRET" -Dxes-mapping.base-path="target" -jar target/optimize-to-xes-*.jar
- run: mvn -Pnative native:compile

- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: optimize-to-xes-${{ matrix.os }}
path: target/optimize-to-xes*
path: target/optimize-to-xes*
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,18 @@ your development journey! 🧙‍♂️✨🏗️

# Find all reflection usages: A native-image folder will be places in the root of the project.
java -Dspring.aot.enabled=true \
-agentlib:native-image-agent=config-output-dir=./native-image \
-agentlib:native-image-agent=config-output-dir=./src/main/resources/META-INF/native-image \
-Doptimize.base-url='<base_url>' \
-Doptimize.reportId='<report_id' \
-Doptimize.clientId='<client_id>' \
-Doptimize.clientSecret='client_secret' \
-Doptimize.report-id='<report_id' \
-Doptimize.client-id='<client_id>' \
-Doptimize.client-secret='<client_secret>' \
-Dxes-mapping.base-path='target' \
-jar target/optimize-to-xes-<version>.jar

# Copy all the contents from the generated config folder to src/main/resources/META-INF/native-image
cp -a ./native-image src/main/resources/META-INF/

# Build the native image again with the extended information on the relfection
# Build the native image again with the extended information on the reflection
./mvnw clean native:compile -Pnative
```

Expand Down

0 comments on commit 094944d

Please sign in to comment.