Merge branch 'main' into main
This commit is contained in:
commit
37af9d91bf
|
@ -21,7 +21,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -46,7 +46,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
needs: gradle-save
|
needs: gradle-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -70,7 +70,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -93,7 +93,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
needs: maven-save
|
needs: maven-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -121,7 +121,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -132,17 +132,21 @@ jobs:
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
java-version: '11'
|
java-version: '11'
|
||||||
cache: sbt
|
cache: sbt
|
||||||
|
- name: Setup SBT
|
||||||
|
if: matrix.os == 'macos-13'
|
||||||
|
run: |
|
||||||
|
echo ""Installing SBT...""
|
||||||
|
brew install sbt
|
||||||
- name: Create files to cache
|
- name: Create files to cache
|
||||||
run: sbt update
|
run: sbt update
|
||||||
|
|
||||||
- name: Check files to cache on macos-latest
|
- name: Check files to cache on macos-latest
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-13'
|
||||||
run: |
|
run: |
|
||||||
if [ ! -d ~/Library/Caches/Coursier ]; then
|
if [ ! -d ~/Library/Caches/Coursier ]; then
|
||||||
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check files to cache on windows-latest
|
- name: Check files to cache on windows-latest
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
|
@ -150,7 +154,6 @@ jobs:
|
||||||
echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
|
echo "::error::The ~/AppData/Local/Coursier/Cache directory does not exist unexpectedly"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Check files to cache on ubuntu-latest
|
- name: Check files to cache on ubuntu-latest
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
|
@ -158,7 +161,6 @@ jobs:
|
||||||
echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
|
echo "::error::The ~/.cache/coursier directory does not exist unexpectedly"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sbt-restore:
|
sbt-restore:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
defaults:
|
defaults:
|
||||||
|
@ -168,7 +170,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
needs: sbt-save
|
needs: sbt-save
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -182,14 +184,13 @@ jobs:
|
||||||
cache: sbt
|
cache: sbt
|
||||||
|
|
||||||
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
- name: Confirm that ~/Library/Caches/Coursier directory has been made
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-13'
|
||||||
run: |
|
run: |
|
||||||
if [ ! -d ~/Library/Caches/Coursier ]; then
|
if [ ! -d ~/Library/Caches/Coursier ]; then
|
||||||
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
echo "::error::The ~/Library/Caches/Coursier directory does not exist unexpectedly"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
ls ~/Library/Caches/Coursier
|
ls ~/Library/Caches/Coursier
|
||||||
|
|
||||||
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
|
- name: Confirm that ~/AppData/Local/Coursier/Cache directory has been made
|
||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
|
@ -198,7 +199,6 @@ jobs:
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
ls ~/AppData/Local/Coursier/Cache
|
ls ~/AppData/Local/Coursier/Cache
|
||||||
|
|
||||||
- name: Confirm that ~/.cache/coursier directory has been made
|
- name: Confirm that ~/.cache/coursier directory has been made
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -20,7 +20,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
distribution: [
|
distribution: [
|
||||||
'temurin',
|
'temurin',
|
||||||
'adopt',
|
'adopt',
|
||||||
|
@ -33,17 +33,15 @@ jobs:
|
||||||
'dragonwell',
|
'dragonwell',
|
||||||
'sapmachine'
|
'sapmachine'
|
||||||
] # internally 'adopt-hotspot' is the same as 'adopt'
|
] # internally 'adopt-hotspot' is the same as 'adopt'
|
||||||
version: ['8', '11', '17', '21']
|
version: ['21', '11', '17']
|
||||||
exclude:
|
exclude:
|
||||||
- distribution: microsoft
|
- distribution: microsoft
|
||||||
version: 8
|
version: 8
|
||||||
- distribution: dragonwell
|
- distribution: dragonwell
|
||||||
os: macos-latest
|
os: macos-13
|
||||||
- distribution: sapmachine
|
|
||||||
version: 8
|
|
||||||
include:
|
include:
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: macos-latest
|
os: macos-13
|
||||||
version: 17
|
version: 17
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
@ -76,7 +74,7 @@ jobs:
|
||||||
distribution: ['temurin', 'zulu', 'liberica']
|
distribution: ['temurin', 'zulu', 'liberica']
|
||||||
version:
|
version:
|
||||||
- '11.0'
|
- '11.0'
|
||||||
- '8.0.302'
|
- '21.0'
|
||||||
- '17.0.7+7'
|
- '17.0.7+7'
|
||||||
include:
|
include:
|
||||||
- distribution: oracle
|
- distribution: oracle
|
||||||
|
@ -179,7 +177,7 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
version: ['17-ea', '15.0.0-ea.14']
|
version: ['17-ea', '15.0.0-ea.14']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
@ -245,22 +243,22 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-13, windows-latest, ubuntu-latest]
|
||||||
distribution: ['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine']
|
distribution: ['temurin', 'zulu', 'liberica', 'semeru', 'sapmachine']
|
||||||
java-package: ['jre']
|
java-package: ['jre']
|
||||||
version: ['17.0']
|
version: ['17.0']
|
||||||
include:
|
include:
|
||||||
- distribution: 'zulu'
|
- distribution: 'zulu'
|
||||||
java-package: jre+fx
|
java-package: jre+fx
|
||||||
version: '8'
|
version: '21'
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- distribution: 'zulu'
|
- distribution: 'zulu'
|
||||||
java-package: jdk+fx
|
java-package: jdk+fx
|
||||||
version: '8.0.242'
|
version: '21.0'
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- distribution: 'liberica'
|
- distribution: 'liberica'
|
||||||
java-package: jdk+fx
|
java-package: jdk+fx
|
||||||
version: '8'
|
version: '21'
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- distribution: 'liberica'
|
- distribution: 'liberica'
|
||||||
java-package: jre+fx
|
java-package: jre+fx
|
||||||
|
@ -324,10 +322,10 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "8" > .java-version
|
run: echo "17" > .java-version
|
||||||
- name: Create .tool-versions file
|
- name: Create .tool-versions file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "java 8" > .tool-versions
|
run: echo "java 17" > .tool-versions
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
|
@ -381,10 +379,10 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "11.0.2" > .java-version
|
run: echo "17.0.10" > .java-version
|
||||||
- name: Create .tool-versions file
|
- name: Create .tool-versions file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "java 11.0.2" > .tool-versions
|
run: echo "java 17.0.10" > .tool-versions
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
|
@ -392,11 +390,11 @@ jobs:
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
java-version-file: ${{matrix.java-version-file }}
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
|
run: bash __tests__/verify-java.sh "17.0.10" "${{ steps.setup-java.outputs.path }}"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
setup-java-version-from-file-major-minor-patch-with-dist:
|
setup-java-version-from-file-major-minor-patch-with-dist:
|
||||||
name: ${{ matrix.distribution }} version from file 'openjdk64-11.0.2' - ${{ matrix.os }}
|
name: ${{ matrix.distribution }} version from file 'openjdk64-17.0.10' - ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -409,10 +407,10 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Create .java-version file
|
- name: Create .java-version file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "openjdk64-11.0.2" > .java-version
|
run: echo "openjdk64-17.0.10" > .java-version
|
||||||
- name: Create .tool-versions file
|
- name: Create .tool-versions file
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "java openjdk64-11.0.2" > .tool-versions
|
run: echo "java openjdk64-17.0.10" > .tool-versions
|
||||||
- name: setup-java
|
- name: setup-java
|
||||||
uses: ./
|
uses: ./
|
||||||
id: setup-java
|
id: setup-java
|
||||||
|
@ -420,5 +418,5 @@ jobs:
|
||||||
distribution: ${{ matrix.distribution }}
|
distribution: ${{ matrix.distribution }}
|
||||||
java-version-file: ${{matrix.java-version-file }}
|
java-version-file: ${{matrix.java-version-file }}
|
||||||
- name: Verify Java
|
- name: Verify Java
|
||||||
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}"
|
run: bash __tests__/verify-java.sh "17.0.10" "${{ steps.setup-java.outputs.path }}"
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
@ -91,8 +91,8 @@ steps:
|
||||||
#### Supported version syntax
|
#### Supported version syntax
|
||||||
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation:
|
The `java-version` input supports an exact version or a version range using [SemVer](https://semver.org/) notation:
|
||||||
- major versions: `8`, `11`, `16`, `17`, `21`
|
- major versions: `8`, `11`, `16`, `17`, `21`
|
||||||
- more specific versions: `17.0`, `11.0`, `11.0.4`, `8.0.232`, `8.0.282+8`
|
- more specific versions: `8.0.282+8`, `8.0.232`, `11.0`, `11.0.4`, `17.0`
|
||||||
- early access (EA) versions: `15-ea`, `15.0.0-ea`, `15.0.0-ea.2`, `15.0.0+2-ea`
|
- early access (EA) versions: `15-ea`, `15.0.0-ea`
|
||||||
|
|
||||||
#### Supported distributions
|
#### Supported distributions
|
||||||
Currently, the following distributions are supported:
|
Currently, the following distributions are supported:
|
||||||
|
|
|
@ -539,19 +539,19 @@ steps:
|
||||||
```
|
```
|
||||||
|
|
||||||
## Java version file
|
## Java version file
|
||||||
If the `java-version-file` input is specified, the action will extract the version from the file and install it.
|
If the `java-version-file` input is specified, the action will extract the version from the file and install it.
|
||||||
|
|
||||||
Supported files are .java-version and .tool-versions.
|
Supported files are .java-version and .tool-versions.
|
||||||
In .java-version file, only the version should be specified, e.g., 17.0.7.
|
In .java-version file, only the version should be specified (e.g., 17.0.7).
|
||||||
In .tool-versions file, java version should be preceded by the java keyword, e.g., java 17.0.7.
|
In .tool-versions file, java version should be preceded by the java keyword (e.g., java 17.0.7).
|
||||||
.java-version recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv) and .tool-version recognizes all variants of the version description according to [asdf](https://github.com/asdf-vm/asdf).
|
The `.java-version` file recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv). Similarly, the `.tool-versions` file supports version specifications in accordance with [asdf](https://github.com/asdf-vm/asdf) standards, adhering to Semantic Versioning (semver).
|
||||||
|
|
||||||
If both java-version and java-version-file inputs are provided, the java-version input will be used.
|
If both java-version and java-version-file inputs are provided, the java-version input will be used.
|
||||||
|
|
||||||
Valid entry options:
|
Valid entry options:
|
||||||
```
|
```
|
||||||
major versions: 8, 11, 16, 17, 21
|
major versions: 8, 11, 16, 17, 21
|
||||||
more specific versions: 1.8.0.2, 17.0, 11.0, 11.0.4, 8.0.232, 8.0.282+8
|
more specific versions: 8.0.282+8, 8.0.232, 11.0, 11.0.4, 17.0
|
||||||
early access (EA) versions: 15-ea, 15.0.0-ea
|
early access (EA) versions: 15-ea, 15.0.0-ea
|
||||||
versions with specified distribution: openjdk64-11.0.2
|
versions with specified distribution: openjdk64-11.0.2
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue