ci: Update GitHub Actions to setup-java #548
Workflow file for this run
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 PR | |
on: | |
pull_request: | |
push: | |
jobs: | |
# Run the unit test ahead of the scripted tests | |
validate: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
- os: macos-latest | |
runs-on: '${{ matrix.os }}' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 8 | |
cache: sbt | |
- uses: sbt/setup-sbt@v1 | |
- name: Validate | |
run: sbt -v "+validate" | |
scripted: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
java: 8 | |
distribution: zulu | |
jobtype: 1 | |
- os: ubuntu-latest | |
java: 8 | |
distribution: zulu | |
jobtype: 2 | |
- os: ubuntu-latest | |
java: 8 | |
distribution: zulu | |
jobtype: 3 | |
- os: ubuntu-latest | |
java: 8 | |
distribution: zulu | |
jobtype: 4 | |
- os: ubuntu-latest | |
java: 8 | |
distribution: zulu | |
jobtype: 5 | |
- os: ubuntu-latest | |
java: 8 | |
distribution: zulu | |
jobtype: 6 | |
- os: ubuntu-latest | |
java: 8 | |
distribution: zulu | |
jobtype: 7 | |
- os: ubuntu-latest | |
java: 11 | |
distribution: temurin | |
jobtype: 8 | |
- os: ubuntu-latest | |
java: 22 | |
distribution: graalvm | |
jobtype: 9 | |
- os: macos-latest | |
java: 8 | |
distribution: zulu | |
jobtype: 10 | |
- os: windows-latest | |
java: 8 | |
distribution: zulu | |
jobtype: 11 | |
needs: | |
- validate | |
runs-on: '${{ matrix.os }}' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: '${{ matrix.distribution }}' | |
java-version: '${{ matrix.java }}' | |
cache: sbt | |
- uses: sbt/setup-sbt@v1 | |
- name: Validate Universal | |
if: '${{ matrix.jobtype == 1 }}' | |
run: sbt -v "+validateUniversal" | |
- name: Validate JAR | |
if: '${{ matrix.jobtype == 2 }}' | |
run: sbt -v "+validateJar" | |
- name: Validate Bash | |
if: '${{ matrix.jobtype == 3 }}' | |
run: sbt -v "+validateBash" | |
- name: Validate Ash | |
if: '${{ matrix.jobtype == 4 }}' | |
run: sbt -v "+validateAsh" | |
- name: Validate RPM | |
if: '${{ matrix.jobtype == 5 }}' | |
run: sbt -v "+validateRpm" | |
- name: Validate Debian | |
if: '${{ matrix.jobtype == 6 }}' | |
run: sbt -v "+validateDebian" | |
- name: Validate Docker | |
if: '${{ matrix.jobtype == 7 }}' | |
run: sbt -v "+validateDocker" | |
- name: Validate Jlink | |
if: '${{ matrix.jobtype == 8 }}' | |
run: sbt -v "+validateJlink" | |
- name: Validate GraalVM Native Image | |
if: '${{ matrix.jobtype == 9 }}' | |
run: sbt -v "+validateGraalVMNativeImage" | |
- name: Validate macOS | |
if: '${{ matrix.jobtype == 10 }}' | |
run: sbt -v "+validateMacOS" | |
- name: Validate Windows | |
if: '${{ matrix.jobtype == 11 }}' | |
run: sbt -v "+validateWindows" | |
scripted-jdk-packager: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
needs: | |
- validate | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Zulu 8 | |
run: | | |
# the standard zulu dist doesn't include javafx | |
download_url="https://cdn.azul.com/zulu/bin/zulu8.38.0.13-ca-fx-jdk8.0.212-linux_x64.tar.gz" | |
wget -O $RUNNER_TEMP/java_package.tar.gz $download_url | |
- name: Setup Azul JDK with JavaFX | |
uses: actions/setup-java@v4 | |
with: | |
distribution: jdkfile | |
jdkFile: '${{ runner.temp }}/java_package.tar.gz' | |
java-version: 8.0.0 | |
architecture: x64 | |
cache: sbt | |
- uses: sbt/setup-sbt@v1 | |
- name: Validate | |
run: sbt "+validateJdkPackagerTravis" |