Skip to content

Commit

Permalink
Build failure with gcc13 (#152)
Browse files Browse the repository at this point in the history
* Build failure with gcc13

Add CI for ubuntu-24.04 and gcc-13.
Add cstdint headers where needed.
Updated readme-template with additional gcc-13 support and ubuntu 24.04 support.
Switched CURLOPT_PUT to CURLOPT_UPLOAD since CURLOPT_PUT is deprecated.
Updated LICENSE year to 2024.

Closes #151
  • Loading branch information
jbaldwin authored Oct 3, 2024
1 parent 66ffdb8 commit 8582dbd
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .githooks/readme-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ ${EXAMPLE_README_CPP}
C++17 compilers tested
g++-9
g++-11
g++-13
clang-9
clang-14
CMake
Expand All @@ -54,6 +55,7 @@ stdc++fs
Tested on:
ubuntu:20.04
ubuntu:22.04 (with custom libcurl built)
ubuntu:24.04
fedora:31
```

Expand Down Expand Up @@ -170,7 +172,7 @@ Using `nginx` as the webserver with the default `fedora` configuration.

File bug reports, feature requests and questions using [GitHub Issues](https://github.com/jbaldwin/liblifthttp/issues)

Copyright © 2017-2023, Josh Baldwin
Copyright © 2017-2024, Josh Baldwin

[badge.language]: https://img.shields.io/badge/language-C%2B%2B17-yellow.svg
[badge.license]: https://img.shields.io/badge/license-Apache--2.0-blue
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,71 @@ jobs:
cd build-release-clang
ctest -VV
build-ubuntu-24-04:
name: ubuntu-24.04
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
env:
TZ: America/New_York
DEBIAN_FRONTEND: noninteractive
services:
nginx:
image: nginx:stable
haproxy:
image: jbaldwindh/liblifthttp-automation-haproxy:0.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: apt
run: |
apt-get update
apt-get -y upgrade
apt install -y build-essential software-properties-common
add-apt-repository ppa:ubuntu-toolchain-r/test
apt-get install -y \
cmake \
git \
ninja-build \
g++-13 \
clang \
zlib1g-dev \
libcurl4-openssl-dev \
libuv1-dev \
curl
- name: check-haproxy
run: |
curl -v --user guest:guestpassword -x "http://haproxy:3128" "http://nginx/index.html"
- name: build-release-g++
run: |
mkdir build-release-g++
cd build-release-g++
cmake \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc-13 \
-DCMAKE_CXX_COMPILER=g++-13 \
..
ninja
- name: build-release-clang
run: |
mkdir build-release-clang
cd build-release-clang
cmake \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
..
ninja
- name: test-release-g++
run: |
cd build-release-g++
ctest -VV
- name: test-release-clang
run: |
cd build-release-clang
ctest -VV
build-fedora-31:
name: fedora-31
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2017-2020 Josh Baldwin
Copyright 2017-2024 Josh Baldwin

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ int main()
C++17 compilers tested
g++-9
g++-11
g++-13
clang-9
clang-14
CMake
Expand All @@ -137,6 +138,7 @@ stdc++fs
Tested on:
ubuntu:20.04
ubuntu:22.04 (with custom libcurl built)
ubuntu:24.04
fedora:31
```

Expand Down Expand Up @@ -253,7 +255,7 @@ Using `nginx` as the webserver with the default `fedora` configuration.

File bug reports, feature requests and questions using [GitHub Issues](https://github.com/jbaldwin/liblifthttp/issues)

Copyright © 2017-2023, Josh Baldwin
Copyright © 2017-2024, Josh Baldwin

[badge.language]: https://img.shields.io/badge/language-C%2B%2B17-yellow.svg
[badge.license]: https://img.shields.io/badge/license-Apache--2.0-blue
Expand Down
1 change: 1 addition & 0 deletions inc/lift/http.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <string>
#include <cstdint>

#include <curl/curl.h>

Expand Down
1 change: 1 addition & 0 deletions inc/lift/lift_status.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <string>
#include <cstdint>

namespace lift
{
Expand Down
1 change: 1 addition & 0 deletions inc/lift/query_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <string>
#include <string_view>
#include <vector>
#include <cstdint>

namespace lift
{
Expand Down
1 change: 1 addition & 0 deletions inc/lift/resolve_host.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <string>
#include <cstdint>

namespace lift
{
Expand Down
2 changes: 1 addition & 1 deletion src/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ auto executor::prepare() -> void
curl_easy_setopt(m_curl_handle, CURLOPT_POST, 1L);
break;
case http::method::put:
curl_easy_setopt(m_curl_handle, CURLOPT_PUT, 1L);
curl_easy_setopt(m_curl_handle, CURLOPT_UPLOAD, 1L);
break;
case http::method::delete_t:
curl_easy_setopt(m_curl_handle, CURLOPT_CUSTOMREQUEST, "DELETE");
Expand Down

0 comments on commit 8582dbd

Please sign in to comment.