Skip to content

Commit 90af14b

Browse files
authored
Merge branch 'master' into h2-client
2 parents f9fe124 + 645c2d8 commit 90af14b

File tree

322 files changed

+5735
-2221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

322 files changed

+5735
-2221
lines changed

.appveyor.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.clang-format

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ ConstructorInitializerAllOnOneLineOrOnePerLine: true
5353
ConstructorInitializerIndentWidth: 4
5454
ContinuationIndentWidth: 4
5555
Cpp11BracedListStyle: true
56-
DerivePointerAlignment: true
56+
DerivePointerAlignment: false
5757
DisableFormat: false
5858
FixNamespaceComments: true
5959
ForEachMacros:
@@ -94,7 +94,8 @@ PenaltyBreakString: 1000
9494
PenaltyBreakTemplateDeclaration: 10
9595
PenaltyExcessCharacter: 1000000
9696
PenaltyReturnTypeOnItsOwnLine: 2000
97-
PointerAlignment: Left
97+
PointerAlignment: Right
98+
ReferenceAlignment: Right
9899
RawStringFormats:
99100
- Language: Cpp
100101
Delimiters:
@@ -124,7 +125,8 @@ RawStringFormats:
124125
CanonicalDelimiter: ''
125126
BasedOnStyle: google
126127
ReflowComments: true
127-
SortIncludes: false
128+
SeparateDefinitionBlocks: Always
129+
SortIncludes: Never
128130
SortUsingDeclarations: true
129131
SpaceAfterCStyleCast: false
130132
SpaceAfterTemplateKeyword: true

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"

.github/workflows/cmake.yml

Lines changed: 119 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
name: Build Drogon
1+
name: Build & Test
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [master]
66
pull_request:
77
workflow_dispatch:
88

9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
12+
913
env:
1014
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
1115
BUILD_TYPE: Release
@@ -17,10 +21,10 @@ jobs:
1721
strategy:
1822
fail-fast: false
1923
matrix:
20-
link: [ 'STATIC', 'SHARED' ]
24+
link: ["STATIC", "SHARED"]
2125
steps:
2226
- name: Checkout Drogon source code
23-
uses: actions/checkout@v2
27+
uses: actions/checkout@v4
2428
with:
2529
submodules: true
2630
fetch-depth: 0
@@ -60,149 +64,123 @@ jobs:
6064
shell: bash
6165
run: ./test.sh -w
6266

63-
unix:
67+
macos:
68+
name: macos/clang
69+
runs-on: macos-latest
70+
steps:
71+
- name: Checkout Drogon source code
72+
uses: actions/checkout@v4
73+
with:
74+
submodules: true
75+
fetch-depth: 0
76+
77+
- name: Install dependencies
78+
# Already installed: brotli, zlib, postgresql@14, lz4, sqlite3
79+
run: brew install ninja jsoncpp mariadb hiredis redis
80+
81+
- name: Create Build Environment & Configure Cmake
82+
# Some projects don't allow in-source building, so create a separate build directory
83+
# We'll use this as our working directory for all subsequent commands
84+
run: |
85+
cmake -B build -G Ninja \
86+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
87+
-DBUILD_TESTING=on \
88+
-DBUILD_SHARED_LIBS=OFF
89+
90+
- name: Build
91+
working-directory: ./build
92+
# Execute the build. You can specify a specific target with "--target <NAME>"
93+
run: ninja && sudo ninja install
94+
95+
- name: Prepare for testing
96+
run: |
97+
brew tap homebrew/services
98+
brew services restart postgresql@14
99+
brew services start mariadb
100+
brew services start redis
101+
sleep 4
102+
mariadb -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('')"
103+
mariadb -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'"
104+
mariadb -e "FLUSH PRIVILEGES"
105+
brew services restart mariadb
106+
sleep 4
107+
psql -c 'create user postgres superuser;' postgres
108+
109+
- name: Test
110+
# Execute tests defined by the CMake configuration.
111+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
112+
run: ./test.sh -t
113+
114+
ubuntu:
64115
name: ${{ matrix.buildname }}
65-
runs-on: ${{ matrix.os }}
116+
runs-on: ubuntu-22.04
66117
strategy:
67118
fail-fast: false
68119
matrix:
69120
include:
70-
- os: ubuntu-20.04
71-
buildname: 'ubuntu-20.04/gcc'
121+
- buildname: "ubuntu-22.04/gcc"
72122
link: SHARED
73-
triplet: x64-linux
74-
compiler: gcc_64
75-
- os: ubuntu-20.04
76-
buildname: 'ubuntu-20.04/gcc'
77-
link: STATIC
78-
triplet: x64-linux
79-
compiler: gcc_64
80-
- os: ubuntu-20.04
81-
buildname: 'ubuntu-20.04/gcc-10'
123+
- buildname: "ubuntu-22.04/gcc"
82124
link: STATIC
83-
triplet: x64-linux
84-
- os: ubuntu-20.04
85-
buildname: 'ubuntu-20.04/c++14'
125+
- buildname: "ubuntu-22.04/coroutines"
86126
link: STATIC
87-
triplet: x64-linux
88-
compiler: gcc_64
89-
- os: macos-latest
90-
buildname: 'macos/clang'
91-
link: STATIC
92-
triplet: x64-osx
93-
compiler: clang_64
94127
steps:
95-
- name: Checkout Drogon source code
96-
uses: actions/checkout@v2
97-
with:
98-
submodules: true
99-
fetch-depth: 0
100-
101-
- name: (macOS) Install dependencies
102-
if: runner.os == 'macOS'
103-
run: |
104-
brew install jsoncpp brotli zlib
105-
brew install lz4 mariadb sqlite3 postgresql hiredis
106-
brew install redis
107-
108-
- name: (Linux) Install dependencies
109-
if: runner.os == 'Linux'
110-
run: |
111-
# Installing packages might fail as the github image becomes outdated
112-
sudo apt update
113-
# These aren't available or don't work well in vcpkg
114-
sudo apt-get install -y libjsoncpp-dev uuid-dev libssl-dev zlib1g-dev libsqlite3-dev
115-
sudo apt-get install -y libbrotli-dev
116-
- name: (Linux) Install gcc-10
117-
if: matrix.buildname == 'ubuntu-20.04/gcc-10'
118-
run: sudo apt-get install -y gcc-10 g++-10
119-
- name: (Linux) Install boost
120-
if: matrix.buildname == 'ubuntu-20.04/c++14'
121-
run: |
122-
sudo apt-get update
123-
sudo apt-get -y install libboost-all-dev
124-
125-
- name: (Linux) Install postgresql
126-
if: matrix.os == 'ubuntu-20.04'
127-
run: sudo apt-get -y install postgresql-all
128-
129-
- name: Export `shared`
130-
run: |
131-
[[ ${{ matrix.link }} == "SHARED" ]] && shared="ON" || shared="OFF"
132-
echo "shared=$shared" >> $GITHUB_ENV
133-
134-
- name: Create Build Environment & Configure Cmake
135-
# Some projects don't allow in-source building, so create a separate build directory
136-
# We'll use this as our working directory for all subsequent commands
137-
if: matrix.buildname != 'ubuntu-20.04/gcc-10' && matrix.buildname != 'ubuntu-20.04/c++14'
138-
run: |
139-
cmake -B build \
140-
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
141-
-DBUILD_TESTING=on \
142-
-DBUILD_SHARED_LIBS=$shared
143-
144-
- name: Create Build Environment & Configure Cmake (gcc-10)
145-
# Some projects don't allow in-source building, so create a separate build directory
146-
# We'll use this as our working directory for all subsequent commands
147-
if: matrix.buildname == 'ubuntu-20.04/gcc-10'
148-
run: |
149-
cmake -B build \
150-
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
151-
-DBUILD_TESTING=on \
152-
-DCMAKE_CXX_FLAGS="-fcoroutines" \
153-
-DBUILD_SHARED_LIBS=$shared
154-
env:
155-
CC: gcc-10
156-
CXX: g++-10
157-
158-
- name: Create Build Environment & Configure Cmake (C++14)
159-
# Some projects don't allow in-source building, so create a separate build directory
160-
# We'll use this as our working directory for all subsequent commands
161-
if: matrix.buildname == 'ubuntu-20.04/C++14'
162-
run: |
163-
cmake -B build \
164-
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
165-
-DBUILD_TESTING=on \
166-
-DCMAKE_CXX_STANDARD=14 \
167-
-DBUILD_SHARED_LIBS=$shared
168-
169-
- name: Build
170-
working-directory: ./build
171-
# Execute the build. You can specify a specific target with "--target <NAME>"
172-
run: make -j $(nproc) && sudo make install
173-
174-
- name: (macOS) Prepare for testing
175-
if: runner.os == 'macOS'
176-
run: |
177-
cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-services
178-
git reset --hard 5f2fe01
179-
cd ~
180-
brew tap homebrew/services
181-
brew services restart postgresql
182-
brew services start mariadb
183-
brew services start redis
184-
sleep 4
185-
mariadb -e "SET PASSWORD FOR 'root'@'localhost' = PASSWORD('')"
186-
mariadb -e "GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost'"
187-
mariadb -e "FLUSH PRIVILEGES"
188-
brew services restart mariadb
189-
sleep 4
190-
psql -c 'create user postgres superuser;' postgres
191-
192-
- name: (Linux) Prepare for testing
193-
if: runner.os == 'Linux'
194-
run: |
195-
sudo systemctl start postgresql
196-
sleep 1
197-
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '12345'" postgres
198-
199-
- name: Test
200-
# Execute tests defined by the CMake configuration.
201-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
202-
run: ./test.sh -t
203-
204-
- name: Lint
205-
if: matrix.os == 'ubuntu-20.04'
206-
run: |
207-
sudo apt install -y dos2unix
208-
./format.sh && git diff --exit-code
128+
- name: Checkout Drogon source code
129+
uses: actions/checkout@v4
130+
with:
131+
submodules: true
132+
fetch-depth: 0
133+
134+
- name: Install dependencies
135+
run: |
136+
# Installing packages might fail as the github image becomes outdated
137+
sudo apt update
138+
# These aren't available or don't work well in vcpkg
139+
sudo apt-get install -y libjsoncpp-dev uuid-dev libssl-dev zlib1g-dev libsqlite3-dev
140+
sudo apt-get install -y ninja-build libbrotli-dev
141+
142+
- name: Install postgresql
143+
run: |
144+
sudo apt-get --purge remove postgresql postgresql-doc postgresql-common postgresql-client-common
145+
sudo apt-get -y install postgresql-all
146+
147+
- name: Export `shared`
148+
run: |
149+
[[ ${{ matrix.link }} == "SHARED" ]] && shared="ON" || shared="OFF"
150+
echo "shared=$shared" >> $GITHUB_ENV
151+
152+
- name: Create Build Environment & Configure Cmake
153+
# Some projects don't allow in-source building, so create a separate build directory
154+
# We'll use this as our working directory for all subsequent commands
155+
if: matrix.buildname != 'ubuntu-22.04/coroutines'
156+
run: |
157+
cmake -B build -G Ninja \
158+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
159+
-DBUILD_TESTING=on \
160+
-DBUILD_SHARED_LIBS=$shared
161+
- name: Create Build Environment & Configure Cmake (coroutines)
162+
# Some projects don't allow in-source building, so create a separate build directory
163+
# We'll use this as our working directory for all subsequent commands
164+
if: matrix.buildname == 'ubuntu-22.04/coroutines'
165+
run: |
166+
cmake -B build -G Ninja \
167+
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
168+
-DBUILD_TESTING=on \
169+
-DCMAKE_CXX_FLAGS="-fcoroutines" \
170+
-DBUILD_SHARED_LIBS=$shared
171+
172+
- name: Build
173+
working-directory: ./build
174+
# Execute the build. You can specify a specific target with "--target <NAME>"
175+
run: ninja && sudo ninja install
176+
177+
- name: Prepare for testing
178+
run: |
179+
sudo systemctl start postgresql
180+
sleep 1
181+
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '12345'" postgres
182+
183+
- name: Test
184+
# Execute tests defined by the CMake configuration.
185+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
186+
run: ./test.sh -t

0 commit comments

Comments
 (0)