Skip to content

Components - Build agent_info #9

Components - Build agent_info

Components - Build agent_info #9

run-name: Components - Build ${{ inputs.components }}
name: Build and Run Tests
on:
workflow_dispatch:
inputs:
source_reference:
description: |
Branch from wazuh/wazuh-agent repository to use.
required: true
components:
description: 'Select agent components/s to tested'
required: true
type: choice
- agent_info
- communicator
- configuration_parser
- multitype_queue
- sqlite_manager
workflow_call:
inputs:
source_reference:
type: string
required: true
components:
type: string
required: true
jobs:
Build-component-and-test:
runs-on: ubuntu-latest
timeout-minutes: 10
name: Build ${{ inputs.components }}
steps:
- name: Checkout wazuh/wazuh-agent repository
uses: actions/checkout@v4
with:
repository: wazuh/wazuh-agent
ref: ${{ inputs.source_reference }}
- name: Initializing Submodules
run: |
git submodule update --init --recursive
cd src/vcpkg && ./bootstrap-vcpkg.sh
- name: Build component
run: |
cd src/agent/${{ inputs.components }}
mkdir build && cd build
cmake .. -DBUILD_TESTS=ON
make
- name: Run the tests
run: |
cd src/agent/${{ inputs.components }}/build && ctest -V