mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-15 17:12:14 +03:00
test
This commit is contained in:
88
.github/workflows/test-ci-windows.yml
vendored
88
.github/workflows/test-ci-windows.yml
vendored
@@ -9,61 +9,39 @@ on:
|
|||||||
- v2/test-ci-windows
|
- v2/test-ci-windows
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
check-apache-structure:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Check Apache24 directory structure
|
||||||
uses: actions/checkout@v5
|
|
||||||
|
|
||||||
- name: Setup MSYS2
|
|
||||||
uses: msys2/setup-msys2@v2
|
|
||||||
with:
|
|
||||||
msystem: UCRT64
|
|
||||||
update: true
|
|
||||||
install: >
|
|
||||||
git
|
|
||||||
make
|
|
||||||
autoconf
|
|
||||||
automake
|
|
||||||
libtool
|
|
||||||
mingw-w64-ucrt-x86_64-gcc
|
|
||||||
mingw-w64-ucrt-x86_64-pkg-config
|
|
||||||
|
|
||||||
- name: Clone and build ssdeep
|
|
||||||
shell: msys2 {0}
|
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/ssdeep-project/ssdeep.git --depth 1
|
$apachePath = "C:\tools\Apache24"
|
||||||
cd ssdeep
|
|
||||||
autoreconf -i
|
if (Test-Path $apachePath) {
|
||||||
./configure --enable-shared --disable-static CFLAGS="-O3" CXXFLAGS="-O3"
|
Write-Host "Apache24 directory exists at: $apachePath"
|
||||||
make dll
|
Write-Host "Subdirectories:"
|
||||||
mkdir -p ${{ github.workspace }}/ssdeep-install/bin
|
Get-ChildItem -Path $apachePath -Directory | ForEach-Object {
|
||||||
mkdir -p ${{ github.workspace }}/ssdeep-install/include
|
Write-Host " - $($_.Name)"
|
||||||
cp fuzzy.dll ${{ github.workspace }}/ssdeep-install/bin/
|
}
|
||||||
cp fuzzy.h ${{ github.workspace }}/ssdeep-install/include/
|
|
||||||
cp fuzzy.def ${{ github.workspace }}/ssdeep-install/
|
Write-Host "`nChecking for APR headers in include directory:"
|
||||||
|
$includePath = Join-Path $apachePath "include"
|
||||||
- name: Configure CMake for IIS Module
|
if (Test-Path $includePath) {
|
||||||
run: |
|
Get-ChildItem -Path $includePath -Filter "apr*.h" | Select-Object -First 10 | ForEach-Object {
|
||||||
cmake `
|
Write-Host " - $($_.Name)"
|
||||||
-DAPACHE_ROOT="C:/tools/Apache24" `
|
}
|
||||||
-DSSDEEP_ROOT="${{ github.workspace }}/ssdeep-install" `
|
|
||||||
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}/install" `
|
# 特别检查 apr_perms_set.h
|
||||||
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" `
|
$permsSetPath = Join-Path $includePath "apr_perms_set.h"
|
||||||
-DWITH_SSDEEP=ON `
|
if (Test-Path $permsSetPath) {
|
||||||
-DWITH_LUA=ON `
|
Write-Host "`nFOUND: apr_perms_set.h exists at $permsSetPath"
|
||||||
-DWITH_YAJL=ON `
|
} else {
|
||||||
-S IIS -B iis/build
|
Write-Host "`nMISSING: apr_perms_set.h not found in $includePath"
|
||||||
|
}
|
||||||
- name: Build IIS Module
|
} else {
|
||||||
shell: pwsh
|
Write-Host " Include directory not found at $includePath"
|
||||||
run: |
|
}
|
||||||
cmake --build iis/build --config Release
|
} else {
|
||||||
|
Write-Host "Apache24 directory does not exist at: $apachePath"
|
||||||
# - name: Package IIS Module with WiX
|
}
|
||||||
# shell: pwsh
|
shell: pwsh
|
||||||
# run: |
|
|
||||||
# $CURRENT_DIR = "${{ github.workspace }}/iis/wix"
|
|
||||||
# candle.exe -ext WixUtilExtension -ext WixUIExtension "$CURRENT_DIR\installer.wxs" -out "$CURRENT_DIR\installer.wixobj" -arch x64
|
|
||||||
# light.exe -ext WixUtilExtension -ext WixUIExtension "$CURRENT_DIR\installer.wixobj" -out "$CURRENT_DIR\installer-64.msi"
|
|
||||||
Reference in New Issue
Block a user