-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ffc88c1
commit ada5e6c
Showing
9 changed files
with
374 additions
and
240 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,56 @@ | ||
--- | ||
name: CPP CI ApiTracing | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- 'plugins/apitracing/**.h' | ||
- 'plugins/apitracing/**.cpp' | ||
- 'plugins/apitracing/**/CMakeLists.txt' | ||
- 'plugins/apitracing/CMakePresets.json' | ||
- 'plugins/apitracing/.clang-tidy' | ||
- 'plugins/apitracing/.clang-format' | ||
- 'plugins/apitracing/sonar-project.properties' | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- 'plugins/apitracing/**.h' | ||
- 'plugins/apitracing/**.cpp' | ||
- 'plugins/apitracing/**/CMakeLists.txt' | ||
- 'plugins/apitracing/CMakePresets.json' | ||
- 'plugins/apitracing/.clang-tidy' | ||
- 'plugins/apitracing/.clang-format' | ||
- 'plugins/apitracing/sonar-project.properties' | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: gdatacyberdefense/clang-format:16 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Perform C++ format check | ||
run: find plugins/apitracing/ -iname *.h -o -iname *.cpp | xargs clang-format --style=file --dry-run --Werror | ||
|
||
build_apitracing: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/gdatasoftwareag/vmi-build | ||
strategy: | ||
matrix: | ||
compiler: [ clang, gcc ] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build and test apitracing | ||
run: | | ||
cmake --preset ${{ matrix.compiler }}-debug | ||
cmake --build --preset ${{ matrix.compiler }}-build-debug | ||
ctest --preset ${{ matrix.compiler }}-test | ||
working-directory: plugins/apitracing |
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,56 @@ | ||
--- | ||
name: CPP CI VMICore | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- 'vmicore/**.h' | ||
- 'vmicore/**.cpp' | ||
- 'vmicore/**/CMakeLists.txt' | ||
- 'vmicore/CMakePresets.json' | ||
- 'vmicore/.clang-tidy' | ||
- 'vmicore/.clang-format' | ||
- 'vmicore/sonar-project.properties' | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- 'vmicore/**.h' | ||
- 'vmicore/**.cpp' | ||
- 'vmicore/**/CMakeLists.txt' | ||
- 'vmicore/CMakePresets.json' | ||
- 'vmicore/.clang-tidy' | ||
- 'vmicore/.clang-format' | ||
- 'vmicore/sonar-project.properties' | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: gdatacyberdefense/clang-format:16 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Perform C++ format check | ||
run: find vmicore/ -iname *.h -o -iname *.cpp | xargs clang-format --style=file --dry-run --Werror | ||
|
||
build_core: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/gdatasoftwareag/vmi-build | ||
strategy: | ||
matrix: | ||
compiler: [clang, gcc] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build and test vmicore | ||
run: | | ||
cmake --preset ${{ matrix.compiler }}-debug | ||
cmake --build --preset ${{ matrix.compiler }}-build-debug | ||
ctest --preset ${{ matrix.compiler }}-test | ||
working-directory: vmicore |
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,56 @@ | ||
--- | ||
name: CPP CI InMemory | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- 'plugins/inmemoryscanner/**.h' | ||
- 'plugins/inmemoryscanner/**.cpp' | ||
- 'plugins/inmemoryscanner/**/CMakeLists.txt' | ||
- 'plugins/inmemoryscanner/CMakePresets.json' | ||
- 'plugins/inmemoryscanner/.clang-tidy' | ||
- 'plugins/inmemoryscanner/.clang-format' | ||
- 'plugins/inmemoryscanner/sonar-project.properties' | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- 'plugins/inmemoryscanner/**.h' | ||
- 'plugins/inmemoryscanner/**.cpp' | ||
- 'plugins/inmemoryscanner/**/CMakeLists.txt' | ||
- 'plugins/inmemoryscanner/CMakePresets.json' | ||
- 'plugins/inmemoryscanner/.clang-tidy' | ||
- 'plugins/inmemoryscanner/.clang-format' | ||
- 'plugins/inmemoryscanner/sonar-project.properties' | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: gdatacyberdefense/clang-format:16 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Perform C++ format check | ||
run: find plugins/inmemoryscanner/ -iname *.h -o -iname *.cpp | xargs clang-format --style=file --dry-run --Werror | ||
|
||
build_inmemoryscanner: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/gdatasoftwareag/vmi-build | ||
strategy: | ||
matrix: | ||
compiler: [ clang, gcc ] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build and test inmemoryscanner | ||
run: | | ||
cmake --preset ${{ matrix.compiler }}-debug | ||
cmake --build --preset ${{ matrix.compiler }}-build-debug | ||
ctest --preset ${{ matrix.compiler }}-test | ||
working-directory: plugins/inmemoryscanner |
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,56 @@ | ||
--- | ||
name: CPP CI Template | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
paths: | ||
- 'plugins/template/**.h' | ||
- 'plugins/template/**.cpp' | ||
- 'plugins/template/**/CMakeLists.txt' | ||
- 'plugins/template/CMakePresets.json' | ||
- 'plugins/template/.clang-tidy' | ||
- 'plugins/template/.clang-format' | ||
- 'plugins/template/sonar-project.properties' | ||
pull_request: | ||
branches: | ||
- "main" | ||
paths: | ||
- 'plugins/template/**.h' | ||
- 'plugins/template/**.cpp' | ||
- 'plugins/template/**/CMakeLists.txt' | ||
- 'plugins/template/CMakePresets.json' | ||
- 'plugins/template/.clang-tidy' | ||
- 'plugins/template/.clang-format' | ||
- 'plugins/template/sonar-project.properties' | ||
|
||
jobs: | ||
format: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: gdatacyberdefense/clang-format:16 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Perform C++ format check | ||
run: find plugins/template/ -iname *.h -o -iname *.cpp | xargs clang-format --style=file --dry-run --Werror | ||
|
||
build_template: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/gdatasoftwareag/vmi-build | ||
strategy: | ||
matrix: | ||
compiler: [ clang, gcc ] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build and test template | ||
run: | | ||
cmake --preset ${{ matrix.compiler }}-debug | ||
cmake --build --preset ${{ matrix.compiler }}-build-debug | ||
ctest --preset ${{ matrix.compiler }}-test | ||
working-directory: plugins/template |
This file was deleted.
Oops, something went wrong.
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,50 @@ | ||
--- | ||
name: Sonar Scanner ApiTracing | ||
|
||
on: | ||
workflow_run: | ||
workflows: [CPP CI ApiTracing] | ||
types: | ||
- requested | ||
|
||
jobs: | ||
apitracing_sonar_scanner: | ||
runs-on: ubuntu-latest | ||
# Replicate build environment (path sctructure) | ||
container: | ||
image: ghcr.io/gdatasoftwareag/vmi-build | ||
env: | ||
BUILD_WRAPPER_OUT_DIR: sonar/ | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
repository: ${{ github.event.workflow_run.head_repository.full_name }} | ||
ref: ${{ github.event.workflow_run.head_branch }} | ||
fetch-depth: 0 | ||
|
||
- name: Install sonar-scanner | ||
uses: SonarSource/sonarcloud-github-c-cpp@v1 | ||
|
||
- name: Build and test apitracing | ||
run: | | ||
cmake --preset gcc-debug -D APITRACING_TEST_COVERAGE:BOOL=ON | ||
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build --preset gcc-build-debug | ||
ctest --preset gcc-test | ||
cd build-gcc-debug | ||
gcovr -r .. --sonarqube > ../coverage.xml | ||
working-directory: plugins/apitracing | ||
|
||
- name: Run sonar-scanner | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: | | ||
sonar-scanner \ | ||
-D sonar.cfamily.build-wrapper-output=${{ env.BUILD_WRAPPER_OUT_DIR }} \ | ||
-D sonar.coverageReportPaths=coverage.xml \ | ||
-D sonar.scm.revision=${{ github.event.workflow_run.head_sha }} \ | ||
-D sonar.pullrequest.key=${{ github.event.workflow_run.pull_requests[0].number }} \ | ||
-D sonar.pullrequest.branch=${{ github.event.workflow_run.pull_requests[0].head.ref }} \ | ||
-D sonar.pullrequest.base=${{ github.event.workflow_run.pull_requests[0].base.ref }} | ||
working-directory: plugins/apitracing/ |
Oops, something went wrong.