Skip to content

Bump github/codeql-action from 2 to 3 (#268) #735

Bump github/codeql-action from 2 to 3 (#268)

Bump github/codeql-action from 2 to 3 (#268) #735

Workflow file for this run

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: 20
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
- 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@v3
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-java-${{ matrix.java }}-sonar
restore-keys: ${{ runner.os }}-java-${{ matrix.java }}-sonar
- name: Build with Gradle
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.login=$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
uses: actions/upload-artifact@v3
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 }}
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
uses: actions/upload-artifact@v3
if: ${{ env.DEFAULT_JAVA == matrix.java }}
with:
name: packages
path: jfxui/build/jpackage-dist/*
- name: Archive checksums
uses: actions/upload-artifact@v3
if: ${{ env.DEFAULT_JAVA == matrix.java }}
with:
name: checksums
path: jfxui/build/generatedChecksums/*