Skip to content

Commit bf39fbf

Browse files
committed
CI: Check for expected definitions in the generated config header.
* .github/workflows/linux.yml: Add config-output and config-no-output matrix keys, giving definitions which must be present in or absent from include/ap_config_auto.h, and a step to check each. Use them for the Linux defaults and the PACKAGE_* definitions buildconf strips in the Default job, for AP_FORCE_EXPORTS and HAVE_SYSTEMD in the reduced exports job, and for HAVE_NGHTTP2 and HAVE_CURL in the OpenSSL 3.0 job which disables mod_http2 and mod_md. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> GitHub: PR #380 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937571 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8141908 commit bf39fbf

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

‎.github/workflows/linux.yml‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,17 @@ jobs:
157157
PYTEST_ARGS=--only=pyhttpd
158158
# -------------------------------------------------------------------------
159159
- name: Default
160+
# Check the defaults expected for a default build on Linux.
161+
config-output: >-
162+
SINGLE_LISTEN_UNSERIALIZED_ACCEPT AP_NONBLOCK_WHEN_MULTI_LISTEN
163+
AP_ENABLE_V4_MAPPED HAVE_GMTOFF HAVE_FDPASSING HAVE_CRYPT_SHA2
164+
HAVE_PCRE2 HAVE_EPOLL_CREATE HAVE_GETTID HAVE_PRCTL HAVE_TIMEGM
165+
HAVE_GETLOADAVG HAVE_FOPEN64 HAVE_SETSID HAVE_KILLPG HAVE_INITGROUPS
166+
AP_FORCE_EXPORTS HAVE_NGHTTP2 HAVE_CURL
167+
# buildconf strips these from the generated header.
168+
config-no-output: >-
169+
PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING
170+
PACKAGE_BUGREPORT PACKAGE_URL
160171
# -------------------------------------------------------------------------
161172
- name: All-static modules
162173
config: --enable-mods-static=reallyall
@@ -291,6 +302,8 @@ jobs:
291302
- name: Configured w/reduced exports
292303
config: --enable-reduced-exports --enable-maintainer-mode --enable-systemd
293304
pkgs: libsystemd-dev
305+
config-output: HAVE_SYSTEMD
306+
config-no-output: AP_FORCE_EXPORTS
294307
env: |
295308
SKIP_TESTING=1
296309
TEST_INSTALL=1
@@ -313,6 +326,7 @@ jobs:
313326
# -------------------------------------------------------------------------
314327
- name: OpenSSL 3.0 LTS
315328
config: --enable-mods-shared=most --enable-maintainer-mode --disable-md --disable-http2 --disable-ldap --disable-crypto
329+
config-no-output: HAVE_NGHTTP2 HAVE_CURL
316330
env: |
317331
TEST_OPENSSL3=3.0.21
318332
APR_VERSION=1.7.6
@@ -447,6 +461,18 @@ jobs:
447461
echo "$HOME/.local/bin" >> $GITHUB_PATH
448462
- name: Build and test
449463
run: ./test/travis_run_linux.sh
464+
# Checks the config header in the build tree, so this must follow
465+
# the build, and is only useful for a non-VPATH job.
466+
- if: ${{ matrix.config-output != '' }}
467+
name: Check for expected ap_config_auto.h definitions
468+
run: for var in ${{ matrix.config-output }}; do
469+
grep --color=always "^#define *${var} *1" include/ap_config_auto.h;
470+
done
471+
- if: ${{ matrix.config-no-output != '' }}
472+
name: Check for unexpected ap_config_auto.h definitions
473+
run: for var in ${{ matrix.config-no-output }}; do
474+
! grep --color=always "^#define *${var}" include/ap_config_auto.h;
475+
done
450476
- uses: actions/upload-artifact@v7
451477
if: failure()
452478
with:

0 commit comments

Comments
 (0)