Validate Java e2e #1255
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
name: Validate Java e2e | |
on: | |
push: | |
branches: | |
- main | |
- releases/* | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
schedule: | |
- cron: '0 */12 * * *' | |
workflow_dispatch: | |
jobs: | |
setup-java-major-versions: | |
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
distribution: [ | |
'temurin', | |
'adopt', | |
'adopt-openj9', | |
'zulu', | |
'liberica', | |
'microsoft', | |
'semeru', | |
'corretto', | |
'dragonwell' | |
] # internally 'adopt-hotspot' is the same as 'adopt' | |
version: ['8', '11', '17'] | |
exclude: | |
- distribution: microsoft | |
version: 8 | |
- distribution: dragonwell | |
os: macos-latest | |
include: | |
- distribution: oracle | |
os: macos-latest | |
version: 17 | |
- distribution: oracle | |
os: windows-latest | |
version: 20 | |
- distribution: oracle | |
os: ubuntu-latest | |
version: 20 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
java-version: ${{ matrix.version }} | |
distribution: ${{ matrix.distribution }} | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-major-minor-versions: | |
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} | |
needs: setup-java-major-versions | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
distribution: ['temurin', 'zulu', 'liberica'] | |
version: | |
- '11.0' | |
- '8.0.302' | |
- '17.0.7+7' | |
include: | |
- distribution: oracle | |
os: ubuntu-latest | |
version: '20.0.1' | |
- distribution: dragonwell | |
os: ubuntu-latest | |
version: '11.0' | |
- distribution: dragonwell | |
os: ubuntu-latest | |
version: '11.0.13+9' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
java-version: ${{ matrix.version }} | |
distribution: ${{ matrix.distribution }} | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-check-latest: | |
name: ${{ matrix.distribution }} ${{ matrix.version }} - check-latest flag - ${{ matrix.os }} | |
needs: setup-java-major-versions | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell'] | |
exclude: | |
- distribution: dragonwell | |
os: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version: 11 | |
check-latest: true | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-multiple-jdks: | |
name: ${{ matrix.distribution }} ${{ matrix.version }} - multiple jdks - ${{ matrix.os }} | |
needs: setup-java-major-versions | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
distribution: ['temurin', 'zulu', 'liberica', 'dragonwell'] | |
exclude: | |
- distribution: dragonwell | |
os: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version: | | |
11 | |
17 | |
- name: Verify Java env variables | |
run: | | |
$versionsArr = "11","17" | |
foreach ($version in $versionsArr) | |
{ | |
$envName = "JAVA_HOME_${version}_${env:RUNNER_ARCH}" | |
$JavaVersionPath = [Environment]::GetEnvironmentVariable($envName) | |
if (-not (Test-Path "$JavaVersionPath")) { | |
Write-Host "$envName is not found" | |
exit 1 | |
} | |
} | |
shell: pwsh | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "17" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-ea-versions-zulu: | |
name: zulu ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} | |
needs: setup-java-major-minor-versions | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
version: ['17-ea', '15.0.0-ea.14'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
java-version: ${{ matrix.version }} | |
distribution: zulu | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-ea-versions-temurin: | |
name: temurin ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} | |
needs: setup-java-major-minor-versions | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
version: ['17-ea'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
java-version: ${{ matrix.version }} | |
distribution: temurin | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-custom-package-type: | |
name: ${{ matrix.distribution }} ${{ matrix.version }} (${{ matrix.java-package }}-x64) - ${{ matrix.os }} | |
needs: setup-java-major-minor-versions | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
distribution: ['temurin', 'zulu', 'liberica', 'semeru'] | |
java-package: ['jre'] | |
version: ['17.0'] | |
include: | |
- distribution: 'zulu' | |
java-package: jre+fx | |
version: '8' | |
os: ubuntu-latest | |
- distribution: 'zulu' | |
java-package: jdk+fx | |
version: '8.0.242' | |
os: ubuntu-latest | |
- distribution: 'liberica' | |
java-package: jdk+fx | |
version: '8' | |
os: ubuntu-latest | |
- distribution: 'liberica' | |
java-package: jre+fx | |
version: '11' | |
os: ubuntu-latest | |
- distribution: 'corretto' | |
java-package: jre | |
version: '8' | |
os: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
java-version: ${{ matrix.version }} | |
java-package: ${{ matrix.java-package }} | |
distribution: ${{ matrix.distribution }} | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
# Only Liberica and Zulu provide x86 | |
setup-java-x86: | |
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ matrix.architecture }}) - ${{ matrix.os }} | |
needs: setup-java-major-minor-versions | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# x86 is not supported on macOS | |
os: [windows-latest, ubuntu-latest] | |
distribution: ['liberica', 'zulu', 'corretto'] | |
version: ['11'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version: ${{ matrix.version }} | |
architecture: 'x86' | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-version-both-version-inputs-presents: | |
name: ${{ matrix.distribution }} version (should be from input) - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
distribution: ['temurin', 'microsoft', 'corretto'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create .java-version file | |
shell: bash | |
run: echo "8" > .java-version | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version: 11 | |
java-version-file: '.java-version' | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-version-from-file-major-notation: | |
name: ${{ matrix.distribution }} version from file X - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
distribution: ['temurin', 'zulu', 'liberica', 'microsoft', 'corretto'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create .java-version file | |
shell: bash | |
run: echo "11" > .java-version | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version-file: '.java-version' | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-version-from-file-major-minor-patch-notation: | |
name: ${{ matrix.distribution }} version from file X.Y.Z - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
distribution: ['adopt', 'adopt-openj9', 'zulu'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create .java-version file | |
shell: bash | |
run: echo "11.0.2" > .java-version | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version-file: '.java-version' | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}" | |
shell: bash | |
setup-java-version-from-file-major-minor-patch-with-dist: | |
name: ${{ matrix.distribution }} version from file 'openjdk64-11.0.2' - ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
distribution: ['adopt', 'zulu', 'liberica'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create .java-version file | |
shell: bash | |
run: echo "openjdk64-11.0.2" > .java-version | |
- name: setup-java | |
uses: ./ | |
id: setup-java | |
with: | |
distribution: ${{ matrix.distribution }} | |
java-version-file: '.java-version' | |
- name: Verify Java | |
run: bash __tests__/verify-java.sh "11.0.2" "${{ steps.setup-java.outputs.path }}" | |
shell: bash |