Skip to content

Commit ddcd096

Browse files
committed
Updating for multi-platform
Starting on rocky. Based on PR ossec#2158 by @cmac9203. Refactoring for make Signed-off-by: Scott R. Shinn <scott@atomicorp.com>
1 parent dc13e85 commit ddcd096

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

.github/workflows/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# GitHub Actions workflows
2+
3+
- **codeql.yml** – CodeQL analysis (push/PR to master, weekly).
4+
- **make-multi-platform.yml** – Build with Make on Rocky Linux 10 (server/agent) and Windows agent (cross-compile). Based on the multi-platform CI idea from PR #2158 by @cmac9203; adapted for this project’s Make build.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Multi-platform build workflow.
2+
# Initial CI structure and idea from PR #2158 by @cmac9203. Adapted to use the
3+
# project's Make-based build (OSSEC-HIDS does not use CMake).
4+
name: Build (multi-platform)
5+
6+
on:
7+
push:
8+
branches: [ "main", "master" ]
9+
pull_request:
10+
branches: [ "main", "master" ]
11+
12+
jobs:
13+
build-rocky:
14+
name: Rocky Linux 10 (${{ matrix.target }})
15+
runs-on: ubuntu-latest
16+
container: rockylinux:10
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
target: [ server, agent ]
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Install build dependencies
26+
run: |
27+
dnf install -y gcc make openssl-devel pcre2-devel zlib-devel \
28+
systemd-devel libevent-devel
29+
dnf install -y file-devel || true
30+
31+
- name: Build
32+
run: |
33+
cd src
34+
make TARGET=${{ matrix.target }} PCRE2_SYSTEM=yes -j$(nproc)
35+
36+
build-windows-agent:
37+
name: Windows agent (cross-compile)
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
42+
- name: Install MinGW and deps
43+
run: |
44+
sudo apt-get update -qq
45+
sudo apt-get install -y build-essential mingw-w64 libssl-dev
46+
47+
- name: Fetch PCRE2 for Windows build
48+
run: |
49+
mkdir -p src/external
50+
wget -q https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.32/pcre2-10.32.tar.gz -O - | tar xz -C src/external
51+
52+
- name: Build Windows agent
53+
run: |
54+
cd src
55+
make TARGET=winagent -j$(nproc)

0 commit comments

Comments
 (0)