Java CI with Gradle #1851
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
# EndreXY 2022-09-18: Based on Github Actions starter "Java with Gradle, By GitHub Actions" | |
# | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Java CI with Gradle | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
schedule: | |
- cron: '49 */6 * * *' | |
permissions: | |
contents: read | |
jobs: | |
java_versions: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
javaversion: [11, 17] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.javaversion }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.javaversion }} | |
distribution: 'temurin' | |
- name: Build with Gradle, JDK ${{ matrix.javaversion }} | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: -Pmats.build.java_version=${{ matrix.javaversion }} clean build | |
cache-disabled: true | |
alternative_os: | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest] | |
javaversion: [11] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.javaversion }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.javaversion }} | |
distribution: 'temurin' | |
- name: Build with Gradle, JDK ${{ matrix.javaversion }} | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: clean build | |
cache-disabled: true | |
with_artemis: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
javaversion: [11] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.javaversion }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.javaversion }} | |
distribution: 'temurin' | |
- name: Build with Gradle, JDK ${{ matrix.javaversion }} | |
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 | |
with: | |
arguments: -Pmats.test.broker=artemis clean build | |
cache-disabled: true |