feat(CI/linux-build): introduce option to set maxerrors for compilation (#21022)

This commit is contained in:
sudlud
2024-12-25 22:46:45 +01:00
committed by GitHub
parent fcc3f7f7cb
commit 0828851313
2 changed files with 8 additions and 2 deletions

View File

@@ -26,6 +26,11 @@ inputs:
description: Flag to enable or disable PCH
required: false
type: boolean
maxerrors:
default: 1
description: Max allowed error count before compilation stops
required: false
type: number
runs:
using: composite
steps:
@@ -106,8 +111,8 @@ runs:
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_CXX_COMPILER_LAUNCHER="ccache" \
-DCMAKE_C_COMPILER_LAUNCHER="ccache" \
-DCMAKE_C_FLAGS="-Werror" \
-DCMAKE_CXX_FLAGS="-Werror" \
-DCMAKE_C_FLAGS="-Werror ${{ startsWith(inputs.cc, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}} " \
-DCMAKE_CXX_FLAGS="-Werror ${{ startsWith(inputs.cxx, 'clang') && '-ferror-limit=' || '-fmax-errors=' }}${{inputs.maxerrors}}" \
-DBUILD_TESTING="ON" \
-DUSE_SCRIPTPCH=${{ inputs.pch == 'true' && 'ON' || '' }} \
-DUSE_COREPCH=${{ inputs.pch == 'true' && 'ON' || '' }} \

View File

@@ -49,3 +49,4 @@ jobs:
CXX: ${{ matrix.compiler.CXX }}
modules: true
pch: false
maxerrors: 0