Skip to content

Commit

Permalink
WIP: Change: Ci: following guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
nichtsfrei committed Jan 16, 2024
1 parent daee772 commit 6635a47
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: "Build"

on:
push:
branches: [ main ]
pull_request:

jobs:
OpenVAS:
runs-on: ubuntu-latest
strategy:
matrix:
# With the upcoming changes, we require both downwards and upwards compatibility between the OpenVAS C
# code and GVM-libs. This is because, even though we will be using semantic versioning, as long as
# OpenVAS and GVM-libs remain separate repositories, we want to be notified of every change.
gvm-libs-version:
- stable
- unstable
container: greenbone/gvm-libs:${{ matrix.gvm-libs-version }}
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sh .github/install-openvas-dependencies.sh
- name: build
run: |
cmake -Bbuild -DCMAKE_C_COMPILER=/usr/share/clang/scan-build-14/libexec/ccc-analyzer
scan-build -o ~/scan-build-report cmake --build build
- name: Upload scan-build report
uses: actions/upload-artifact@v3
with:
name: scan-build-report
path: ~/scan-build-report/
retention-days: 7
OpenVAS_Daemon:
uses: ./.github/workflows/build-rust.yml
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Linting"

on:
push:
branches: [ main]
pull_request:

jobs:
OpenVAS:
runs-on: ubuntu-latest
container: greenbone/gvm-libs:stable
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: |
sh .github/install-openvas-dependencies.sh
- name: Formatting
run: |
clang-format -i -style=file {src,misc,nasl}/*.{c,h}
git diff --exit-code
- name: unit-tests
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build -- tests test
OpenVASd_Daemon:
runs-on: ubuntu-latest
defaults:
run:
working-directory: rust
- uses: actions/checkout@v4
- run: sudo apt update && sudo apt-get install -y libpcap-dev
- run: rustup update stable && rustup default stable || rustup default stable
- run: cargo install cargo-audit
- run: cargo install typos-cli
- name: unit-tests
run: cargo test --lib --tests --workspace
- run: cargo clippy -- -D warnings
- run: cargo audit
- run: typos
- run: cargo fmt --check
File renamed without changes.
Empty file.
Empty file added .github/workflows/push.yml
Empty file.

0 comments on commit 6635a47

Please sign in to comment.