Skip to content

Commit 95bae1a

Browse files
committed
Download jextract using Maven for GitHub actions to work
1 parent e631589 commit 95bae1a

File tree

4 files changed

+87
-12
lines changed

4 files changed

+87
-12
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @bahaa

.github/dependabot.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "maven"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
12+
13+
- package-ecosystem: "github-actions"
14+
directory: "/"
15+
schedule:
16+
interval: "daily"
17+

.github/workflows/maven.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,33 @@
88

99
name: Java CI with Maven
1010

11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
1115
on:
16+
workflow_dispatch:
1217
push:
1318
branches: [ "main" ]
1419
pull_request:
15-
branches: [ "main" ]
20+
branches: [ "main", "releases/**" ]
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+
cancel-in-progress: true
1625

1726
jobs:
1827
build:
1928

2029
runs-on: ubuntu-latest
2130

2231
steps:
23-
- uses: actions/checkout@v4
24-
- name: Set up JDK 25
25-
uses: actions/setup-java@v4
26-
with:
27-
java-version: '25'
28-
distribution: 'liberica'
29-
cache: maven
30-
- name: Build with Maven
31-
run: mvn -B package --file pom.xml
32+
- uses: actions/checkout@v4
33+
- name: Set up JDK 25
34+
uses: actions/setup-java@v4
35+
with:
36+
java-version: '25'
37+
distribution: 'liberica'
38+
cache: maven
39+
- name: Build with Maven
40+
run: mvn -B package --file pom.xml -Plinux-x86

wgpu-native/pom.xml

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,58 @@
1515
<wgpu.native.download.base.url>
1616
https://github.com/gfx-rs/wgpu-native/releases/download/${version.wgpu-native}
1717
</wgpu.native.download.base.url>
18+
<jextract.executable>jextract</jextract.executable>
1819
</properties>
1920

21+
<profiles>
22+
<profile>
23+
<id>linux-x86</id>
24+
<properties>
25+
<jextract.executable>${project.build.directory}/jextract-25/bin/jextract</jextract.executable>
26+
</properties>
27+
<build>
28+
<plugins>
29+
<plugin>
30+
<groupId>io.github.download-maven-plugin</groupId>
31+
<artifactId>download-maven-plugin</artifactId>
32+
<version>${version.download-maven-plugin}</version>
33+
<configuration>
34+
<unpack>true</unpack>
35+
<failOnError>true</failOnError>
36+
<alwaysVerifyChecksum>true</alwaysVerifyChecksum>
37+
</configuration>
38+
<executions>
39+
<execution>
40+
<id>download-wgpu-headers</id>
41+
<phase>generate-sources</phase>
42+
<goals>
43+
<goal>wget</goal>
44+
</goals>
45+
<configuration>
46+
<url>
47+
https://download.java.net/java/early_access/jextract/25/2/openjdk-25-jextract+2-4_linux-x64_bin.tar.gz
48+
</url>
49+
<includes>**</includes>
50+
<outputDirectory>${build.directory}/</outputDirectory>
51+
<sha256>d0cc481abc1adb16fb9514e1c5e0bfc08d38c29228bece667fb5054ceaffaa42</sha256>
52+
</configuration>
53+
</execution>
54+
</executions>
55+
</plugin>
56+
</plugins>
57+
</build>
58+
</profile>
59+
</profiles>
60+
2061
<build>
62+
<extensions>
63+
<extension>
64+
<groupId>kr.motd.maven</groupId>
65+
<artifactId>os-maven-plugin</artifactId>
66+
<version>1.7.1</version>
67+
</extension>
68+
</extensions>
2169
<plugins>
22-
<!-- Download wgpu dll/so/dylib and header files -->
2370
<plugin>
2471
<groupId>io.github.download-maven-plugin</groupId>
2572
<artifactId>download-maven-plugin</artifactId>
@@ -36,6 +83,7 @@
3683
</fileMappers>
3784
</configuration>
3885
<executions>
86+
<!-- Download wgpu dll/so/dylib and header files -->
3987
<execution>
4088
<id>download-wgpu-headers</id>
4189
<phase>generate-sources</phase>
@@ -95,7 +143,7 @@
95143
<artifactId>jextract-maven-plugin</artifactId>
96144
<version>${version.jextract-maven-plugin}</version>
97145
<configuration>
98-
<executable>jextract</executable>
146+
<executable>${jextract.executable}</executable>
99147
</configuration>
100148
<executions>
101149
<execution>

0 commit comments

Comments
 (0)