Skip to content

Commit 7091b0e

Browse files
authored
Add Maven Workflow
1 parent b7c1e84 commit 7091b0e

1 file changed

Lines changed: 100 additions & 0 deletions

File tree

.github/workflows/maven.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Java CI with Maven
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
Linux_x64:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v7
14+
- name: Set up JDK 26
15+
uses: actions/setup-java@v5
16+
with:
17+
java-version: '26'
18+
distribution: 'temurin'
19+
cache: maven
20+
- name: Build with Maven
21+
run: mvn -B package --file pom.xml
22+
- name: Execute the HelloBox2D example
23+
run: |
24+
$JAVA_HOME/bin/java --enable-preview --enable-native-access=ALL-UNNAMED \
25+
-cp target/Box2D-JavaFFM-3.1.1-jar-with-dependencies.jar \
26+
volucris.bindings.box2d.HelloBox2D
27+
28+
Linux_Arm64:
29+
runs-on: ubuntu-24.04-arm
30+
steps:
31+
- uses: actions/checkout@v7
32+
- name: Set up JDK 26
33+
uses: actions/setup-java@v5
34+
with:
35+
java-version: '26'
36+
distribution: 'temurin'
37+
cache: maven
38+
- name: Build with Maven
39+
run: mvn -B package --file pom.xml
40+
- name: Execute the HelloBox2D example
41+
run: |
42+
$JAVA_HOME/bin/java --enable-preview --enable-native-access=ALL-UNNAMED \
43+
-cp target/Box2D-JavaFFM-3.1.1-jar-with-dependencies.jar \
44+
volucris.bindings.box2d.HelloBox2D
45+
46+
macOS_Arm64:
47+
runs-on: macos-26
48+
steps:
49+
- uses: actions/checkout@v7
50+
- name: Set up JDK 26
51+
uses: actions/setup-java@v5
52+
with:
53+
java-version: '26'
54+
distribution: 'temurin'
55+
cache: maven
56+
- name: Build with Maven
57+
run: mvn -B package --file pom.xml
58+
- name: Execute the HelloBox2D example
59+
run: |
60+
$JAVA_HOME/bin/java --enable-preview --enable-native-access=ALL-UNNAMED \
61+
-cp target/Box2D-JavaFFM-3.1.1-jar-with-dependencies.jar \
62+
volucris.bindings.box2d.HelloBox2D
63+
64+
macOS_x64:
65+
runs-on: macos-26-intel
66+
steps:
67+
- uses: actions/checkout@v7
68+
- name: Set up JDK 26
69+
uses: actions/setup-java@v5
70+
with:
71+
java-version: '26'
72+
distribution: 'temurin'
73+
cache: maven
74+
- name: Build with Maven
75+
run: mvn -B package --file pom.xml
76+
- name: Execute the HelloBox2D example
77+
run: |
78+
$JAVA_HOME/bin/java --enable-preview --enable-native-access=ALL-UNNAMED \
79+
-cp target/Box2D-JavaFFM-3.1.1-jar-with-dependencies.jar \
80+
volucris.bindings.box2d.HelloBox2D
81+
82+
Windows_x64:
83+
runs-on: windows-2025
84+
steps:
85+
- uses: actions/checkout@v7
86+
- name: Set up JDK 26
87+
uses: actions/setup-java@v5
88+
with:
89+
java-version: '26'
90+
distribution: 'oracle'
91+
cache: maven
92+
- name: Build with Maven
93+
run: mvn -B package --file pom.xml
94+
shell: bash
95+
- name: Execute the HelloWorld app
96+
run: |
97+
$JAVA_HOME/bin/java --enable-preview --enable-native-access=ALL-UNNAMED \
98+
-cp target/Box2D-JavaFFM-3.1.1-jar-with-dependencies.jar \
99+
volucris.bindings.box2d.HelloBox2D
100+
shell: bash

0 commit comments

Comments
 (0)