GHA CI build workflow improvements (#12425)
* Add error annotations only in Java 11 matrix build to prevent duplicates * Make sure Java 11 build is not cancelled when Java 17 build fails so it can add annotations by using `fail-fast: false` * Use changed files only for incremental PR builds so a full build is done for changes merged into 'main' branch * Add GHA build status badge Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
5
.github/workflows/ci-build.yml
vendored
5
.github/workflows/ci-build.yml
vendored
@@ -16,6 +16,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
java: [ '11', '17' ]
|
||||
maven: [ '3.8.4']
|
||||
@@ -55,11 +56,13 @@ jobs:
|
||||
maven-version: ${{ matrix.maven }}
|
||||
|
||||
- name: Register Problem Matchers
|
||||
if: ${{ matrix.java == '11' }}
|
||||
id: problem_matchers
|
||||
run: |
|
||||
echo "::add-matcher::.github/openhab-compile-problems.json"
|
||||
|
||||
- name: Get Changed Files
|
||||
if: github.head_ref != ''
|
||||
id: files
|
||||
uses: Ana06/get-changed-files@v2.0.0
|
||||
with:
|
||||
@@ -91,8 +94,8 @@ jobs:
|
||||
path: target/summary_report.html
|
||||
|
||||
- name: Report SAT Errors as Annotations
|
||||
if: ${{ matrix.java == '11' && always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
|
||||
uses: ghys/checkstyle-github-action@main
|
||||
if: ${{ always() && ((steps.build.outcome == 'success') || (steps.build.outcome == 'failure')) }}
|
||||
with:
|
||||
title: CheckStyle Violations
|
||||
path: '**/checkstyle-result.xml'
|
||||
|
||||
Reference in New Issue
Block a user