Skip to content

Commit 230b72b

Browse files
authored
Merge pull request ossec#2196 from atomicturtle/actions-01
Actions 01
2 parents 27d4ce3 + 3e9a4bc commit 230b72b

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-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 9 (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: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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+
workflow_dispatch: # Run manually from Actions tab (choose branch)
12+
13+
jobs:
14+
build-rocky:
15+
name: Rocky Linux 9 (${{ matrix.target }})
16+
runs-on: ubuntu-latest
17+
container: rockylinux:9
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
target: [ server, agent ]
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Install build dependencies
27+
run: |
28+
dnf install -y dnf-plugins-core
29+
dnf config-manager --set-enabled crb || true
30+
dnf install -y gcc make openssl-devel pcre2-devel zlib-devel \
31+
systemd-devel libevent-devel
32+
dnf install -y file-devel || true
33+
34+
- name: Build
35+
run: |
36+
cd src
37+
make TARGET=${{ matrix.target }} PCRE2_SYSTEM=yes -j$(nproc)
38+
39+
build-windows-agent:
40+
name: Windows agent (cross-compile)
41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Install MinGW and deps
46+
run: |
47+
sudo apt-get update -qq
48+
sudo apt-get install -y build-essential mingw-w64 libssl-dev
49+
50+
- name: Fetch PCRE2 for Windows build
51+
run: |
52+
mkdir -p src/external
53+
wget -q https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.32/pcre2-10.32.tar.gz -O - | tar xz -C src/external
54+
55+
- name: Build Windows agent
56+
run: |
57+
cd src
58+
make TARGET=winagent -j$(nproc)

0 commit comments

Comments
 (0)