-
Notifications
You must be signed in to change notification settings - Fork 68
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
Remove ineffective make build
in CodeQL jobs
#2259
Conversation
🤖 Created branch: z_pr2259/dfarrell07/nobuild_codeql |
This PR/issue depends on:
|
By running CodeQL locally (with more granular control than possible through the GHA) it's possible to show that our make tooling isn't creating a CodeQL database. ``` $ codeql database create go-database --language=go \ --command='make build' Initializing database at /home/dfarrell07/go/src/submariner-io/submariner-operator/go-database. Running build command: [make, build] [2022-09-26 21:09:56] [build-stdout] docker network create -d bridge kind ... No source code was seen and extracted to /home/dfarrell07/go/src/submariner-io/submariner-operator/go-database. This can occur if the specified build commands failed to compile or process any code. $ tree go-database|wc -l 11 \# There are 1000s of files when it works, the CodeQL DB for this code ``` The local invocation also offers this help: ``` - For codebases written in Go, JavaScript, TypeScript, and Python, do not specify an explicit --command. ``` Which seems to conflict with the other docs. They say that for compiled languages (like golang), the `--command` flag can be used to specify a build step. Main website "Creating CodeQL databases" docs: ``` --command: used when you create a database for one or more compiled languages, omit if the only languages requested are Python and JavaScript. This specifies the build commands needed to invoke the compiler. Commands are run from the current folder, or --source-root if specified. If you don’t include a --command, CodeQL will attempt to detect the build system automatically, using a built-in autobuilder. ``` https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/ To do that with the GHA, `run: make` examples are given. Main README: ``` \# If the Autobuild fails above, remove it and uncomment the following \# three lines and modify them (or add more) to build your code if your \# project uses a compiled language \#- run: | \# make bootstrap \# make release ``` https://github.com/github/codeql-action/ Signed-off-by: Daniel Farrell <[email protected]>
It's weird GH thinks there are conflicts git can't resolve, because a simple rebase worked locally (as expected, because I built this commit on top of the ABC order one just merged and still at HEAD). |
5a8e702
to
090efc6
Compare
🤖 Closed branches: [z_pr2259/dfarrell07/nobuild_codeql] |
By running CodeQL locally (with more granular control than possible
through the GHA) it's possible to show that our make tooling isn't
creating a CodeQL database.
The local invocation also offers this help:
Which seems to conflict with the other docs. They say that for compiled
languages (like golang), the
--command
flag can be used to specify abuild step.
Main website "Creating CodeQL databases" docs:
https://codeql.github.com/docs/codeql-cli/creating-codeql-databases/
To do that with the GHA,
run: make
examples are given.Main README:
https://github.com/github/codeql-action/
Depends on #2219
Signed-off-by: Daniel Farrell [email protected]