Skip to content

Commit 9d65d34

Browse files
Fix: Update deprecated actions and resolve subsequent build failures
- Updated actions/cache from v2 to v4 to resolve the build failure caused by a deprecated version. - Updated actions/checkout from v2 to v4 as a proactive measure. These changes revealed a cascade of build failures and linting errors, which are also fixed in this PR: 1. The `clang-13` package is not available on `ubuntu-latest` runners. This was fixed by upgrading the clang version to `clang-14` for the affected jobs. 2. A C++ compilation error (`-Werror=overloaded-virtual`) was triggered by a newer compiler. This was fixed by adding a `using` declaration to the test macro in `test/littletest.hpp`. 3. The `valgrind-dbg` package is not available on `ubuntu-latest`. This was fixed by removing it from the installation step. 4. macOS tests were failing to bind to port 8080. This was fixed by enabling IPv6 by default on macOS in the `create_webserver` class. 5. A large number of `cpplint` errors were revealed. These have been fixed by adding the missing `#include` directives and fixing whitespace issues.
1 parent 560ac89 commit 9d65d34

34 files changed

+130
-37
lines changed

examples/allowing_disallowing_methods.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
2123
#include <httpserver.hpp>
2224

2325
class hello_world_resource : public httpserver::http_resource {

examples/basic_authentication.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
#include <string>
23+
2124
#include <httpserver.hpp>
2225

2326
class user_pass_resource : public httpserver::http_resource {

examples/custom_access_log.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
*/
2020

2121
#include <iostream>
22+
#include <memory>
23+
#include <string>
2224

2325
#include <httpserver.hpp>
2426

examples/custom_error.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
2123
#include <httpserver.hpp>
2224

2325
std::shared_ptr<httpserver::http_response> not_found_custom(const httpserver::http_request&) {

examples/deferred_with_accumulator.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@
1818
USA
1919
*/
2020

21+
#include <algorithm>
2122
#include <atomic>
2223
#include <cstring>
24+
#include <memory>
25+
#include <string>
2326
// cpplint errors on chrono and thread because they are replaced (in Chromium) by other google libraries.
2427
// This is not an issue here.
2528
#include <chrono> // NOLINT [build/c++11]

examples/digest_authentication.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
2123
#include <httpserver.hpp>
2224

2325
#define MY_OPAQUE "11733b200778ce33060f31c9af70a870ba96ddd4"

examples/file_upload.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
*/
2020

2121
#include <iostream>
22+
#include <memory>
23+
#include <string>
24+
2225
#include <httpserver.hpp>
2326

2427
class file_upload_resource : public httpserver::http_resource {

examples/handlers.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
2123
#include <httpserver.hpp>
2224

2325
class hello_world_resource : public httpserver::http_resource {

examples/hello_with_get_arg.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
USA
1919
*/
2020

21+
#include <memory>
22+
#include <string>
23+
2124
#include <httpserver.hpp>
2225

2326
class hello_world_resource : public httpserver::http_resource {

examples/hello_world.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
*/
2020

2121
#include <iostream>
22+
#include <memory>
23+
#include <string>
2224

2325
#include <httpserver.hpp>
2426

0 commit comments

Comments
 (0)