forked from xapi-project/xen-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add new workflow with own caching for static analysis
This needs to be merged to master first to enable the new workflow, so it contains a dummy action in the makefile that just creates an empty report. Signed-off-by: Edwin Török <[email protected]>
- Loading branch information
1 parent
f05b6ef
commit 425c136
Showing
2 changed files
with
52 additions
and
0 deletions.
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,48 @@ | ||
name: Run OCaml C stub static analyzer | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
- 'feature/**' | ||
- '*-lcm' | ||
|
||
jobs: | ||
ocaml-format: | ||
name: Ocaml files | ||
runs-on: ubuntu-22.04 | ||
env: | ||
package: "xapi-lintcstubs" | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Pull configuration from xs-opam | ||
run: | | ||
curl --fail --silent https://raw.githubusercontent.com/edwintorok/xs-opam/master/tools/xs-opam-ci.env | cut -f2 -d " " > .env | ||
- name: Load environment file | ||
id: dotenv | ||
uses: falti/[email protected] | ||
|
||
- name: Use ocaml | ||
uses: avsm/setup-ocaml@v2 | ||
with: | ||
ocaml-version: ${{ steps.dotenv.outputs.ocaml_version_full }} | ||
opam-repository: ${{ steps.dotenv.outputs.repository }} | ||
dune-cache: true | ||
|
||
- name: Install dependencies for static analyzer | ||
run: | | ||
opam update | ||
opam pin add xapi-lintcstubs . --no-action | ||
opam install --deps-only ${{env.package}} | ||
- name: Run static analyzer | ||
run: opam exec -- make analyze | ||
|
||
- name: Upload SARIF report | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: _build/default/xapi.sarif |
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