-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add a problem matcher support, to get error/warning/notice annota…
…tions in V CI jobs (#22790)
- Loading branch information
Showing
5 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// The task of this program, is to register all available .json files | ||
// in this folder with Github Actions, so that it can make annotations | ||
// for all found notices/warnings/errors produced by the V compiler | ||
// while running the CI jobs. | ||
// Those annotations provide a way to get a quick overview for failures, | ||
// without having to scroll into the detailed logs produced by each job. | ||
|
||
const github_job = getenv('GITHUB_JOB') | ||
|
||
if github_job == '' { | ||
exit(0) | ||
} | ||
|
||
dump(github_job) | ||
chdir(@VEXEROOT)! | ||
for f in walk_ext('.github/problem-matchers/', '.json').sorted() { | ||
println('::add-matcher::${real_path(f)}') | ||
println('registered matcher: `${f}`') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"__comment": "Based on https://github.com/python/cpython/blob/main/.github/problem-matchers/gcc.json", | ||
"problemMatcher": [ | ||
{ | ||
"owner": "v-problem-matcher", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*):(\\d+):(\\d+):\\s+(?:fatal\\s+)?(warning|error|notice):\\s+(.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"severity": 4, | ||
"message": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters