From 8a109aa3e4990407dd443bdd4d92e4d5733aac3a Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Wed, 26 Aug 2026 16:03:28 +0000 Subject: [PATCH] refactor: consolidate mise task tools Signed-off-by: Gregor Zeitlinger --- .github/renovate-tracked-deps.json | 15 ----- .github/renovate.json5 | 15 ++++- .../workflows/jmx-exporter-compatibility.yml | 4 +- .../workflows/micrometer-compatibility.yml | 4 +- .github/workflows/native-tests.yml | 3 +- .mise/envs/jmx-exporter/mise.toml | 10 ---- .mise/envs/micrometer/mise.toml | 10 ---- .mise/envs/native/mise.toml | 10 ---- CONTRIBUTING.md | 2 +- mise.lock | 56 +++++++++++++++++++ mise.toml | 31 ++++++++-- 11 files changed, 98 insertions(+), 62 deletions(-) delete mode 100644 .mise/envs/jmx-exporter/mise.toml delete mode 100644 .mise/envs/micrometer/mise.toml delete mode 100644 .mise/envs/native/mise.toml diff --git a/.github/renovate-tracked-deps.json b/.github/renovate-tracked-deps.json index 8045667c1..468a293f1 100644 --- a/.github/renovate-tracked-deps.json +++ b/.github/renovate-tracked-deps.json @@ -225,21 +225,6 @@ "ubuntu" ] }, - ".mise/envs/jmx-exporter/mise.toml": { - "mise": [ - "java" - ] - }, - ".mise/envs/micrometer/mise.toml": { - "mise": [ - "java" - ] - }, - ".mise/envs/native/mise.toml": { - "mise": [ - "java" - ] - }, ".mvn/wrapper/maven-wrapper.properties": { "maven-wrapper": [ "maven" diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 8663fe9ec..6e659caac 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -36,28 +36,37 @@ matchDepNames: [ 'java', ], + matchDepTypes: [ + 'tools', + ], groupName: 'java temurin', additionalBranchPrefix: 'temurin-', }, { matchFileNames: [ - '.mise/envs/native/mise.toml', + 'mise.toml', ], matchDepNames: [ 'java', ], + matchDepTypes: [ + 'task-native-test-tools', + ], groupName: 'java graalvm', additionalBranchPrefix: 'graalvm-', }, { description: 'Compat tests pin an LTS JDK the upstream release supports; block major JDK bumps that would break those builds', matchFileNames: [ - '.mise/envs/jmx-exporter/mise.toml', - '.mise/envs/micrometer/mise.toml', + 'mise.toml', ], matchDepNames: [ 'java', ], + matchDepTypes: [ + 'task-jmx-exporter:compat-test-tools', + 'task-micrometer:compat-test-tools', + ], matchUpdateTypes: [ 'major', ], diff --git a/.github/workflows/jmx-exporter-compatibility.yml b/.github/workflows/jmx-exporter-compatibility.yml index af889e8c6..8d06bc88a 100644 --- a/.github/workflows/jmx-exporter-compatibility.yml +++ b/.github/workflows/jmx-exporter-compatibility.yml @@ -26,15 +26,13 @@ jobs: with: version: v2026.8.11 sha256: 3d825b8341925abb398fba6fd8dcd7d6e92ade6820d892da62992e0765638e66 - working_directory: .mise/envs/jmx-exporter - name: Cache local Maven repository uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - name: Run JMX Exporter compatibility tests - working-directory: .mise/envs/jmx-exporter env: JMX_EXPORTER_REPOSITORY: ${{ inputs.repository || 'prometheus/jmx_exporter' }} JMX_EXPORTER_REF: ${{ inputs.ref }} - run: mise compat-test + run: mise run jmx-exporter:compat-test diff --git a/.github/workflows/micrometer-compatibility.yml b/.github/workflows/micrometer-compatibility.yml index ff04481b7..e2bfa10a5 100644 --- a/.github/workflows/micrometer-compatibility.yml +++ b/.github/workflows/micrometer-compatibility.yml @@ -34,18 +34,16 @@ jobs: with: version: v2026.8.11 sha256: 3d825b8341925abb398fba6fd8dcd7d6e92ade6820d892da62992e0765638e66 - working_directory: .mise/envs/micrometer - name: Cache local Maven repository uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ~/.m2/repository key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - name: Run Micrometer compatibility tests - working-directory: .mise/envs/micrometer env: MICROMETER_REPOSITORY: ${{ matrix.repository }} MICROMETER_REF: ${{ matrix.ref }} - run: mise compat-test + run: mise run micrometer:compat-test micrometer-compatibility: name: micrometer-compatibility diff --git a/.github/workflows/native-tests.yml b/.github/workflows/native-tests.yml index 62e861cba..c572e0195 100644 --- a/.github/workflows/native-tests.yml +++ b/.github/workflows/native-tests.yml @@ -17,6 +17,5 @@ jobs: with: version: v2026.8.11 sha256: 3d825b8341925abb398fba6fd8dcd7d6e92ade6820d892da62992e0765638e66 - working_directory: .mise/envs/native - name: Run native tests - run: mise //.mise/envs/native:native-test + run: mise run native-test diff --git a/.mise/envs/jmx-exporter/mise.toml b/.mise/envs/jmx-exporter/mise.toml deleted file mode 100644 index a04b4948c..000000000 --- a/.mise/envs/jmx-exporter/mise.toml +++ /dev/null @@ -1,10 +0,0 @@ -# The pinned JMX Exporter release does not build on the primary JDK (Java 25): -# its spotless google-java-format predates JDK 25 support. Build it under an LTS -# JDK the release supports instead. -[tools] -java = "temurin-21.0.11+10.0.LTS" - -[tasks.compat-test] -description = "Run JMX Exporter compatibility tests under a supported JDK" -dir = "../../.." -run = "python3 .mise/tasks/jmx-exporter/test.py" diff --git a/.mise/envs/micrometer/mise.toml b/.mise/envs/micrometer/mise.toml deleted file mode 100644 index e5318c1d6..000000000 --- a/.mise/envs/micrometer/mise.toml +++ /dev/null @@ -1,10 +0,0 @@ -# The pinned Micrometer release does not build on the primary JDK (Java 25): -# its bundled Kotlin compiler predates JDK 25 support. Build it under an LTS JDK -# the release supports instead. -[tools] -java = "temurin-21.0.11+10.0.LTS" - -[tasks.compat-test] -description = "Run Micrometer compatibility tests under a supported JDK" -dir = "../../.." -run = "python3 .mise/tasks/micrometer/test.py" diff --git a/.mise/envs/native/mise.toml b/.mise/envs/native/mise.toml deleted file mode 100644 index b64367044..000000000 --- a/.mise/envs/native/mise.toml +++ /dev/null @@ -1,10 +0,0 @@ -[tools] -java = "oracle-graalvm-25.0.1" - -[tasks.native-test] -depends = "//:build" -# Native Test uses Surefire, so explicitly select the Failsafe-named test class. -run = ''' -cd "$MISE_MONOREPO_ROOT/integration-tests/it-spring-boot-smoke-test" -"$MISE_MONOREPO_ROOT/mvnw" test -PnativeTest -Dtest=ApplicationIT -''' diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1b42bfaf4..49d1dc24f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -90,7 +90,7 @@ If you're getting errors when running tests: ### Running native tests ```shell -mise --cd .mise/envs/native run native-test +mise run native-test ``` ### Avoid failures while running tests diff --git a/mise.lock b/mise.lock index d7032d571..61a42bca9 100644 --- a/mise.lock +++ b/mise.lock @@ -485,6 +485,62 @@ url = "https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25.0 checksum = "sha256:709312cd0420296d9b9de917fe6e28a5b979e875ee5ab91783fb79bcd5857235" url = "https://github.com/adoptium/temurin25-binaries/releases/download/jdk-25.0.3%2B9/OpenJDK25U-jdk_x64_windows_hotspot_25.0.3_9.zip" +[[tools.java]] +version = "temurin-21.0.11+10.0.LTS" +backend = "core:java" + +[tools.java."platforms.linux-arm64"] +checksum = "sha256:8d498ec88e1c1989fab95c6784240ab92d011e29c54d20a3f9c324b13476f9ad" +url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.11%2B10/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.11_10.tar.gz" + +[tools.java."platforms.linux-arm64-musl"] +checksum = "sha256:c8d63598d1dc0a656033515ed258bd6db37506a05407d9f65cd23b95c21027b5" +url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.11%2B10/OpenJDK21U-jdk_aarch64_alpine-linux_hotspot_21.0.11_10.tar.gz" + +[tools.java."platforms.linux-x64"] +checksum = "sha256:4b2220e232a97997b436ca6ab15cbf70171ecff52958a46159dfa5a8c44ca4de" +url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.11%2B10/OpenJDK21U-jdk_x64_linux_hotspot_21.0.11_10.tar.gz" + +[tools.java."platforms.linux-x64-musl"] +checksum = "sha256:38bfdcef1e4b45de2ec222047ac79c76bea75d4d7406a310e26cfa236763f05f" +url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.11%2B10/OpenJDK21U-jdk_x64_alpine-linux_hotspot_21.0.11_10.tar.gz" + +[tools.java."platforms.macos-arm64"] +checksum = "sha256:6ebcf221c9b41507b14c098e93c6ead6440b8d9bd154f8ec666c4c73abbdb201" +url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.11%2B10/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.11_10.tar.gz" + +[tools.java."platforms.macos-x64"] +checksum = "sha256:34180eb03e6d207c388cce3da668f6cc7cd7508c185c24782fadac2c9c0e66f9" +url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.11%2B10/OpenJDK21U-jdk_x64_mac_hotspot_21.0.11_10.tar.gz" + +[tools.java."platforms.windows-x64"] +checksum = "sha256:d3625e7cadf23787ea540229544b6e2ab494b3b54da1801879e583e1dfee0a64" +url = "https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.11%2B10/OpenJDK21U-jdk_x64_windows_hotspot_21.0.11_10.zip" + +[[tools.java]] +version = "oracle-graalvm-25.0.1" +backend = "core:java" + +[tools.java."platforms.linux-arm64"] +checksum = "sha256:edd77565c76570a6df5f38e53d54524102f2c1b1cf74eebd9f51e7fc19f667cd" +url = "https://download.oracle.com/graalvm/25/archive/graalvm-jdk-25.0.1_linux-aarch64_bin.tar.gz" + +[tools.java."platforms.linux-x64"] +checksum = "sha256:d4ab02ba1029e639f03374fdf91c242e1d0d49079880e1af1932ea7b7c431837" +url = "https://download.oracle.com/graalvm/25/archive/graalvm-jdk-25.0.1_linux-x64_bin.tar.gz" + +[tools.java."platforms.macos-arm64"] +checksum = "sha256:19dfd49ad112e6e6c2bdedc507c6859bf21294fa4c164f1be670d469c65b7993" +url = "https://download.oracle.com/graalvm/25/archive/graalvm-jdk-25.0.1_macos-aarch64_bin.tar.gz" + +[tools.java."platforms.macos-x64"] +checksum = "sha256:a762ca1d9a163e32790b9286f3af4c16369729ff27999d8dbab60d7be16cff2f" +url = "https://download.oracle.com/graalvm/25/archive/graalvm-jdk-25.0.1_macos-x64_bin.tar.gz" + +[tools.java."platforms.windows-x64"] +checksum = "sha256:5398592ecdf8f47f4b481896e1e63cbfff4cb8e0ba61538526e3b3795b1a85e5" +url = "https://download.oracle.com/graalvm/25/archive/graalvm-jdk-25.0.1_windows-x64_bin.zip" + [[tools.lychee]] version = "0.24.2" backend = "aqua:lycheeverse/lychee" diff --git a/mise.toml b/mise.toml index 3bf69774e..fd614b77d 100644 --- a/mise.toml +++ b/mise.toml @@ -1,8 +1,3 @@ -monorepo_root = true - -[monorepo] -config_roots = [".mise/envs/*"] - [tools] "aqua:grafana/gcx" = "v1.2.0" "aqua:grafana/oats" = "0.10.0" @@ -73,6 +68,32 @@ run = "./mvnw verify" description = "build all modules without tests" run = "./mvnw install -DskipTests -Dcoverage.skip=true" +[tasks.native-test] +description = "Run GraalVM native tests" +depends = "build" +tools.java = "oracle-graalvm-25.0.1" +# Native Test uses Surefire, so explicitly select the Failsafe-named test class. +run = ''' +cd "$MISE_CONFIG_ROOT/integration-tests/it-spring-boot-smoke-test" +"$MISE_CONFIG_ROOT/mvnw" test -PnativeTest -Dtest=ApplicationIT +''' + +[tasks."jmx-exporter:compat-test"] +description = "Run JMX Exporter compatibility tests under a supported JDK" +# The pinned JMX Exporter release does not build on the primary JDK (Java 25): +# its spotless google-java-format predates JDK 25 support. Build it under an LTS +# JDK the release supports instead. +tools.java = "temurin-21.0.11+10.0.LTS" +run = "python3 .mise/tasks/jmx-exporter/test.py" + +[tasks."micrometer:compat-test"] +description = "Run Micrometer compatibility tests under a supported JDK" +# The pinned Micrometer release does not build on the primary JDK (Java 25): +# its bundled Kotlin compiler predates JDK 25 support. Build it under an LTS JDK +# the release supports instead. +tools.java = "temurin-21.0.11+10.0.LTS" +run = "python3 .mise/tasks/micrometer/test.py" + [tasks."api-diff"] description = "Compare published API against the japicmp baseline and refresh docs/apidiffs" run = """