Skip to content

Commit 38c36ee

Browse files
ci: build the SDK on JDK 25; fix musl cdylib; gate macOS native builds
- tests.yml: build+test on a single JDK 25 (the jextract Gradle plugin needs a JDK 21+ daemon and the FFM path needs the JDK 25 toolchain). Cross-JRE runtime coverage (17/21/25) is the integration container matrix. Bump test-javadocs to 25. - All building workflows now use JDK 25 (docker, integration build, release, release-docs, dependency-submission). - native.yaml: musl targets build the cdylib with -C target-feature=-crt-static (musl is static-by-default and otherwise can't produce a .so). - native.yaml: macOS native builds only run on main, release/* and tags (expensive runners); a temporary head_ref clause keeps them on for the shared-core-jni PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 2cc1296 commit 38c36ee

7 files changed

Lines changed: 39 additions & 19 deletions

File tree

.github/workflows/dependency-submission.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/setup-java@v4
1818
with:
1919
distribution: 'temurin'
20-
java-version: 17
20+
java-version: 25
2121
- name: Install Rust toolchain
2222
uses: actions-rust-lang/setup-rust-toolchain@v1
2323
- name: Generate and submit dependency graph

.github/workflows/docker.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
uses: actions/setup-java@v4
3333
with:
3434
distribution: 'temurin'
35-
java-version: '21'
35+
java-version: '25'
3636

3737
- name: Setup Gradle
3838
uses: gradle/actions/setup-gradle@v4

.github/workflows/integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
uses: actions/setup-java@v4
124124
with:
125125
distribution: 'temurin'
126-
java-version: '21'
126+
java-version: '25'
127127

128128
- name: Setup Gradle
129129
if: ${{ inputs.serviceImage == '' }}

.github/workflows/native.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,46 @@ jobs:
1717
name: "Build native (${{ matrix.target }})"
1818
runs-on: ${{ matrix.runner }}
1919
timeout-minutes: 30
20+
# Linux targets always build. macOS runners are expensive, so they only build on main, release
21+
# branches and tags (where the release artifacts are assembled).
22+
# TODO(shared-core-jni): the last clause keeps macOS builds on for this PR for testing; remove
23+
# it before merging.
24+
if: >-
25+
${{ !startsWith(matrix.runner, 'macos')
26+
|| github.ref == 'refs/heads/main'
27+
|| startsWith(github.ref, 'refs/heads/release')
28+
|| startsWith(github.ref, 'refs/tags/')
29+
|| github.head_ref == 'shared-core-jni' }}
2030
strategy:
2131
fail-fast: false
2232
matrix:
2333
include:
2434
- target: x86_64-unknown-linux-gnu
2535
runner: ubuntu-latest
2636
cross: false
37+
rustflags: ""
2738
- target: aarch64-unknown-linux-gnu
2839
runner: ubuntu-latest
2940
cross: true
41+
rustflags: ""
42+
# musl is statically linked by default, which can't produce a cdylib (.so); disabling
43+
# crt-static makes the target dynamically linkable so the shared library can be built.
3044
- target: x86_64-unknown-linux-musl
3145
runner: ubuntu-latest
3246
cross: true
47+
rustflags: "-C target-feature=-crt-static"
3348
- target: aarch64-unknown-linux-musl
3449
runner: ubuntu-latest
3550
cross: true
51+
rustflags: "-C target-feature=-crt-static"
3652
- target: x86_64-apple-darwin
3753
runner: macos-13
3854
cross: false
55+
rustflags: ""
3956
- target: aarch64-apple-darwin
4057
runner: macos-14
4158
cross: false
59+
rustflags: ""
4260
steps:
4361
- uses: actions/checkout@v4
4462

@@ -53,6 +71,9 @@ jobs:
5371

5472
- name: Build cdylib
5573
working-directory: sdk-core/src/main/rust
74+
env:
75+
# `cross` forwards RUSTFLAGS into the build container.
76+
RUSTFLAGS: ${{ matrix.rustflags }}
5677
run: |
5778
if [ "${{ matrix.cross }}" = "true" ]; then
5879
cross build --release --target ${{ matrix.target }}

.github/workflows/release-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/setup-java@v4
2929
with:
3030
distribution: 'temurin'
31-
java-version: '21'
31+
java-version: '25'
3232
- name: Setup Gradle
3333
uses: gradle/actions/setup-gradle@v4
3434
- name: Install Rust toolchain

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
timeout-minutes: 20
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Set up JDK ${{ matrix.java }}
15-
uses: actions/setup-java@v3
14+
- name: Set up JDK 25
15+
uses: actions/setup-java@v4
1616
with:
17-
java-version: 17
18-
distribution: 'adopt'
17+
java-version: '25'
18+
distribution: 'temurin'
1919

2020
- name: Setup Gradle
2121
uses: gradle/actions/setup-gradle@v4

.github/workflows/tests.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,19 @@ on:
99

1010
jobs:
1111
build-and-test:
12-
name: Build and test (Java ${{ matrix.java }})
12+
name: Build and test
1313
runs-on: warp-ubuntu-latest-x64-4x
1414
timeout-minutes: 10
15-
strategy:
16-
fail-fast: false
17-
matrix:
18-
java: [ 17, 21, 25 ]
1915
steps:
2016
- uses: actions/checkout@v4
21-
- name: Set up JDK ${{ matrix.java }}
22-
uses: actions/setup-java@v3
17+
# The SDK is built with JDK 25: the jextract Gradle plugin requires the Gradle daemon to run
18+
# on JDK 21+, and the FFM/Panama path needs the JDK 25 toolchain. Cross-JRE (17/21/25) runtime
19+
# coverage is provided by the integration test container matrix (integration.yaml).
20+
- name: Set up JDK 25
21+
uses: actions/setup-java@v4
2322
with:
24-
java-version: ${{ matrix.java }}
25-
distribution: 'adopt'
23+
java-version: '25'
24+
distribution: 'temurin'
2625

2726
- name: Setup Gradle
2827
uses: gradle/actions/setup-gradle@v4
@@ -40,7 +39,7 @@ jobs:
4039
if: always()
4140
uses: actions/upload-artifact@v4
4241
with:
43-
name: Test results (Java ${{ matrix.java }})
42+
name: Test results
4443
path: "**/test-results/test/*.xml"
4544

4645
test-javadocs:
@@ -54,7 +53,7 @@ jobs:
5453
# We test with same Java version and distribution used by the Docs script
5554
# https://github.com/restatedev/documentation/blob/main/.github/workflows/pre-release.yml
5655
distribution: 'temurin'
57-
java-version: '21'
56+
java-version: '25'
5857
- name: Setup Gradle
5958
uses: gradle/actions/setup-gradle@v4
6059
- name: Install Rust toolchain

0 commit comments

Comments
 (0)