diff --git a/.github/actions/godot-deps/action.yml b/.github/actions/godot-deps/action.yml index 3344323fd48..d9b95e84484 100644 --- a/.github/actions/godot-deps/action.yml +++ b/.github/actions/godot-deps/action.yml @@ -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 diff --git a/.github/workflows/godot_cpp_test.yml b/.github/workflows/godot_cpp_test.yml index af99a4b0357..ae2fc9388c3 100644 --- a/.github/workflows/godot_cpp_test.yml +++ b/.github/workflows/godot_cpp_test.yml @@ -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: diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index bd4e2856e39..f7dbeb6a060 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -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 diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index 384284b6047..055e11d9e66 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -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: diff --git a/misc/utility/problem-matchers.json b/misc/utility/problem-matchers.json new file mode 100644 index 00000000000..63ab0d0f680 --- /dev/null +++ b/misc/utility/problem-matchers.json @@ -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 + } + ] + } + ] +}