Skip to content

Commit

Permalink
Fix selective testing of native example tests by adding jvm version o…
Browse files Browse the repository at this point in the history
…verride (#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
  • Loading branch information
lihaoyi authored Jan 28, 2025
1 parent 2328172 commit 5151dc2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/actions/post-build-selective/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ runs:
- uses: actions/setup-node@v4
with: { node-version: '22' }

- run: cat .mill-jvm-version
shell: ${{ inputs.shell }}

- run: ./mill -i -k selective.resolve ${{ inputs.millargs }}
shell: ${{ inputs.shell }}

Expand Down
5 changes: 4 additions & 1 deletion .github/actions/pre-build-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ runs:
name: ${{ inputs.os }}-selective-execution-artifact
include-hidden-files: true

- uses: actions/checkout@v4
- uses: actions/checkout@v4

- run: echo temurin:${{ inputs.java-version }} > .mill-jvm-version
shell: bash
7 changes: 5 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,11 @@ jobs:
millargs: "contrib.__.test"
install-android-sdk: false

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

- java-version: 17
Expand Down

0 comments on commit 5151dc2

Please sign in to comment.