Skip to content

Commit b9ef39d

Browse files
etrclaude
andcommitted
Fix CI follow-up: add LGPL header to gate tests, drop ubuntu-toolchain PPA, revert MSYS libmicrohttpd-devel
Three small follow-ups now that the _DEFAULT_SOURCE Cygwin/MSYS fix has landed: 1. The four test/headers/consumer_*.cpp gate tests added in TASK-002 were missing the project's standard LGPL/copyright header, tripping the lint job once gcc-14 was running cpplint over them. 2. The "Install Ubuntu test sources" step was running add-apt-repository ppa:ubuntu-toolchain-r/test which talks to launchpad and has been hitting 504 Gateway Time-out across runs. With the C++20 floor we no longer need the toolchain PPA -- gcc-11 through gcc-14 ship in stock ubuntu-22.04/24.04 repos, and clang-13/16-18 likewise. Keep just apt-get update. 3. The earlier "add libmicrohttpd-devel to MSYS pacman" attempt was wrong -- there is no such MSYS native package. The actual fix was the configure.ac _DEFAULT_SOURCE define landed in 5b78014; revert the bogus pacman entry so the install step stops failing first. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5b78014 commit b9ef39d

5 files changed

Lines changed: 86 additions & 2 deletions

File tree

.github/workflows/verify-build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,15 @@ jobs:
333333
- name: Install MSYS packages
334334
if: ${{ matrix.os-type == 'windows' && matrix.msys-env == 'MSYS' }}
335335
run: |
336-
pacman --noconfirm -S --needed msys2-devel gcc make libcurl-devel libgnutls-devel libmicrohttpd-devel
336+
pacman --noconfirm -S --needed msys2-devel gcc make libcurl-devel libgnutls-devel
337337
338338
- name: Install Ubuntu test sources
339+
# ppa:ubuntu-toolchain-r/test was historically used to backport newer
340+
# gcc onto older Ubuntu LTS. With the C++20 floor (TASK-001), our matrix
341+
# only retains compilers that ship in stock ubuntu-22.04 / 24.04 repos
342+
# (gcc-11..14, clang-13/16/17/18), so the PPA is no longer needed -- and
343+
# add-apt-repository talks to launchpad, which is a flaky dependency.
339344
run: |
340-
sudo add-apt-repository ppa:ubuntu-toolchain-r/test ;
341345
sudo apt-get update ;
342346
if: ${{ matrix.os-type == 'ubuntu' }}
343347

test/headers/consumer_detail.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/*
2+
This file is part of libhttpserver
3+
Copyright (C) 2011-2026 Sebastiano Merlino
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18+
USA
19+
*/
20+
121
// Negative test (Check A.2): a consumer including a detail header directly,
222
// even when _HTTPSERVER_HPP_INSIDE_ is defined (simulating the umbrella state),
323
// must hit the gate when HTTPSERVER_COMPILATION is not defined.

test/headers/consumer_direct.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/*
2+
This file is part of libhttpserver
3+
Copyright (C) 2011-2026 Sebastiano Merlino
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18+
USA
19+
*/
20+
121
// Negative test (Check A.1): a consumer compiling this TU WITHOUT the umbrella
222
// header AND WITHOUT HTTPSERVER_COMPILATION must hit the inclusion-gate #error.
323
// The build recipe inverts exit status and greps for the gate text to ensure

test/headers/consumer_post_umbrella.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/*
2+
This file is part of libhttpserver
3+
Copyright (C) 2011-2026 Sebastiano Merlino
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18+
USA
19+
*/
20+
121
// Negative test (Check A.4): including the umbrella must NOT leak the
222
// _HTTPSERVER_HPP_INSIDE_ macro to subsequent translation-unit-scope code.
323
// A consumer doing `#include <httpserver.hpp>` followed by a direct include

test/headers/consumer_umbrella.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
/*
2+
This file is part of libhttpserver
3+
Copyright (C) 2011-2026 Sebastiano Merlino
4+
5+
This library is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU Lesser General Public
7+
License as published by the Free Software Foundation; either
8+
version 2.1 of the License, or (at your option) any later version.
9+
10+
This library is distributed in the hope that it will be useful,
11+
but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13+
Lesser General Public License for more details.
14+
15+
You should have received a copy of the GNU Lesser General Public
16+
License along with this library; if not, write to the Free Software
17+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18+
USA
19+
*/
20+
121
// Positive control (Check A.3): a consumer including only the umbrella header,
222
// without HTTPSERVER_COMPILATION, must compile cleanly. This proves the umbrella
323
// path is the supported entry point.

0 commit comments

Comments
 (0)