-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (73 loc) · 3.23 KB
/
graalvm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: JMurmel Native Image builds
on:
push:
paths-ignore:
- CHANGES
- Dockerfile
- Dockerfile.distroless
- "**.md"
- "**.txt"
- "**.html"
- "**.lisp"
- "**.completions"
- "scribbles/**"
env:
JAVA_VERSION: 22
permissions:
contents: read
jobs:
build:
name: JMurmel Native on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-20.04]
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: graalvm/setup-graalvm@22cc13fe88ef133134b3798e128fb208df55e1f5 # v1
with:
distribution: 'graalvm'
java-version: ${{ env.JAVA_VERSION }}
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Restore Maven repo
id: restore-maven
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-graalvm-maven-${{ hashFiles('**/pom.xml') }}
- name: Build JMurmel
run: |
mvn -V -B clean package -pl lambda "-Djavac.target=${{ env.JAVA_VERSION }}" -DskipTests
mvn -V -B clean package -f graalvm/pom.xml "-Djavac.target=${{ env.JAVA_VERSION }}" -DskipTests
- name: Run native image Windows
if: runner.os == 'Windows'
run: |
copy samples.murmel-mlib\mlib.lisp .
native-image --no-fallback --initialize-at-build-time=io.github.jmurmel --initialize-at-run-time=io.github.jmurmel.InstallDir -H:IncludeResources="META-INF/.*" -H:ReflectionConfigurationFiles=./graalvm/src/main/graalvm/reflectconfig -H:DynamicProxyConfigurationFiles=./graalvm/src/main/graalvm/proxyconfig -H:SerializationConfigurationFiles=./graalvm/src/main/graalvm/serializationconfig -cp ./graalvm/target/unsupported.jar -jar ./lambda/target/jmurmel.jar
./jmurmel --version
- name: Run native image Linux
if: runner.os == 'Linux'
run: |
cp samples.murmel-mlib/mlib.lisp .
native-image --gc=G1 --no-fallback --initialize-at-build-time=io.github.jmurmel --initialize-at-run-time=io.github.jmurmel.InstallDir -H:IncludeResources="META-INF/.*" -H:ReflectionConfigurationFiles=./graalvm/src/main/graalvm/reflectconfig -H:DynamicProxyConfigurationFiles=./graalvm/src/main/graalvm/proxyconfig -H:SerializationConfigurationFiles=./graalvm/src/main/graalvm/serializationconfig -cp ./graalvm/target/unsupported.jar -jar ./lambda/target/jmurmel.jar
./jmurmel --version
- name: Save Maven repo
id: cache-maven
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ~/.m2/repository
key: ${{ steps.restore-maven.outputs.cache-primary-key }}
- name: Upload binaries, mlib and docs
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: jmurmel-native-${{ runner.os }}-${{ runner.arch }}
path: |
jmurmel
jmurmel.exe
mlib.lisp
murmel-langref.md
mlib.md
murmel-langref.html
mlib.html
LICENSE