Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate GitHub Actions Logging (problem matchers) #34

Open
6 of 11 tasks
aminya opened this issue Feb 11, 2022 · 0 comments · Fixed by #35 or #36
Open
6 of 11 tasks

Integrate GitHub Actions Logging (problem matchers) #34

aminya opened this issue Feb 11, 2022 · 0 comments · Fixed by #35 or #36
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@aminya
Copy link
Owner

aminya commented Feb 11, 2022

https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md

example:

ThinLTO: CMakeFiles/main.dir/Release/src/main/main.cpp.o0: error: Invalid record
LLVM ERROR: Can't load module, abort.
clang-14: error: unable to execute command: Abort trap: 6
clang-14: error: linker command failed due to signal (use -v to see invocation)
CMake Warning at /Users/runner/work/project_options/project_options/src/Cache.cmake:33 (message):
  ccache is enabled but was not found.  Not using it
Call Stack (most recent call first):
  /Users/runner/work/project_options/project_options/src/Index.cmake:145 (enable_cache)
  CMakeLists.txt:31 (project_options)
  • meson
  • ld
    example:
ld: warning: dylib (/Users/runner/hostedtoolcache/llvm/14.0.0/x64/lib/libc++.dylib) was built for newer macOS version (11.6) than being linked (11.0)
ninja: build stopped: subcommand failed.

  • task:
task: Failed to run task "test_release": exit status 1

How to contribute:

Here is an example for GCC:

setup-cpp/src/gcc/gcc.ts

Lines 120 to 131 in 016b16a

if (isGitHubCI()) {
addGccLoggingMatcher()
}
}
function addGccLoggingMatcher() {
const matcherPath = path.join(__dirname, "gcc_matcher.json")
if (!existsSync(matcherPath)) {
return warning("the gcc_matcher.json file does not exist in the same folder as setup_cpp.js")
}
info(`::add-matcher::${matcherPath}`)
}

The matcher file has a regex for matching the errors/warnings of the tool (escape " and \ in regex).
https://github.com/aminya/setup-cpp/blob/master/src/gcc/gcc_matcher.json

Script for copying the matcher to dist

"copy.matchers": "shx cp ./src/gcc/gcc_matcher.json ./dist/ && shx cp ./src/msvc/msvc_matcher.json ./dist && shx cp ./src/python/python_matcher.json ./dist/",

Upvote & Fund

  • I am using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.

  • Thank you in advance for helping prioritize & fund our backlog.

Fund with Polar
@aminya aminya added the enhancement New feature or request label Feb 11, 2022
@aminya aminya added the help wanted Extra attention is needed label Feb 12, 2022
@aminya aminya changed the title Integrate Problem Matchers Integrate GitHub Actions Logging (problem matchers) Feb 12, 2022
@aminya aminya closed this as completed Sep 3, 2024
@aminya aminya reopened this Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
1 participant