revert mise.toml java definition to unspecific 21 #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
# https://docs.github.com/en/actions/writing-workflows | |
name: Toolchain Verification | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
auto-generated: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: | | |
17 | |
21 | |
22 | |
- name: Cache maven artifacts | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.m2/repository | |
~/.m2/wrapper | |
key: ${{ runner.os }}-maven-auto-generated-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: "Remove actions/setup-java Toolchain" | |
run: | | |
cat ~/.m2/toolchains.xml | |
rm ~/.m2/toolchains.xml | |
stat ~/.m2/toolchains.xml | |
continue-on-error: true | |
- name: Configure Maven | |
run: cp -f .mvn/maven_ci.config .mvn/maven.config | |
- name: Inspect Toolchain | |
run: | | |
mvn --version | |
mvn toolchains:display-discovered-jdk-toolchains | |
stat ~/.m2/toolchains.xml | |
continue-on-error: true # the stat call will fail this step otherwise | |
- name: Build with Maven | |
run: | | |
mvn test | |
continue-on-error: true # make caching work https://github.com/actions/cache/issues/1317 | |
auto-generated-wrapper: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: | | |
17 | |
21 | |
22 | |
- name: Cache maven artifacts | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.m2/repository | |
~/.m2/wrapper | |
key: ${{ runner.os }}-maven-auto-generated-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: "Remove actions/setup-java Toolchain" | |
run: | | |
cat ~/.m2/toolchains.xml | |
rm ~/.m2/toolchains.xml | |
stat ~/.m2/toolchains.xml | |
continue-on-error: true | |
- name: Configure Maven | |
run: cp -f .mvn/maven_ci.config .mvn/maven.config | |
- name: Inspect Toolchain | |
run: | | |
./mvnw --version | |
./mvnw toolchains:display-discovered-jdk-toolchains | |
stat ~/.m2/toolchains.xml | |
continue-on-error: true # the stat call will fail this step otherwise | |
- name: Build with Maven | |
run: | | |
./mvnw test | |
continue-on-error: true # make caching work https://github.com/actions/cache/issues/1317 | |
self-managed: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: | | |
17 | |
21 | |
22 | |
- name: Cache maven artifacts | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.m2/repository | |
~/.m2/wrapper | |
key: ${{ runner.os }}-maven-self-managed-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Configure Maven | |
run: cp -f .mvn/maven_ci.config .mvn/maven.config | |
- name: Inspect Toolchain | |
run: | | |
mvn --version | |
mvn toolchains:display-discovered-jdk-toolchains | |
cat ~/.m2/toolchains.xml | |
- name: Build with Maven | |
run: | | |
mvn test | |
continue-on-error: true # make caching work https://github.com/actions/cache/issues/1317 | |
self-managed-wrapper: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: | | |
17 | |
21 | |
22 | |
- name: Cache maven artifacts | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.m2/repository | |
~/.m2/wrapper | |
key: ${{ runner.os }}-maven-self-managed-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Configure Maven | |
run: cp -f .mvn/maven_ci.config .mvn/maven.config | |
- name: Inspect Toolchain | |
run: | | |
./mvnw --version | |
./mvnw toolchains:display-discovered-jdk-toolchains | |
cat ~/.m2/toolchains.xml | |
- name: Build with Maven | |
run: | | |
./mvnw test | |
continue-on-error: true # make caching work https://github.com/actions/cache/issues/1317 |