Skip to content

Commit 5151dc2

Browse files
authored
Fix selective testing of native example tests by adding jvm version override (#4410)
Minimized in #4357, it appears the difference in behavior comes from different JVM versions being used during `selective.prepare` and `selective.{resolve,run}` phases
1 parent 2328172 commit 5151dc2

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/actions/post-build-selective/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ runs:
2121
- uses: actions/setup-node@v4
2222
with: { node-version: '22' }
2323

24+
- run: cat .mill-jvm-version
25+
shell: ${{ inputs.shell }}
26+
2427
- run: ./mill -i -k selective.resolve ${{ inputs.millargs }}
2528
shell: ${{ inputs.shell }}
2629

.github/actions/pre-build-setup/action.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,7 @@ runs:
6262
name: ${{ inputs.os }}-selective-execution-artifact
6363
include-hidden-files: true
6464

65-
- uses: actions/checkout@v4
65+
- uses: actions/checkout@v4
66+
67+
- run: echo temurin:${{ inputs.java-version }} > .mill-jvm-version
68+
shell: bash

.github/workflows/run-tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ jobs:
139139
millargs: "contrib.__.test"
140140
install-android-sdk: false
141141

142-
- java-version: 17
143-
millargs: "example.javalib.__.local.server.test"
142+
# Run this one using `.native` as a smoketest. Also make sure the java-version
143+
# is the same as that used in the `build-linux` job to avoid diverging code
144+
# hashes (https://github.com/com-lihaoyi/mill/pull/4410)
145+
- java-version: 11
146+
millargs: "example.javalib.__.native.server.test"
144147
install-android-sdk: false
145148

146149
- java-version: 17

0 commit comments

Comments
 (0)