Run CI on Java 11 and 21 #262
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
# Build workflow | |
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
# Validate wrapper to prevent potential supply chain attack | |
gradle-wrapper-validation: | |
# Run on Ubuntu which consumes less minutes | |
runs-on: ubuntu-latest | |
name: Validate Gradle wrapper | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/actions/wrapper-validation@v3 | |
build: | |
# Many tests only pass on Windows | |
runs-on: windows-latest | |
# On Java 11, continue on error to upload artifact | |
continue-on-error: ${{ matrix.java == '21' }} | |
strategy: | |
matrix: | |
java: [ '11', '21' ] | |
name: Java ${{ matrix.java }} build | |
steps: | |
- uses: actions/checkout@v4 | |
# Set JDK | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
# Build | |
- name: Build with Gradle | |
run: >- | |
./gradlew build | |
# Upload test artifact | |
- name: Upload test output | |
uses: actions/upload-artifact@v4 | |
if: ${{ failure() }} | |
with: | |
name: test-output | |
path: | | |
echosvg-test/build/reports/tests/test/ | |
test-references/samples/**/candidate-variation/* | |
retention-days: 15 | |
overwrite: true | |
# Generate modular javadocs | |
- name: Modular javadocs | |
if: ${{ success() }} | |
run: ./gradlew modularJavadoc |