Skip to content

Change: Ensure dir exists in pidfile_create #938

Change: Ensure dir exists in pidfile_create

Change: Ensure dir exists in pidfile_create #938

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@v3
- name: Check Source Format
run: |
clang-format -i -style=file {base,boreas,gmp,osp,util}/*.{c,h}
git diff --exit-code
tests:
name: Unit Tests
runs-on: 'ubuntu-latest'
container: greenbone/gvm-libs-build:unstable
steps:
- uses: actions/checkout@v3
- name: Configure and Compile gvm-libs
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=1 ..
make install
- name: Test gvm-libs
run: |
cd build
make tests
CTEST_OUTPUT_ON_FAILURE=1 make test
scan-build:
name: Scan-build gvm-libs with clang
runs-on: 'ubuntu-latest'
container: greenbone/gvm-libs-build:unstable
steps:
- uses: actions/checkout@v3
- name: Install clang tools
run: |
apt update
apt install --no-install-recommends -y clang clang-format clang-tools
rm -rf /var/lib/apt/lists/*
- name: Configure and Scan Build gvm-libs
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@v3
with:
name: scan-build-report
path: ~/scan-build-report/
retention-days: 7