Skip to content

Deps: Bump github/codeql-action in the actions group (#71) #152

Deps: Bump github/codeql-action in the actions group (#71)

Deps: Bump github/codeql-action in the actions group (#71) #152

Workflow file for this run

name: Build and test C
on:
push:
branches: [ main, oldstable, stable ]
pull_request:
branches: [ main, oldstable, stable ]
jobs:
c-format-check:
name: Check C Source Code Formatting
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Check Source Format
run: |
clang-format -i -style=file src/*.c
git diff --exit-code
tests:
name: Unit Tests
runs-on: 'ubuntu-latest'
container: ${{ vars.SELF_HOSTED_REGISTRY }}/community/gvm-libs:edge
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/install-dependencies-action
- name: Configure and Compile boreas
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug ..
make install
scan-build:
name: Scan-build with clang
runs-on: 'ubuntu-latest'
container: ${{ vars.SELF_HOSTED_REGISTRY }}/community/gvm-libs:edge
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ./.github/actions/install-dependencies-action
- name: Install clang tools
run: |
apt update
apt install --no-install-recommends -y clang clang-tools
rm -rf /var/lib/apt/lists/*
- name: Configure and Scan Build boreas
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
scan-build -o ~/scan-build-report cmake --build build
- name: Upload scan-build report
if: failure()
uses: actions/upload-artifact@v4
with:
name: scan-build-report
path: ~/scan-build-report/
retention-days: 7