mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-15 17:12:14 +03:00
test package
This commit is contained in:
51
.github/workflows/test-ci-windows.yml
vendored
51
.github/workflows/test-ci-windows.yml
vendored
@@ -92,11 +92,12 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
$archFlag = "${{ matrix.arch }}"
|
$archFlag = "${{ matrix.arch }}"
|
||||||
$cmakeArch = if ($archFlag -eq "x86") { "Win32" } else { "x64" }
|
$cmakeArch = if ($archFlag -eq "x86") { "Win32" } else { "x64" }
|
||||||
|
$installDir = if ($archFlag -eq "x86") { "x86" } else { "amd64" }
|
||||||
|
|
||||||
cmake `
|
cmake `
|
||||||
-DAPACHE_ROOT="$env:APACHE_ROOT" `
|
-DAPACHE_ROOT="$env:APACHE_ROOT" `
|
||||||
-DSSDEEP_ROOT="${{ github.workspace }}\ssdeep-install-${{ matrix.arch }}" `
|
-DSSDEEP_ROOT="${{ github.workspace }}\ssdeep-install-${{ matrix.arch }}" `
|
||||||
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\install-${{ matrix.arch }}" `
|
-DCMAKE_INSTALL_PREFIX="${{ github.workspace }}\iis\release\$installDir" `
|
||||||
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" `
|
-DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_INSTALLATION_ROOT\scripts\buildsystems\vcpkg.cmake" `
|
||||||
-A $cmakeArch `
|
-A $cmakeArch `
|
||||||
-DWITH_SSDEEP=ON `
|
-DWITH_SSDEEP=ON `
|
||||||
@@ -109,11 +110,43 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cmake --build "iis\build-${{ matrix.arch }}" --config Release
|
cmake --build "iis\build-${{ matrix.arch }}" --config Release
|
||||||
|
|
||||||
# - name: Package IIS Module with WiX
|
- name: Upload artifacts
|
||||||
# shell: pwsh
|
uses: actions/upload-artifact@v4
|
||||||
# run: |
|
with:
|
||||||
# $CURRENT_DIR = "${{ github.workspace }}/iis/wix"
|
name: iis-module-${{ matrix.arch }}
|
||||||
# $arch = "${{ matrix.arch }}"
|
path: iis/build-${{ matrix.arch }}/Release/
|
||||||
# $wixArch = if ($arch -eq "x86") { "x86" } else { "x64" }
|
|
||||||
# candle.exe -ext WixUtilExtension -ext WixUIExtension "$CURRENT_DIR\installer.wxs" -out "$CURRENT_DIR\installer.wixobj" -arch $wixArch
|
package:
|
||||||
# light.exe -ext WixUtilExtension -ext WixUIExtension "$CURRENT_DIR\installer.wixobj" -out "$CURRENT_DIR\installer-$arch.msi"
|
needs: build
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Download x86 artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: iis-module-x86
|
||||||
|
path: iis/release/x86/
|
||||||
|
|
||||||
|
|
||||||
|
- name: Download x64 artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: iis-module-x64
|
||||||
|
path: iis/release/amd64/
|
||||||
|
|
||||||
|
- name: Package IIS Module with WiX
|
||||||
|
shell: pwsh
|
||||||
|
run: |
|
||||||
|
$CURRENT_DIR = "${{ github.workspace }}\iis\"
|
||||||
|
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\modsecurityiis-x64.msi"
|
||||||
|
candle.exe -ext WixUtilExtension -ext WixUIExtension "$CURRENT_DIR\installer.wxs" -out "$CURRENT_DIR\installer.wixobj" -arch x86
|
||||||
|
light.exe -ext WixUtilExtension -ext WixUIExtension "$CURRENT_DIR\installer.wixobj" -out "$CURRENT_DIR\installer\modsecurityiis-x86.msi"
|
||||||
|
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: modsecurityiis-installers
|
||||||
|
path: iis/installer/*.msi
|
||||||
|
|||||||
@@ -149,6 +149,8 @@ if(APACHE_ROOT)
|
|||||||
message(FATAL_ERROR "APACHE_ROOT/lib directory does not exist. Expected: '${APACHE_ROOT}/lib'. Please ensure Apache libraries are available.")
|
message(FATAL_ERROR "APACHE_ROOT/lib directory does not exist. Expected: '${APACHE_ROOT}/lib'. Please ensure Apache libraries are available.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
file(TO_CMAKE_PATH "${APACHE_ROOT}" APACHE_ROOT)
|
||||||
|
|
||||||
# Create imported targets for Apache libraries
|
# Create imported targets for Apache libraries
|
||||||
add_library(Apache::httpd SHARED IMPORTED)
|
add_library(Apache::httpd SHARED IMPORTED)
|
||||||
set_target_properties(Apache::httpd PROPERTIES
|
set_target_properties(Apache::httpd PROPERTIES
|
||||||
@@ -227,6 +229,9 @@ if(WITH_SSDEEP)
|
|||||||
message(WARNING "SSDEEP_ROOT is not defined or path does not exist. Current SSDEEP_ROOT: '${SSDEEP_ROOT}'. Please set SSDEEP_ROOT to the ssdeep installation directory. Disabling SSDEEP support.")
|
message(WARNING "SSDEEP_ROOT is not defined or path does not exist. Current SSDEEP_ROOT: '${SSDEEP_ROOT}'. Please set SSDEEP_ROOT to the ssdeep installation directory. Disabling SSDEEP support.")
|
||||||
set(WITH_SSDEEP OFF CACHE BOOL "Enable SSDEEP support" FORCE)
|
set(WITH_SSDEEP OFF CACHE BOOL "Enable SSDEEP support" FORCE)
|
||||||
else()
|
else()
|
||||||
|
|
||||||
|
file(TO_CMAKE_PATH "${SSDEEP_ROOT}" SSDEEP_ROOT)
|
||||||
|
|
||||||
message(STATUS "SSDEEP_ROOT: ${SSDEEP_ROOT}")
|
message(STATUS "SSDEEP_ROOT: ${SSDEEP_ROOT}")
|
||||||
|
|
||||||
# 查找头文件
|
# 查找头文件
|
||||||
|
|||||||
Reference in New Issue
Block a user