Components - Build agent_info #3
Workflow file for this run
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
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: Build component | |
run: | | |
ls | |
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 | |