Skip to content

Build Wazuh agent macOS binaries - - - #2

Build Wazuh agent macOS binaries - - -

Build Wazuh agent macOS binaries - - - #2

run-name: Build Wazuh agent macOS binaries - ${{ inputs.architecture }} - ${{ inputs.source_reference }} - ${{ inputs.id }}
name: Build Wazuh agent macOS binaries
on:
pull_request:
workflow_dispatch:
inputs:
architecture:
type: choice
description: Package architecture [intel64, arm64].
options:
- intel64
- arm64
required: true
source_reference:
type: string
description: |
Branch/tag of wazuh/wazuh-agent to generate packages.
required: true
id:
type: string
description: |
ID used to identify the workflow uniquely.
required: false
workflow_call:
inputs:
architecture:
type: string
required: true
source_reference:
type: string
required: true
id:
type: string
required: false
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
jobs:
build-binaries-agent-macos-packages:
runs-on: ${{ inputs.architecture == 'arm64' && 'macos-14' || 'macos-13' }}
timeout-minutes: 50
name: Build macOS wazuh-agent sources - ${{ inputs.architecture }}
steps:
- name: Checkout the wazuh-agent repository
uses: actions/checkout@v4
with:
repository: wazuh/wazuh-agent
ref: ${{ inputs.source_reference }}
persist-credentials: false
- name: Set up Binary caching
uses: ./.github/actions/vcpkg_related/cover_vcpkg_dependencies
with:
gh_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build repository
run: |
mkdir -p src/build && cd src/build && cmake .. && make -j $(sysctl -n hw.ncpu)
sudo rm -rf _deps vcpkg_installed
zip -r ${{ github.workspace }}/wazuh-agent-binaries-${{ inputs.architecture }}.zip ${{ github.workspace }}/
- name: Upload wazuh-agent-binaries.zip
uses: actions/upload-artifact@v4
with:
name: wazuh-agent-binaries-${{ inputs.architecture }}
path: ${{ github.workspace }}/wazuh-agent-binaries-${{ inputs.architecture }}.zip