forked from xenserver/xha
-
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.
Merge pull request xenserver#20 from edwintorok/private/edvint/ci
Add a CI to `xha` repo
- Loading branch information
Showing
5 changed files
with
101 additions
and
7 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,53 @@ | ||
name: "CodeChecker analysis" | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
concurrency: # On new push, cancel old workflows from the same PR, branch or tag: | ||
group: ${{ github.workflow }}-${{github.event_name}}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
analyze: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
security-events: write | ||
steps: | ||
- name: "Check out repository" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Install dependencies" | ||
run: sudo apt-get install -y libxml2-dev libxen-dev bear | ||
|
||
# ldlogger.so in codechecker seems to have been built for 32-bit, | ||
# use bear instead | ||
- name: "Create compilation commands database" | ||
run: bear -- make debug | ||
|
||
# SARIF output conversion support is only in master | ||
# hence install-custom is set to true | ||
# Uses Cross-Translation-Unit analysis, which is best supported in CodeChecker, not scan-build | ||
- uses: whisperity/codechecker-analysis-action@v1 | ||
id: codechecker | ||
with: | ||
install-custom: true | ||
logfile: ${{ github.workspace }}/compile_commands.json | ||
ctu: true | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: "CodeChecker Bug Reports" | ||
path: ${{ steps.codechecker.outputs.result-html-dir }} | ||
|
||
# TODO: how to get the path here? | ||
# for some reason this exits with 2 probably to mean errors were found, but we need a successful exit | ||
- name: "Convert to SARIF" | ||
run: /home/runner/work/xha/xha/CodeChecker/analyzer/build/CodeChecker/bin/CodeChecker parse -e sarif ${{ steps.codechecker.outputs.analyze-output }} -o codechecker.sarif | ||
continue-on-error: true | ||
|
||
- name: Upload SARIF file | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: codechecker.sarif | ||
category: codechecker |
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,41 @@ | ||
name: Build and test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
merge_group: | ||
|
||
concurrency: # On new push, cancel old workflows from the same PR, branch or tag: | ||
group: ${{ github.workflow }}-${{github.event_name}}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build-ubuntu: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install dependencies (apt) | ||
run: sudo apt-get install -y libxml2-dev libxen-dev | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build | ||
run: make | ||
|
||
build-container: | ||
strategy: | ||
matrix: | ||
image: | ||
- fedora:latest | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ${{ matrix.image }} | ||
steps: | ||
- name: Install dependencies (dnf) | ||
run: dnf install -y libxml2-devel xen-devel make gcc | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build | ||
run: make |
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