From 94ddb1807d123c608ddf7a94df454bf6146cd015 Mon Sep 17 00:00:00 2001 From: Vladislav Kuzmin <67874880+principalwater@users.noreply.github.com> Date: Sun, 29 Nov 2026 17:15:32 +0300 Subject: [PATCH] fix(ci): cache Maven launch classpath artifacts (#6565) The Rust job's Maven cache only held what resources:resources and compiler:compile resolve, so the Java launch and rebuild tests on GitHub-hosted runners missed artifacts (#6561). The preparation step now also runs clean and fetches slf4j-api 1.7.36 with maven-dependency-plugin 3.8.1 (both pinned, from Maven Central), and the cache key gets a v2 prefix so the incomplete caches are not restored. Co-authored-by: principalwater <67874880+principalwater@users.noreply.github.com> --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 246d642d88..60765f04f1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,7 +165,7 @@ jobs: uses: actions/cache/restore@v5 with: path: ${{ runner.temp }}/jbuild-maven-repository - key: jbuild-maven-${{ runner.os }}-${{ hashFiles('crates/ide-build/tests/fixtures/jbuild-maven/**/pom.xml') }} + key: jbuild-maven-v2-${{ runner.os }}-${{ hashFiles('crates/ide-build/tests/fixtures/jbuild-maven/**/pom.xml') }} - name: Prepare Maven artifacts for Java build tests id: jbuild-maven if: runner.environment == 'github-hosted' @@ -182,10 +182,13 @@ jobs: if [[ "$CACHE_HIT" == true ]]; then exit 0 fi - # The IDE also reads the compiler plugin descriptor when it builds the Maven model. + # The Java tests read the compiler descriptor and run Maven launch and rebuild. for delay in 0 10 30; do sleep "$delay" - if mvn -B -ntp -U -N -f crates/ide-build/tests/fixtures/jbuild-maven/pom.xml resources:resources compiler:compile; then + if mvn -B -ntp -U -N -f crates/ide-build/tests/fixtures/jbuild-maven/pom.xml \ + clean resources:resources compiler:compile \ + org.apache.maven.plugins:maven-dependency-plugin:3.8.1:get \ + -Dartifact=org.slf4j:slf4j-api:1.7.36; then echo "prepared=true" >> "$GITHUB_OUTPUT" exit 0 fi