Skip to content

Merge pull request #2197 from atomicturtle/actions-03 #3

Merge pull request #2197 from atomicturtle/actions-03

Merge pull request #2197 from atomicturtle/actions-03 #3

# Multi-platform build workflow.
# Initial CI structure and idea from PR #2158 by @cmac9203. Adapted to use the
# project's Make-based build (OSSEC-HIDS does not use CMake).
name: Build (multi-platform)
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
workflow_dispatch: # Run manually from Actions tab (choose branch)
jobs:
build-rocky:
name: Rocky Linux 9 (${{ matrix.target }})
runs-on: ubuntu-latest
container: rockylinux:9
strategy:
fail-fast: false
matrix:
target: [ server, agent ]
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
dnf install -y dnf-plugins-core
dnf config-manager --set-enabled crb || true
dnf install -y gcc make openssl-devel pcre2-devel zlib-devel \
systemd-devel libevent-devel
dnf install -y file-devel || true
- name: Build
run: |
cd src
make TARGET=${{ matrix.target }} PCRE2_SYSTEM=yes -j$(nproc)
build-windows-agent:
name: Windows agent (cross-compile)
runs-on: ubuntu-latest
container: fedora:40
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
dnf -y install \
gcc \
make \
mingw32-gcc \
mingw32-binutils \
mingw32-nsis \
mingw32-pcre2 \
mingw32-zlib \
mingw32-openssl \
perl \
wget \
tar \
perl-Time-HiRes \
which
- name: Build Windows agent
run: |
cd src
make TARGET=winagent PCRE2_SYSTEM=yes ZLIB_SYSTEM=yes -j$(nproc)