Update README.md #95
Workflow file for this run
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
name: Tests | |
on: | |
push: | |
branches: main | |
pull_request: | |
jobs: | |
cpp-lint: | |
name: C++ Formatting Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- name: Run clang-format style check | |
uses: jidicula/[email protected] | |
with: | |
clang-format-version: '14' | |
check-path: solutions | |
py-lint: | |
name: Python Formatting Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- name: Run black style check | |
uses: rickstaa/action-black@v1 | |
with: | |
black_args: ". --check --diff" | |
unit-tests: | |
name: Unit Tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
type: ['RelWithDebInfo'] | |
os: ['ubuntu-22.04'] | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- name: Ccache | |
uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ matrix.os }}-${{ matrix.type }} | |
- name: Build with CMake | |
uses: lukka/run-cmake@v3 | |
with: | |
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | |
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | |
cmakeAppendedArgs: '-DCMAKE_BUILD_TYPE=${{ matrix.type }} -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache' | |
buildWithCMake: true | |
buildDirectory: '${{ github.workspace }}/build' | |
- name: Run CTest | |
working-directory: ${{github.workspace}}/build | |
run: ctest -VVV -C ${{ matrix.type }} |