forked from wazuh/wazuh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request wazuh#24664 from wazuh/11334-dev-new-wazuh-engine
Wazuh engine feature complete phase 1
- Loading branch information
Showing
1,499 changed files
with
301,020 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Engine Health Test | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on pull request events but only for the engine base branch and with changes in the src/engine/ directory. | ||
pull_request: | ||
types: | ||
- ready_for_review | ||
- synchronize | ||
paths: | ||
- 'src/engine/**' | ||
|
||
# Allows to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Ensures only one instance of this workflow is running per PR | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
ENGINE_DIR: ${{github.workspace}}/src/engine | ||
|
||
jobs: | ||
build: | ||
name: Engine Health Test | ||
|
||
# Runs only if the PR status is different to Draft | ||
if: ${{ !github.event.pull_request.draft }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache CMake and ccache | ||
uses: hendrikmuhs/ccache-action@v1.2 | ||
with: | ||
key: ${{ github.workflow }}-${{ runner.os }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
# Install behave | ||
run: | | ||
pip install ${{env.ENGINE_DIR}}/tools/api-communication/ | ||
pip install ${{env.ENGINE_DIR}}/test/integration_tests/it-utils/ | ||
pip install ${{env.ENGINE_DIR}}/tools/engine-suite/ | ||
- name: Configure CMake | ||
# Configure the CMake build system with the specified build type | ||
run: cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -S ${{env.ENGINE_DIR}} -B ${{env.ENGINE_DIR}}/build | ||
|
||
- name: Build | ||
# Build the specified target using CMake | ||
run: cmake --build ${{env.ENGINE_DIR}}/build --config ${{env.BUILD_TYPE}} --target main -j2 | ||
|
||
- name: Setup environment | ||
# Set Engine Configuration | ||
run: python3 ${{env.ENGINE_DIR}}/test/setupEnvironment.py -e /tmp/actions | ||
|
||
- name: Initial state | ||
run: python3 ${{env.ENGINE_DIR}}/test/health_test/initialState.py -e /tmp/actions | ||
|
||
- name: Health Test | ||
# Run integration tests using behave | ||
run: python3 ${{env.ENGINE_DIR}}/test/health_test/run.py -e /tmp/actions |
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,70 @@ | ||
name: Engine Helper Functions Test | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on pull request events but only for the engine base branch and with changes in the src/engine/ directory. | ||
pull_request: | ||
types: | ||
- ready_for_review | ||
- synchronize | ||
paths: | ||
- 'src/engine/**' | ||
|
||
# Allows to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Ensures only one instance of this workflow is running per PR | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
ENGINE_DIR: ${{github.workspace}}/src/engine | ||
|
||
jobs: | ||
build: | ||
name: Engine Helper Functions Test | ||
|
||
# Runs only if the PR status is different to Draft | ||
if: ${{ !github.event.pull_request.draft }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache CMake and ccache | ||
uses: hendrikmuhs/ccache-action@v1.2 | ||
with: | ||
key: ${{ github.workflow }}-${{ runner.os }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install ${{env.ENGINE_DIR}}/tools/api-communication/ | ||
pip install ${{env.ENGINE_DIR}}/test/integration_tests/it-utils/ | ||
pip install ${{env.ENGINE_DIR}}/tools/engine-suite/ | ||
pip install ${{env.ENGINE_DIR}}/test/helper_tests/engine_helper_test | ||
- name: Configure CMake | ||
# Configure the CMake build system with the specified build type | ||
run: cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -S ${{env.ENGINE_DIR}} -B ${{env.ENGINE_DIR}}/build | ||
|
||
- name: Build | ||
# Build the specified target using CMake | ||
run: cmake --build ${{env.ENGINE_DIR}}/build --config ${{env.BUILD_TYPE}} --target main -j2 | ||
|
||
- name: Setup environment | ||
# Set Engine Configuration | ||
run: python3 ${{env.ENGINE_DIR}}/test/setupEnvironment.py -e /tmp/actions | ||
|
||
- name: Initial state | ||
run: engine-helper-test-initial-state -e /tmp/actions -b ${{env.ENGINE_DIR}}/build/main --mmdb ${{env.ENGINE_DIR}}/test/helper_tests/mmdb/ --conf ${{env.ENGINE_DIR}}/test/helper_tests/configuration_files/general.conf | ||
|
||
- name: Helper Functions Test | ||
run: engine-helper-test-generate-runner -e /tmp/actions -b ${{env.ENGINE_DIR}}/build/main -i ${{env.ENGINE_DIR}}/test/helper_tests/helpers_description/ -o /tmp/output/ |
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,72 @@ | ||
name: Engine Integration Test | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on pull request events but only for the engine base branch and with changes in the src/engine/ directory. | ||
pull_request: | ||
types: | ||
- ready_for_review | ||
- synchronize | ||
paths: | ||
- 'src/engine/**' | ||
|
||
# Allows to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Ensures only one instance of this workflow is running per PR | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
ENGINE_DIR: ${{github.workspace}}/src/engine | ||
|
||
jobs: | ||
build: | ||
name: Engine Integration Test | ||
|
||
# Runs only if the PR status is different to Draft | ||
if: ${{ !github.event.pull_request.draft }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache CMake and ccache | ||
uses: hendrikmuhs/ccache-action@v1.2 | ||
with: | ||
key: ${{ github.workflow }}-${{ runner.os }} | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install dependencies | ||
# Install behave | ||
run: | | ||
pip install ${{env.ENGINE_DIR}}/tools/api-communication/ | ||
pip install ${{env.ENGINE_DIR}}/test/integration_tests/it-utils/ | ||
pip install ${{env.ENGINE_DIR}}/tools/engine-suite/ | ||
pip install behave | ||
- name: Configure CMake | ||
# Configure the CMake build system with the specified build type | ||
run: cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -S ${{env.ENGINE_DIR}} -B ${{env.ENGINE_DIR}}/build | ||
|
||
- name: Build | ||
# Build the specified target using CMake | ||
run: cmake --build ${{env.ENGINE_DIR}}/build --config ${{env.BUILD_TYPE}} --target main -j2 | ||
|
||
- name: Setup environment | ||
# Set Engine Configuration | ||
run: python3 ${{env.ENGINE_DIR}}/test/setupEnvironment.py -e /tmp/actions | ||
|
||
- name: Initial state | ||
run: python3 ${{env.ENGINE_DIR}}/test/integration_tests/initialState.py -e /tmp/actions | ||
|
||
- name: Integration Test | ||
# Run integration tests using behave | ||
run: python3 ${{env.ENGINE_DIR}}/test/integration_tests/run.py -e /tmp/actions |
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,53 @@ | ||
name: Engine Unit Test | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on pull request events but only for the engine base branch and with changes in the src/engine/ directory. | ||
pull_request: | ||
types: | ||
- ready_for_review | ||
- synchronize | ||
paths: | ||
- 'src/engine/**' | ||
|
||
# Allows to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Ensures only one instance of this workflow is running per PR | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
env: | ||
BUILD_TYPE: Release | ||
ENGINE_DIR: ${{github.workspace}}/src/engine | ||
|
||
jobs: | ||
build: | ||
name: Engine Unit Test | ||
|
||
# Runs only if the PR status is different to Draft | ||
if: ${{ !github.event.pull_request.draft }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Cache CMake and ccache | ||
uses: hendrikmuhs/ccache-action@v1.2 | ||
with: | ||
key: ${{ github.workflow }}-${{ runner.os }} | ||
|
||
- name: Configure CMake | ||
# Configure the CMake build system with the specified build type | ||
run: cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -S ${{env.ENGINE_DIR}} -B ${{env.ENGINE_DIR}}/build | ||
|
||
- name: Build | ||
# Build the specified target using CMake | ||
run: cmake --build ${{env.ENGINE_DIR}}/build --config ${{env.BUILD_TYPE}} --target all -j2 | ||
|
||
- name: Unit Test | ||
# Run unit tests using CTest | ||
working-directory: ${{env.ENGINE_DIR}}/build | ||
run: ctest -C ${{env.BUILD_TYPE}} -T test --output-on-failure -j2 |
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,50 @@ | ||
... | ||
AccessModifierOffset: '-4' | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: 'false' | ||
AlignConsecutiveDeclarations: 'false' | ||
AlignConsecutiveMacros: 'true' | ||
AlignEscapedNewlines: Right | ||
AlignOperands: 'true' | ||
AlignTrailingComments: 'true' | ||
AllowAllArgumentsOnNextLine: 'true' | ||
AllowAllConstructorInitializersOnNextLine: 'true' | ||
AllowAllParametersOfDeclarationOnNextLine: 'true' | ||
AllowShortBlocksOnASingleLine: 'false' | ||
AllowShortCaseLabelsOnASingleLine: 'true' | ||
AllowShortFunctionsOnASingleLine: Inline | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLambdasOnASingleLine: Inline | ||
AllowShortLoopsOnASingleLine: 'true' | ||
AlwaysBreakBeforeMultilineStrings: 'false' | ||
AlwaysBreakTemplateDeclarations: 'Yes' | ||
BinPackArguments: 'false' | ||
BinPackParameters: 'false' | ||
BreakBeforeBinaryOperators: NonAssignment | ||
BreakBeforeBraces: Allman | ||
BreakConstructorInitializers: BeforeComma | ||
BreakInheritanceList: BeforeComma | ||
ColumnLimit: 120 | ||
Cpp11BracedListStyle: 'true' | ||
FixNamespaceComments: 'true' | ||
IncludeBlocks: Preserve | ||
IndentCaseLabels: 'true' | ||
IndentWidth: '4' | ||
PointerAlignment: Left | ||
SortIncludes: 'true' | ||
SpaceAfterCStyleCast: 'false' | ||
SpaceAfterLogicalNot: 'false' | ||
SpaceAfterTemplateKeyword: 'false' | ||
SpaceBeforeAssignmentOperators: 'true' | ||
SpaceBeforeCpp11BracedList: 'true' | ||
SpaceBeforeCtorInitializerColon: 'true' | ||
SpaceBeforeInheritanceColon: 'true' | ||
SpaceBeforeParens: ControlStatements | ||
SpaceInEmptyParentheses: 'false' | ||
SpacesInAngles: 'false' | ||
Standard: Auto | ||
TabWidth: '4' | ||
UseTab: Never | ||
--- | ||
Language: Proto | ||
DisableFormat: false |
Oops, something went wrong.