Bump bindings/cpp/googletest from 7321f95
to 5bcb2d7
#131
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: C++ Test Suite | |
on: | |
push: | |
branches: ["main"] | |
paths: | |
- .github/workflows/*_cpp.yml | |
- bindings/cpp/** | |
- src/** | |
- Cargo.lock | |
- Cargo.toml | |
- deny.toml | |
- .gitmodules | |
pull_request: | |
paths: | |
- .github/workflows/*_cpp.yml | |
- bindings/cpp/** | |
- src/** | |
- Cargo.lock | |
- Cargo.toml | |
- deny.toml | |
- .gitmodules | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: C++ test | |
defaults: | |
run: | |
working-directory: bindings/cpp | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
include: | |
- os: ubuntu-latest | |
cmake_flags: -DBUILD_WITH_CHECK_COVERAGE=ON | |
runs-on: ${{matrix.os}} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
submodules: recursive | |
- uses: dtolnay/rust-toolchain@d0592fe69e35bc8f12e3dbaf9ad2694d976cb8e3 # stable | |
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 | |
- name: Make Build Directory | |
run: mkdir -p build | |
- name: CMake Configure | |
working-directory: bindings/cpp/build | |
run: | | |
# Make cmocka a static dependency when testing. | |
cmake ../ -DBUILD_SHARED_LIBS=OFF -DBUILD_CPPCHECKS_TESTS=ON ${{ matrix.cmake_flags }} | |
- name: CMake Build | |
working-directory: bindings/cpp/build | |
run: | | |
cmake --build . --config=Debug | |
- name: Run Test | |
working-directory: bindings/cpp/build | |
run: ctest -C Debug -VV --output-on-failure | |
- name: Run Valgrind | |
working-directory: bindings/cpp/build | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt update | |
sudo apt install -y valgrind | |
valgrind -v --leak-check=full --show-leak-kinds=all tests/test_item | |
valgrind -v --leak-check=full --show-leak-kinds=all tests/test_result | |
valgrind -v --leak-check=full --show-leak-kinds=all tests/test_runner | |
valgrind -v --leak-check=full --show-leak-kinds=all tests/test_status | |
- name: Run LCov | |
working-directory: bindings/cpp/build | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
sudo apt update | |
sudo apt install -y lcov | |
lcov -c -d . -o coverage.info | |
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0 | |
with: | |
flags: lang-cpp | |
files: build/coverage.info |