Upgrade dependencies #739
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: Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [17] | |
os: ['ubuntu-latest', 'windows-latest'] | |
include: | |
- os: ubuntu-latest | |
java: 21 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.java }} | |
cancel-in-progress: true | |
name: Build on ${{ matrix.os }} with Java ${{ matrix.java }} | |
runs-on: ${{ matrix.os }} | |
env: | |
DEFAULT_JAVA: 17 | |
DEFAULT_OS: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Fetch all history for all tags and branches | |
run: git fetch --prune --unshallow | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ matrix.java }} | |
cache: 'gradle' | |
- uses: gradle/wrapper-validation-action@v1 | |
- name: Cache SonarQube packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-java-${{ matrix.java }}-sonar | |
restore-keys: ${{ runner.os }}-java-${{ matrix.java }}-sonar | |
- name: Build with Gradle using Java ${{ matrix.java }} | |
run: | | |
./gradlew build --info --warning-mode=summary -PskipFlakyTests=true -PjavaVersion=${{ matrix.java }} | |
- name: Sonar analysis | |
if: ${{ env.DEFAULT_JAVA == matrix.java && env.DEFAULT_OS == matrix.os && env.SONAR_TOKEN != null }} | |
run: | | |
./gradlew sonarqube -Dsonar.token=$SONAR_TOKEN --info --warning-mode=summary -PjavaVersion=${{ matrix.java }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Publish Test Report | |
uses: scacap/action-surefire-report@v1 | |
if: ${{ always() && env.DEFAULT_OS == matrix.os && github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]' }} | |
with: | |
report_paths: '**/build/test-results/*/TEST-*.xml' | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Archive executable JAR for ${{ matrix.java }} | |
uses: actions/upload-artifact@v4 | |
if: ${{ env.DEFAULT_JAVA == matrix.java && env.DEFAULT_OS == matrix.os }} | |
with: | |
name: packages | |
path: jfxui/build/libs/white-rabbit-fx-*.jar | |
- name: Build native package for ${{ runner.os }} using Java ${{ matrix.java }} | |
if: ${{ env.DEFAULT_JAVA == matrix.java }} | |
run: | | |
./gradlew jpackage createChecksums --info --warning-mode=summary -PjavaVersion=${{ matrix.java }} | |
- name: Stop Gradle Daemon | |
run: | | |
./gradlew -status | |
./gradlew -stop | |
- name: Archive native package for ${{ runner.os }} | |
uses: actions/upload-artifact@v4 | |
if: ${{ env.DEFAULT_JAVA == matrix.java }} | |
with: | |
name: packages-${{ runner.os }} | |
path: jfxui/build/jpackage-dist/* | |
- name: Archive checksums for ${{ runner.os }} | |
uses: actions/upload-artifact@v4 | |
if: ${{ env.DEFAULT_JAVA == matrix.java }} | |
with: | |
name: checksums-${{ runner.os }} | |
path: jfxui/build/generatedChecksums/* |