Bump github/codeql-action from 3.25.13 to 3.25.15 #180
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/*_c.yml | |
- bindings/c/** | |
- src/** | |
- Cargo.lock | |
- Cargo.toml | |
- deny.toml | |
- .gitmodules | |
pull_request: | |
paths: | |
- .github/workflows/*_c.yml | |
- bindings/c/** | |
- src/** | |
- Cargo.lock | |
- Cargo.toml | |
- deny.toml | |
- .gitmodules | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: C test | |
defaults: | |
run: | |
working-directory: bindings/c | |
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: Run Cargo Clippy | |
run: cargo clippy | |
- name: Run Cargo Fmt | |
run: cargo fmt --check | |
- name: Run Cargo Deny | |
uses: EmbarkStudios/cargo-deny-action@3f4a782664881cf5725d0ffd23969fcce89fd868 # v1.6.3 | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- name: Make Build Directory | |
run: mkdir -p build | |
- name: CMake Configure | |
working-directory: bindings/c/build | |
run: | | |
# Make cmocka a static dependency when testing. | |
cmake ../ -DBUILD_SHARED_LIBS=OFF -DBUILD_CCHECKS_TESTS=ON ${{ matrix.cmake_flags }} | |
- name: CMake Build | |
working-directory: bindings/c/build | |
run: | | |
cmake --build . --config=Debug | |
- name: Run Test | |
working-directory: bindings/c/build | |
run: ctest -C Debug -VV --output-on-failure | |
- name: Run Valgrind | |
working-directory: bindings/c/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_check | |
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/c/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-c | |
files: build/coverage.info |