CI: Add explicit problem matchers

This commit is contained in:
Thaddeus Crews 2024-11-27 12:33:42 -06:00
parent f128f383e8
commit 357679ceb8
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
5 changed files with 42 additions and 15 deletions

View file

@ -29,3 +29,7 @@ runs:
python -c "import sys; print(sys.version)"
python -m pip install scons==${{ inputs.scons-version }}
scons --version
- name: Setup problem matchers
shell: bash
run: echo ::add-matcher::misc/utility/problem-matchers.json

View file

@ -21,7 +21,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: .github
sparse-checkout: |
.github
misc/utility/problem-matchers.json
- name: Checkout godot-cpp
uses: actions/checkout@v4
@ -34,9 +36,6 @@ jobs:
- name: Setup Python and SCons
uses: ./.github/actions/godot-deps
- name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
- name: Download GDExtension interface and API dump
uses: ./.github/actions/download-artifact
with:

View file

@ -133,9 +133,6 @@ jobs:
python-version: 3.8
scons-version: 4.0
- name: Setup GCC problem matcher
uses: ammaraskar/gcc-problem-matcher@master
- name: Compilation
uses: ./.github/actions/godot-build
with:
@ -158,6 +155,9 @@ jobs:
- name: Build .NET solutions
if: matrix.build-mono
run: |
# FIXME: C# warnings should be properly handled eventually, but we don't want to clutter
# the GitHub Actions annotations, so remove the associated problem matcher for now.
echo "::remove-matcher owner=msvc::"
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
- name: Prepare artifact

View file

@ -86,14 +86,6 @@ jobs:
- name: Extract pre-built ANGLE static libraries
run: Expand-Archive -Force angle/angle.zip ${{ github.workspace }}/
- name: Setup MSVC problem matcher
if: matrix.compiler == 'msvc'
uses: ammaraskar/msvc-problem-matcher@master
- name: Setup GCC problem matcher
if: matrix.compiler != 'msvc'
uses: ammaraskar/gcc-problem-matcher@master
- name: Compilation
uses: ./.github/actions/godot-build
with:

View file

@ -0,0 +1,32 @@
{
"problemMatcher": [
{
"owner": "gcc",
"pattern": [
{
"regexp": "^(?:\\s+\\d+\\>)?(\\S.*?)[\\(:](\\d+)[,:]?(\\d*)(?::{\\d+:\\d+\\-\\d+:\\d+})?\\)?:\\s+(?:fatal\\s+)?(error|warning|info):\\s+(.*?)(?:\\s*\\[(.*)\\])?$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5,
"code": 6
}
]
},
{
"owner": "msvc",
"pattern": [
{
"regexp": "^(?:\\s+\\d+\\>)?(\\S.*)\\((\\d+),?(\\d*)?(?:,\\d+,\\d+)?\\)\\s*:\\s+(?:fatal\\s+)?(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"code": 5,
"message": 6
}
]
}
]
}