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 19, 2024
1 parent e2a5c9d commit 3771a80
Show file tree
Hide file tree
Showing 20 changed files with 498 additions and 447 deletions.
2 changes: 2 additions & 0 deletions .github/install-openvas-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ apt-get update && apt-get install --no-install-recommends --no-install-suggests
clang-tools \
cmake \
curl \
git \
lcov \
libgnutls28-dev \
libgpgme-dev \
Expand All @@ -28,6 +29,7 @@ apt-get update && apt-get install --no-install-recommends --no-install-suggests
libpopt0 \
libcurl4 \
libcurl4-gnutls-dev \
libhiredis0.14 \
&& rm -rf /var/lib/apt/lists/*

curl -L -o cgreen.tar.gz https://github.com/cgreen-devs/cgreen/archive/refs/tags/1.6.2.tar.gz -k
Expand Down
4 changes: 4 additions & 0 deletions .github/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
openvas:
repository: temp-openvas-scanner
pullPolicy: Always
tag: "latest"
5 changes: 5 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# CI Setup

- control.yml - is the actual ci definitions it includes all other workflow calls.
- init.yml - set the variables to control jobs. It defines if it is a release, or a commit, if a docker image is used...
- ./push-container.yml - builds and may push container
66 changes: 0 additions & 66 deletions .github/workflows/build-container.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Build"

on: [workflow_call]

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: 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
61 changes: 0 additions & 61 deletions .github/workflows/build_and_test.yml

This file was deleted.

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: [workflow_call]

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 --dry-run --Werror -i -style=file {src,misc,nasl}/*.{c,h}
- name: unit-tests
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release
CTEST_OUTPUT_ON_FAILURE=1 cmake --build build -- tests test
OpenVAS_Daemon:
runs-on: ubuntu-latest
defaults:
run:
working-directory: rust
steps:
- 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
- name: Clippy
run: cargo clippy -- -D warnings
- name: Audit
run: cargo audit
- run: typos
- name: Formatting
run: cargo fmt --check
File renamed without changes.
155 changes: 0 additions & 155 deletions .github/workflows/container.yml

This file was deleted.

Loading

0 comments on commit 3771a80

Please sign in to comment.