2021-04-05 18:02:27 +08:00
|
|
|
name: Validate Java e2e
|
2022-12-15 23:10:53 +08:00
|
|
|
|
2021-04-05 18:02:27 +08:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
- releases/*
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2021-04-12 16:08:05 +08:00
|
|
|
schedule:
|
|
|
|
- cron: '0 */12 * * *'
|
2021-08-06 18:12:36 +08:00
|
|
|
workflow_dispatch:
|
2021-04-05 18:02:27 +08:00
|
|
|
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]
|
2022-04-29 18:38:36 +08:00
|
|
|
distribution: ['temurin', 'adopt', 'adopt-openj9', 'zulu', 'liberica', 'microsoft', 'corretto' ] # internally 'adopt-hotspot' is the same as 'adopt'
|
2021-08-06 18:12:36 +08:00
|
|
|
version: ['8', '11', '16']
|
2021-12-09 02:50:14 +08:00
|
|
|
exclude:
|
|
|
|
- distribution: microsoft
|
|
|
|
version: 8
|
2021-04-05 18:02:27 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-07 18:25:49 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-04-05 18:02:27 +08:00
|
|
|
- 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]
|
2021-11-29 17:15:06 +08:00
|
|
|
distribution: ['temurin', 'zulu', 'liberica']
|
2021-04-05 18:02:27 +08:00
|
|
|
version:
|
|
|
|
- '11.0'
|
2021-08-23 16:09:55 +08:00
|
|
|
- '8.0.302'
|
|
|
|
- '16.0.2+7'
|
2021-04-05 18:02:27 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-07 18:25:49 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-04-05 18:02:27 +08:00
|
|
|
- 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]
|
2021-11-29 17:15:06 +08:00
|
|
|
distribution: ['temurin', 'zulu', 'liberica']
|
2021-04-05 18:02:27 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-07 18:25:49 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-04-05 18:02:27 +08:00
|
|
|
- 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
|
2021-05-17 21:33:21 +08:00
|
|
|
|
2022-09-08 21:26:54 +08:00
|
|
|
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']
|
|
|
|
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
|
|
|
|
|
2021-04-05 18:02:27 +08:00
|
|
|
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
|
2022-04-07 18:25:49 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-04-05 18:02:27 +08:00
|
|
|
- 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
|
|
|
|
|
2021-08-06 18:12:36 +08:00
|
|
|
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
|
2022-04-07 18:25:49 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-08-06 18:12:36 +08:00
|
|
|
- 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
|
|
|
|
|
2021-04-05 18:02:27 +08:00
|
|
|
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]
|
2021-11-29 17:15:06 +08:00
|
|
|
distribution: ['temurin', 'zulu', 'liberica']
|
2021-04-05 18:02:27 +08:00
|
|
|
java-package: ['jre']
|
2022-04-29 18:38:36 +08:00
|
|
|
version: ['17.0']
|
2021-04-05 18:02:27 +08:00
|
|
|
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
|
2021-11-29 17:15:06 +08:00
|
|
|
- distribution: 'liberica'
|
|
|
|
java-package: jdk+fx
|
|
|
|
version: '8'
|
|
|
|
os: ubuntu-latest
|
|
|
|
- distribution: 'liberica'
|
|
|
|
java-package: jre+fx
|
|
|
|
version: '11'
|
|
|
|
os: ubuntu-latest
|
2022-04-29 18:38:36 +08:00
|
|
|
- distribution: 'corretto'
|
|
|
|
java-package: jre
|
|
|
|
version: '8'
|
|
|
|
os: windows-latest
|
2021-04-05 18:02:27 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-07 18:25:49 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-04-05 18:02:27 +08:00
|
|
|
- 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
|
|
|
|
|
2021-12-09 02:50:14 +08:00
|
|
|
# Only Liberica and Zulu provide x86
|
|
|
|
setup-java-x86:
|
|
|
|
name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ matrix.architecture }}) - ${{ matrix.os }}
|
2021-04-05 18:02:27 +08:00
|
|
|
needs: setup-java-major-minor-versions
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2021-12-09 02:50:14 +08:00
|
|
|
# x86 is not supported on macOS
|
2021-04-05 18:02:27 +08:00
|
|
|
os: [windows-latest, ubuntu-latest]
|
2022-04-29 18:38:36 +08:00
|
|
|
distribution: ['liberica', 'zulu', 'corretto']
|
2021-04-05 18:02:27 +08:00
|
|
|
version: ['11']
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-04-07 18:25:49 +08:00
|
|
|
uses: actions/checkout@v3
|
2021-04-05 18:02:27 +08:00
|
|
|
- name: setup-java
|
|
|
|
uses: ./
|
|
|
|
id: setup-java
|
|
|
|
with:
|
|
|
|
distribution: ${{ matrix.distribution }}
|
|
|
|
java-version: ${{ matrix.version }}
|
2021-12-09 02:50:14 +08:00
|
|
|
architecture: 'x86'
|
2021-04-05 18:02:27 +08:00
|
|
|
- name: Verify Java
|
|
|
|
run: bash __tests__/verify-java.sh "${{ matrix.version }}" "${{ steps.setup-java.outputs.path }}"
|
2021-05-17 21:33:21 +08:00
|
|
|
shell: bash
|
2021-12-09 02:50:14 +08:00
|
|
|
|
2022-12-13 19:45:14 +08:00
|
|
|
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
|
2023-01-09 03:25:29 +08:00
|
|
|
|
|
|
|
setup-java-version-from-pom-spring-boot-specification:
|
2023-01-18 00:32:12 +08:00
|
|
|
name: ${{ matrix.distribution }} version from pom.xml - ${{ matrix.os }}
|
2023-01-09 03:25:29 +08:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
2023-01-16 00:25:06 +08:00
|
|
|
distribution: ['adopt', 'zulu', 'liberica']
|
2023-01-09 03:25:29 +08:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2023-01-16 00:25:06 +08:00
|
|
|
- name: Create pom.xml file
|
2023-01-09 03:25:29 +08:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2023-01-16 00:25:06 +08:00
|
|
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > pom.xml
|
2023-01-09 03:25:29 +08:00
|
|
|
echo "<project>" >> pom.xml
|
2023-01-16 00:25:06 +08:00
|
|
|
echo " <modelVersion>4.0.0</modelVersion>" >> pom.xml
|
2023-01-09 03:25:29 +08:00
|
|
|
echo " <groupId>com.test</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>Test</artifactId>" >> pom.xml
|
|
|
|
echo " <version>0.0.1-SNAPSHOT</version>" >> pom.xml
|
|
|
|
echo " <name>Test</name>" >> pom.xml
|
|
|
|
echo " <properties>" >> pom.xml
|
|
|
|
echo " <java.version>11</java.version>" >> pom.xml
|
|
|
|
echo " </properties>" >> pom.xml
|
|
|
|
echo " <dependencies>" >> pom.xml
|
|
|
|
echo " </dependencies>" >> pom.xml
|
|
|
|
echo " <build>" >> pom.xml
|
|
|
|
echo " <plugins>" >> pom.xml
|
|
|
|
echo " <plugin>" >> pom.xml
|
|
|
|
echo " <groupId>org.springframework.boot</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>spring-boot-maven-plugin</artifactId>" >> pom.xml
|
|
|
|
echo " </plugin>" >> pom.xml
|
|
|
|
echo " </plugins>" >> pom.xml
|
|
|
|
echo " </build>" >> pom.xml
|
|
|
|
echo "</project>" >> pom.xml
|
|
|
|
- name: setup-java
|
|
|
|
uses: ./
|
|
|
|
id: setup-java
|
|
|
|
with:
|
|
|
|
distribution: ${{ matrix.distribution }}
|
|
|
|
java-version-file: 'pom.xml'
|
|
|
|
- name: Verify Java
|
2023-01-16 00:25:06 +08:00
|
|
|
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
setup-java-version-from-pom-maven-compiler-source-specification:
|
2023-01-18 00:32:12 +08:00
|
|
|
name: ${{ matrix.distribution }} version from pom.xml - ${{ matrix.os }}
|
2023-01-16 00:25:06 +08:00
|
|
|
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 pom.xml file
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > pom.xml
|
|
|
|
echo "<project>" >> pom.xml
|
|
|
|
echo " <modelVersion>4.0.0</modelVersion>" >> pom.xml
|
|
|
|
echo " <groupId>foo.bar</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>FooBarr</artifactId>" >> pom.xml
|
|
|
|
echo " <version>0.0.1-SNAPSHOT</version>" >> pom.xml
|
|
|
|
echo " <properties>" >> pom.xml
|
|
|
|
echo " <maven.compiler.source>1.8</maven.compiler.source>" >> pom.xml
|
|
|
|
echo " <maven.compiler.target>1.8</maven.compiler.target>" >> pom.xml
|
|
|
|
echo " </properties>" >> pom.xml
|
|
|
|
echo " <build>" >> pom.xml
|
|
|
|
echo " <plugins>" >> pom.xml
|
|
|
|
echo " <plugin>" >> pom.xml
|
|
|
|
echo " <groupId>org.apache.maven.plugins</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>maven-compiler-plugin</artifactId>" >> pom.xml
|
|
|
|
echo " <version>3.10.1</version>" >> pom.xml
|
|
|
|
echo " </plugin>" >> pom.xml
|
|
|
|
echo " </plugins>" >> pom.xml
|
|
|
|
echo " </build>" >> pom.xml
|
|
|
|
echo "</project>" >> pom.xml
|
|
|
|
- name: setup-java
|
|
|
|
uses: ./
|
|
|
|
id: setup-java
|
|
|
|
with:
|
|
|
|
distribution: ${{ matrix.distribution }}
|
|
|
|
java-version-file: 'pom.xml'
|
|
|
|
- name: Verify Java
|
|
|
|
run: bash __tests__/verify-java.sh "8" "${{ steps.setup-java.outputs.path }}"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
setup-java-version-from-pom-maven-compiler-release-specification:
|
2023-01-18 00:32:12 +08:00
|
|
|
name: ${{ matrix.distribution }} version from pom.xml - ${{ matrix.os }}
|
2023-01-16 00:25:06 +08:00
|
|
|
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 pom.xml file
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > pom.xml
|
|
|
|
echo "<project>" >> pom.xml
|
|
|
|
echo " <modelVersion>4.0.0</modelVersion>" >> pom.xml
|
|
|
|
echo " <groupId>foo.bar</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>FooBarr</artifactId>" >> pom.xml
|
|
|
|
echo " <version>0.0.1-SNAPSHOT</version>" >> pom.xml
|
|
|
|
echo " <properties>" >> pom.xml
|
|
|
|
echo " <maven.compiler.release>8</maven.compiler.release>" >> pom.xml
|
|
|
|
echo " </properties>" >> pom.xml
|
|
|
|
echo " <build>" >> pom.xml
|
|
|
|
echo " <plugins>" >> pom.xml
|
|
|
|
echo " <plugin>" >> pom.xml
|
|
|
|
echo " <groupId>org.apache.maven.plugins</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>maven-compiler-plugin</artifactId>" >> pom.xml
|
|
|
|
echo " <version>3.10.1</version>" >> pom.xml
|
|
|
|
echo " </plugin>" >> pom.xml
|
|
|
|
echo " </plugins>" >> pom.xml
|
|
|
|
echo " </build>" >> pom.xml
|
|
|
|
echo "</project>" >> pom.xml
|
|
|
|
- name: setup-java
|
|
|
|
uses: ./
|
|
|
|
id: setup-java
|
|
|
|
with:
|
|
|
|
distribution: ${{ matrix.distribution }}
|
|
|
|
java-version-file: 'pom.xml'
|
|
|
|
- name: Verify Java
|
|
|
|
run: bash __tests__/verify-java.sh "8" "${{ steps.setup-java.outputs.path }}"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
setup-java-version-from-pom-maven-compiler-configuration-source-specification:
|
2023-01-18 00:32:12 +08:00
|
|
|
name: ${{ matrix.distribution }} version from pom.xml - ${{ matrix.os }}
|
2023-01-16 00:25:06 +08:00
|
|
|
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 pom.xml file
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > pom.xml
|
|
|
|
echo "<project>" >> pom.xml
|
|
|
|
echo " <modelVersion>4.0.0</modelVersion>" >> pom.xml
|
|
|
|
echo " <groupId>foo.bar</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>FooBarr</artifactId>" >> pom.xml
|
|
|
|
echo " <version>0.0.1-SNAPSHOT</version>" >> pom.xml
|
|
|
|
echo " <build>" >> pom.xml
|
|
|
|
echo " <plugins>" >> pom.xml
|
|
|
|
echo " <plugin>" >> pom.xml
|
|
|
|
echo " <groupId>org.apache.maven.plugins</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>maven-compiler-plugin</artifactId>" >> pom.xml
|
|
|
|
echo " <version>3.10.1</version>" >> pom.xml
|
|
|
|
echo " <configuration>" >> pom.xml
|
|
|
|
echo " <source>1.8</source>" >> pom.xml
|
|
|
|
echo " <target>1.8</target>" >> pom.xml
|
|
|
|
echo " </configuration>" >> pom.xml
|
|
|
|
echo " </plugin>" >> pom.xml
|
|
|
|
echo " </plugins>" >> pom.xml
|
|
|
|
echo " </build>" >> pom.xml
|
|
|
|
echo "</project>" >> pom.xml
|
|
|
|
- name: setup-java
|
|
|
|
uses: ./
|
|
|
|
id: setup-java
|
|
|
|
with:
|
|
|
|
distribution: ${{ matrix.distribution }}
|
|
|
|
java-version-file: 'pom.xml'
|
|
|
|
- name: Verify Java
|
|
|
|
run: bash __tests__/verify-java.sh "8" "${{ steps.setup-java.outputs.path }}"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
setup-java-version-from-pom-maven-compiler-configuration-release-specification:
|
2023-01-18 00:32:12 +08:00
|
|
|
name: ${{ matrix.distribution }} version from pom.xml - ${{ matrix.os }}
|
2023-01-16 00:25:06 +08:00
|
|
|
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 pom.xml file
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > pom.xml
|
|
|
|
echo "<project>" >> pom.xml
|
|
|
|
echo " <modelVersion>4.0.0</modelVersion>" >> pom.xml
|
|
|
|
echo " <groupId>foo.bar</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>FooBarr</artifactId>" >> pom.xml
|
|
|
|
echo " <version>0.0.1-SNAPSHOT</version>" >> pom.xml
|
|
|
|
echo " <build>" >> pom.xml
|
|
|
|
echo " <plugins>" >> pom.xml
|
|
|
|
echo " <plugin>" >> pom.xml
|
|
|
|
echo " <groupId>org.apache.maven.plugins</groupId>" >> pom.xml
|
|
|
|
echo " <artifactId>maven-compiler-plugin</artifactId>" >> pom.xml
|
|
|
|
echo " <version>3.10.1</version>" >> pom.xml
|
|
|
|
echo " <configuration>" >> pom.xml
|
|
|
|
echo " <release>11</release>" >> pom.xml
|
|
|
|
echo " </configuration>" >> pom.xml
|
|
|
|
echo " </plugin>" >> pom.xml
|
|
|
|
echo " </plugins>" >> pom.xml
|
|
|
|
echo " </build>" >> pom.xml
|
|
|
|
echo "</project>" >> pom.xml
|
|
|
|
- name: setup-java
|
|
|
|
uses: ./
|
|
|
|
id: setup-java
|
|
|
|
with:
|
|
|
|
distribution: ${{ matrix.distribution }}
|
|
|
|
java-version-file: 'pom.xml'
|
|
|
|
- name: Verify Java
|
|
|
|
run: bash __tests__/verify-java.sh "11" "${{ steps.setup-java.outputs.path }}"
|
2023-01-09 03:25:29 +08:00
|
|
|
shell: bash
|