diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 02f4cadd4..2fc79c854 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: - uses: gradle/actions/setup-gradle@v6 with: - gradle-version: 9.8.2 + gradle-version: 9.9.0 - run: gradle spotlessCheck --no-daemon @@ -35,7 +35,7 @@ jobs: - uses: gradle/actions/setup-gradle@v6 with: - gradle-version: 9.8.2 + gradle-version: 9.9.0 - name: scip-kotlin-analysis tests run: gradle :scip-kotlin-analysis:test --no-daemon @@ -49,23 +49,21 @@ jobs: - name: Build Dockerised CLI run: docker build -t ghcr.io/scip-code/scip-java:latest . - - name: Test repos + - name: Test Maven and Gradle fixtures shell: bash run: | - set -eu - check_repo() { - REPO=$1 - mkdir -p ".repos/$REPO" - git clone "https://github.com/$REPO.git" ".repos/$REPO" && cd ".repos/$REPO" && git submodule update --init + set -euo pipefail + for fixture in maven/basic gradle/kotlin2; do + repo_dir="$(mktemp -d "$RUNNER_TEMP/scip-java-docker.XXXXXX")" + cp -R "scip-java/src/test/resources/fixtures/$fixture/." "$repo_dir/" - docker run -v "$PWD/.repos/$REPO:/sources" -w /sources ghcr.io/scip-code/scip-java:latest scip-java index - file ".repos/$REPO/index.scip" || (echo "$REPO SCIP index doesn't exist!"; exit 1) - } - - sudo apt install parallel - export -f check_repo - - parallel -j4 check_repo ::: circe/circe indeedeng/iwf-java-sdk + echo "Indexing $fixture" + # Match the Kotlin fixture's JDK 17 toolchain without relying on fallback. + docker run --rm --env JVM_VERSION=17 \ + --mount "type=bind,source=$repo_dir,target=/sources" \ + -w /sources ghcr.io/scip-code/scip-java:latest scip-java index + test -s "$repo_dir/index.scip" + done ci-pass: if: always() diff --git a/bin/docker-setup.sh b/bin/docker-setup.sh index d36b05f97..e06922a50 100755 --- a/bin/docker-setup.sh +++ b/bin/docker-setup.sh @@ -5,7 +5,7 @@ COURSIER_VERSION=2.1.26 # renovate: datasource=maven depName=org.apache.maven:apache-maven versioning=maven MAVEN_VERSION=3.10.0 # renovate: datasource=gradle-version depName=gradle versioning=gradle -GRADLE_VERSION=9.8.2 +GRADLE_VERSION=9.9.0 # Use the upstream JVM launcher so the configured system trust store applies. curl -fLo /usr/local/bin/cs "https://github.com/coursier/coursier/releases/download/v${COURSIER_VERSION}/coursier"