-
Notifications
You must be signed in to change notification settings - Fork 634
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: Change: Ci: following guidelines
- Loading branch information
1 parent
e2a5c9d
commit ecfd655
Showing
13 changed files
with
220 additions
and
255 deletions.
There are no files selected for viewing
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
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
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
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 |
This file was deleted.
Oops, something went wrong.
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
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.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ main] | ||
tags: ["v*"] | ||
pull_request: | ||
workflow_dispatch: | ||
repository_dispatch: | ||
schedule: | ||
# rebuild image every sunday | ||
- cron: "0 0 * * 0" | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
linting: | ||
uses: ./.github/workflows/ci.yml | ||
container: | ||
needs: [build] | ||
uses: ./.github/workflows/push-container.yml | ||
# although it seems a bit odd, but that way we ensure | ||
# that we test the latest greatest thing. | ||
smoketests: | ||
needs: [container] | ||
uses: ./.github/workflows/smoketest.yaml |
Empty file.
This file was deleted.
Oops, something went wrong.
13 changes: 1 addition & 12 deletions
13
.github/workflows/container.yml → .github/workflows/push-container.yml
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: "Helm Push" | ||
|
||
on: [workflow_call] | ||
|
||
jobs: | ||
helm: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: greenbone/actions/helm-build-push@v3 | ||
if: github.event_name == 'workflow_dispatch' | ||
with: | ||
chart-name: openvasd | ||
registry: ${{ vars.IMAGE_REGISTRY }} | ||
registry-subpath: helm-charts/ | ||
registry-user: ${{ secrets.GREENBONE_BOT }} | ||
registry-token: ${{ secrets.GREENBONE_BOT_PACKAGES_WRITE_TOKEN }} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.