Skip to content

Packages - Build Wazuh agent macOS packages - intel64 #11

Packages - Build Wazuh agent macOS packages - intel64

Packages - Build Wazuh agent macOS packages - intel64 #11

run-name: Packages - Build Wazuh agent macOS packages - ${{ inputs.architecture }}${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }} ${{ inputs.id }}
name: Build Wazuh agent macOS packages
on:
workflow_dispatch:
inputs:
architecture:
type: choice
description: Package architecture [intel64, arm64].
options:
- intel64
- arm64
required: true
revision:
type: string
description: |
Package revision (name and metadata).
Default is '0'.
required: false
default: '0'
is_stage:
type: boolean
description: |
Set production nomenclature if true.
Default is 'false'.
required: false
checksum:
type: boolean
description: |
Generate package checksum.
Default is 'false'.
required: false
source_reference:
type: string
description: |
Branch/tag of wazuh/wazuh-agent to generate packages.
required: true
upload_to_s3:
type: boolean
description: |
Upload generated package to S3.
Default is 'false'.
default: false
required: false
id:
type: string
description: |
ID used to identify the workflow uniquely.
required: false
workflow_call:
inputs:
architecture:
type: string
required: true
revision:
type: string
required: false
is_stage:
type: boolean
required: false
checksum:
type: boolean
required: false
source_reference:
type: string
required: true
upload_to_s3:
type: boolean
required: false
id:
type: string
required: false
jobs:
build-binaries-agent-macos-packages:
runs-on: ${{ inputs.architecture == 'arm64' && 'macos-14' || 'macos-13' }}
timeout-minutes: 50
name: Build Mac OS 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: Compile Linux Repositorys
uses: ./.github/actions/macos_compile_repository
with:
architecture: ${{ inputs.architecture }}
gh_token: ${{ github.token }}
build-package-agent-macos-packages:
needs: build-binaries-agent-macos-packages
runs-on: macos-14
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
timeout-minutes: 50
name: Build Mac OS wazuh-agent package - ${{ inputs.architecture }}${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }}
steps:
- name: Checkout the wazuh-agent repository
uses: actions/checkout@v4
with:
repository: wazuh/wazuh-agent
ref: ${{ inputs.source_reference }}
persist-credentials: false
- name: Build Mac OS Package - ${{ inputs.architecture }}
uses: ./.github/actions/macos_package_binaries
with:
architecture: ${{ inputs.architecture }}
revision: ${{ inputs.revision }}
is_stage: ${{ inputs.is_stage }}
checksum: ${{ inputs.checksum }}
test-package-agent-macos-packages:
needs: build-package-agent-macos-packages
runs-on: ${{ inputs.architecture == 'arm64' && 'macos-14' || 'macos-13' }}
timeout-minutes: 50
name: Test Mac OS wazuh-agent package - ${{ inputs.architecture }}${{ inputs.is_stage && ' - is stage' || '' }}${{ inputs.checksum && ' - checksum' || '' }}
steps:
- name: Checkout the wazuh-agent repository
uses: actions/checkout@v4
with:
repository: wazuh/wazuh-agent
ref: ${{ inputs.source_reference }}
persist-credentials: false
- name: Test Mac OS Package - ${{ inputs.architecture }}
uses: ./.github/actions/macos_test_package
with:
checksum: ${{ inputs.checksum }}
upload_to_s3: 'false'