Skip to content

Commit d15740a

Browse files
authored
Merge pull request ossec#2197 from atomicturtle/actions-03
Update for windows build
2 parents 230b72b + 2d293dd commit d15740a

File tree

2 files changed

+19
-10
lines changed

2 files changed

+19
-10
lines changed

.github/workflows/make-multi-platform.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,28 @@ jobs:
3939
build-windows-agent:
4040
name: Windows agent (cross-compile)
4141
runs-on: ubuntu-latest
42+
container: fedora:40
4243
steps:
4344
- uses: actions/checkout@v4
4445

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
46+
- name: Install build dependencies
5147
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
48+
dnf -y install \
49+
gcc \
50+
make \
51+
mingw32-gcc \
52+
mingw32-binutils \
53+
mingw32-nsis \
54+
mingw32-pcre2 \
55+
mingw32-zlib \
56+
mingw32-openssl \
57+
perl \
58+
wget \
59+
tar \
60+
perl-Time-HiRes \
61+
which
5462
5563
- name: Build Windows agent
5664
run: |
5765
cd src
58-
make TARGET=winagent -j$(nproc)
66+
make TARGET=winagent PCRE2_SYSTEM=yes ZLIB_SYSTEM=yes -j$(nproc)

src/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ ifneq (${ZLIB_SYSTEM},no)
173173
endif
174174

175175
ifeq (${TARGET}, winagent)
176-
PCRE2_SYSTEM=no
176+
ZLIB_SYSTEM?=no
177+
PCRE2_SYSTEM?=no
177178
endif
178179

179180
ifeq (${PCRE2_SYSTEM},no)

0 commit comments

Comments
 (0)