diff --git a/.github/problem-matchers/gcc.json b/.github/problem-matchers/gcc.json new file mode 100644 index 000000000..e43b91c6f --- /dev/null +++ b/.github/problem-matchers/gcc.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "gcc-problem-matcher", + "pattern": [ + { + "regexp": "^(?:(?:\\.\\.?)?\\/)?(?:icinga2\\/)?(.*?):(\\d+):(\\d*):?\\s+(?:fatal\\s+)?(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 + } + ] + } + ] +} diff --git a/.github/problem-matchers/msvc.json b/.github/problem-matchers/msvc.json new file mode 100644 index 000000000..ba0aa32a4 --- /dev/null +++ b/.github/problem-matchers/msvc.json @@ -0,0 +1,49 @@ +{ + "problemMatcher": [ + { + "owner": "msvc-problem-matcher", + "pattern": [ + { + "regexp": "^([^\\s].*icinga2.*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\):\\s(error|warning|info)\\s(\\w{1,2}\\d+):\\s([^\\s].*?)\\s\\[(.*)\\]$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "code": 5, + "message": 6, + "fromPath": 7 + } + ] + }, + { + "owner": "msvc-template-problem-matcher", + "pattern": [ + { + "regexp": "^(?:[^\\s].*Microsoft.*)\\(\\d+,?\\d+?(?:,\\d+,\\d+)?\\):\\s(error|warning|info)\\s(\\w{1,2}\\d+):\\s([^\\s].*?)\\s\\[(.*)\\]$", + "severity": 1, + "code": 2, + "message": 3, + "fromPath": 4 + }, + { + "regexp": "^\\s*(?:[^\\s].*Microsoft.*)\\(\\d+,?\\d+?(?:,\\d+,\\d+)?\\):.*$" + }, + { + "regexp": "^\\s*\\(compiling source file '.*?'\\)$" + }, + { + "regexp": "^\\s*(?:[^\\s].*Microsoft.*)\\(\\d+,?\\d+?(?:,\\d+,\\d+)?\\):.*$" + }, + { + "regexp": "^\\s+the template instantiation context \\(the oldest one first\\) is$" + }, + { + "regexp": "^\\s*([^\\s].*icinga2.*)\\((\\d+),?(\\d+)?(?:,\\d+,\\d+)?\\):$", + "file": 1, + "line": 2, + "column": 3 + } + ] + } + ] +} diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ac09815de..8fd8c080f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -69,6 +69,9 @@ jobs: - name: Checkout HEAD uses: actions/checkout@v5 + - name: Turn on Problem Matcher + run: echo "::add-matcher::.github/problem-matchers/gcc.json" + - name: Restore/backup ccache uses: actions/cache@v4 with: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index be5ffe25e..3dd237ee6 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -38,6 +38,10 @@ jobs: Set-PSDebug -Trace 1 & .\doc\win-dev.ps1 + - name: Turn on Problem Matcher + run: | + Write-Host "::add-matcher::.github/problem-matchers/msvc.json" + - name: Binary run: | Set-PSDebug -Trace 1