-
Notifications
You must be signed in to change notification settings - Fork 3
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
b252578
commit a9974e0
Showing
4 changed files
with
24 additions
and
31 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and test | ||
name: PR check | ||
|
||
on: | ||
pull_request: | ||
|
@@ -85,11 +85,11 @@ jobs: | |
|
||
- name: Configure CMake (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=On -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCAPS_LOG_BUILD_TESTS=On -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake | ||
|
||
- name: Configure CMake (Windows) | ||
if: matrix.os != 'windows-latest' | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=On | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCAPS_LOG_BUILD_TESTS=On | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config Release | ||
|
@@ -98,32 +98,24 @@ jobs: | |
working-directory: ${{ github.workspace }}/build | ||
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure | ||
|
||
|
||
static-analysis: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- run: sudo apt-get update && sudo apt-get install libboost-program-options-dev libgit2-dev | ||
- run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DCAPS_LOG_BUILD_TESTS=On | ||
- uses: cpp-linter/cpp-linter-action@v2 | ||
id: linter | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
version: 19 | ||
database: 'build' | ||
style: 'file' # Use .clang-format config file | ||
tidy-checks: '' # Use .clang-tidy config file | ||
# only 'update' a single comment in a pull request's thread. | ||
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} | ||
- name: Fail fast?! | ||
if: steps.linter.outputs.checks-failed > 0 | ||
run: exit 1 | ||
|
||
- name: Prepare environment | ||
run: sudo apt-get update && sudo apt-get install libboost-program-options-dev libgit2-dev clang-tidy | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=Off | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config Release | ||
|
||
- name: Static Analysis | ||
run: ln -s ./build/compile_commands.json ./ && run-clang-tidy ./source/ | ||
|
||
code-formatting: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: DoozyX/[email protected] | ||
with: | ||
source: 'source test' | ||
extensions: 'hpp,cpp' | ||
clangFormatVersion: 16 |
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