-
Notifications
You must be signed in to change notification settings - Fork 7
121 lines (110 loc) · 5.02 KB
/
apache.yml
File metadata and controls
121 lines (110 loc) · 5.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Build apache
on:
workflow_dispatch:
inputs:
version:
description: apache/httpd ref to build
required: true
php:
description: PHP version to build for
required: true
env:
APR_ICONV_VERSION: 1.2.2
APACHE_VERSION: ${{ github.event.inputs.version }}
PHP_VERSION: ${{ github.event.inputs.php }}
VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
defaults:
run:
shell: cmd
jobs:
build:
strategy:
fail-fast: false
matrix:
arch: [x64, x86]
runs-on: ${{ (inputs.php == '8.6' || inputs.php == 'master') && 'windows-2025-vs2026' || 'windows-2022' }}
timeout-minutes: 90
steps:
- name: Checkout winlib-builder
uses: actions/checkout@v5
with:
path: winlib-builder
- name: Checkout apache/httpd
uses: actions/checkout@v5
with:
path: httpd
repository: apache/httpd
ref: ${{ env.APACHE_VERSION }}
- name: Determine apache build profile
id: httpd_profile
run: pwsh -File winlib-builder/scripts/apache/determine-build-profile.ps1
- name: Compute virtual inputs
id: virtuals
run: powershell winlib-builder/scripts/compute-virtuals -version ${{ env.PHP_VERSION }} -arch ${{ matrix.arch }}
- name: Setup MSVC development environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
toolset: ${{ steps.virtuals.outputs.toolset }}
- name: Install Apache build dependencies
run: >-
pwsh -File winlib-builder/scripts/apache/install-build-dependencies.ps1
-Arch "${{ matrix.arch }}"
-PcrePackage "${{ steps.httpd_profile.outputs.pcre_package }}"
- name: Prepare source-built dependencies
id: deps
run: >-
pwsh -File winlib-builder/scripts/apache/prepare-source-built-dependencies.ps1
-Arch "${{ matrix.arch }}"
-PcreLibPath "${{ steps.httpd_profile.outputs.pcre_lib_path }}"
-AprIconvVersion "${{ env.APR_ICONV_VERSION }}"
- name: Configure apache/httpd
run: |
cmake -S httpd -B build -G "Visual Studio ${{steps.virtuals.outputs.vsnum}} ${{steps.virtuals.outputs.vsyear}}" -A ${{ steps.virtuals.outputs.msarch }} ^
-T ${{ steps.virtuals.outputs.msts }} ^
-DCMAKE_SYSTEM_VERSION=${{ steps.virtuals.outputs.winsdk }} ^
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 ^
-DCMAKE_INSTALL_PREFIX=%GITHUB_WORKSPACE%\apache-install ^
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake ^
-DAPR_INCLUDE_DIR="${{ steps.deps.outputs.deps_root }}/include" ^
"-DAPR_LIBRARIES=${{ steps.deps.outputs.deps_root }}/lib/libapr-1.lib;${{ steps.deps.outputs.deps_root }}/lib/libaprutil-1.lib" ^
-DO=O ^
-Di=i ^
-DI=I ^
-Da=a ^
-DA=A ^
-DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=${{ steps.httpd_profile.outputs.disable_openssl }} ^
-DPCRE_INCLUDE_DIR="${{ steps.deps.outputs.deps_root }}/include" ^
-DPCRE_LIBRARIES="${{ steps.deps.outputs.deps_root }}/${{ steps.httpd_profile.outputs.pcre_lib_path }}" ^
-DPCRE_CFLAGS="${{ steps.httpd_profile.outputs.pcre_flags }}" ^
-DNGHTTP2_INCLUDE_DIR="${{ steps.deps.outputs.deps_root }}/include" ^
-DNGHTTP2_LIBRARIES="${{ steps.deps.outputs.deps_root }}/lib/nghttp2.lib" ^
-DBROTLI_INCLUDE_DIR="${{ steps.deps.outputs.deps_root }}/include" ^
"-DBROTLI_LIBRARIES=${{ steps.deps.outputs.deps_root }}/lib/brotlienc.lib;${{ steps.deps.outputs.deps_root }}/lib/brotlicommon.lib" ^
-DCURL_INCLUDE_DIR="${{ steps.deps.outputs.deps_root }}/include" ^
-DCURL_LIBRARIES="${{ steps.deps.outputs.curl_library }}" ^
-DJANSSON_INCLUDE_DIR="${{ steps.deps.outputs.deps_root }}/include" ^
-DJANSSON_LIBRARIES="${{ steps.deps.outputs.deps_root }}/lib/jansson.lib" ^
-DLUA_INCLUDE_DIR="${{ steps.deps.outputs.deps_root }}/include" ^
-DLUA_LIBRARY="${{ steps.deps.outputs.lua_library }}" ^
-DLUA_LIBRARIES="${{ steps.deps.outputs.lua_library }}" ^
-DENABLE_MODULES=i ^
-DINSTALL_MANUAL=ON ^
-DINSTALL_PDB=ON
- name: Build apache/httpd
run: cmake --build build --config Release
- name: Install apache/httpd
run: cmake --install build --config Release
- name: Package apache
run: >-
pwsh -File winlib-builder/scripts/apache/package.ps1
-Arch "${{ matrix.arch }}"
-DepsRoot "${{ steps.deps.outputs.deps_root }}"
-StaticRoot "${{ steps.deps.outputs.static_root }}"
-ApriconvRoot "${{ steps.deps.outputs.apriconv_root }}"
-AprExportsRoot "${{ github.workspace }}/apache-apr-exports"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: apache-${{ env.APACHE_VERSION }}-${{ steps.virtuals.outputs.vs }}-${{ matrix.arch }}
path: install