Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest develop changes #157

Merged
merged 59 commits into from
Oct 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
0de26fb
Fix out of date filename
mrichmon Aug 21, 2023
7d09040
Bump version number
mrichmon Aug 21, 2023
b8899ec
Merge pull request #143 from mrichmon/develop
mzimbres Aug 22, 2023
4fbd0c6
Progreeses with the adapter type erasure.
mzimbres Aug 13, 2023
509635f
Merge pull request #145 from boostorg/138-use-stdfunction-to-type-era…
mzimbres Aug 26, 2023
401dd24
Adds connection usage information.
mzimbres Aug 26, 2023
d8cf431
Merge pull request #149 from boostorg/144-implement-connection-usage-…
mzimbres Aug 30, 2023
1ed8e01
Removes resp3::async_read.
mzimbres Sep 2, 2023
44a608c
Merge pull request #151 from boostorg/150-remove-resp3read-and-resp3a…
mzimbres Sep 2, 2023
4547e1a
First steps with using adapters to process a generic_response.
mzimbres Sep 4, 2023
2a4936a
Implements batch reads for server pushes.
mzimbres Sep 6, 2023
6748f76
Merge pull request #153 from boostorg/152-enable-reading-server-pushe…
mzimbres Sep 10, 2023
d5031c3
libraries.json
anarthal Oct 2, 2023
be20c0d
Docs via b2
anarthal Oct 3, 2023
ecfe51c
Doc fixes
anarthal Oct 3, 2023
53ef947
Doc install and redirection
anarthal Oct 3, 2023
bc08a8d
Trigger CI
anarthal Oct 3, 2023
b66d067
tests => test
anarthal Oct 3, 2023
1c96a60
ci.py first version
anarthal Oct 3, 2023
cb9fdba
New cmakes
anarthal Oct 4, 2023
221016f
subdir tests
anarthal Oct 4, 2023
c732f33
New CI
anarthal Oct 4, 2023
56d9a27
Typo fix
anarthal Oct 4, 2023
4a39a0d
Toolset
anarthal Oct 4, 2023
a02837a
Explicit Python & typos
anarthal Oct 4, 2023
ffc35e8
copytree and cxxstd
anarthal Oct 4, 2023
87ebc6c
protobuf fix
anarthal Oct 4, 2023
d0c3b3f
generator fix
anarthal Oct 4, 2023
56f7d5a
examples => example
anarthal Oct 4, 2023
1d329df
test jamfile
anarthal Oct 4, 2023
0bf4e76
B2 CI
anarthal Oct 4, 2023
84c8649
Bad b2 command
anarthal Oct 4, 2023
765f0d4
Improved CI build names
anarthal Oct 4, 2023
b41e270
choco no progress
anarthal Oct 4, 2023
2cd4877
Attempt to solve b2 openssl problem in win
anarthal Oct 4, 2023
5ea0d3c
Fixed OPENSSL_ROOT on win
anarthal Oct 4, 2023
a7b3fbd
Protect min/max
anarthal Oct 4, 2023
fcbe2c4
Canonical project name
anarthal Oct 4, 2023
686cb30
README now states Boost requirements
anarthal Oct 4, 2023
b7b4f8f
OpenSSL win fix in CI
anarthal Oct 5, 2023
f37e514
Link error fix in win b2
anarthal Oct 5, 2023
7f3f8b0
Relaxed cxx17 requirement in Jamfile
anarthal Oct 5, 2023
faf15fe
Initial coverage workflow
anarthal Oct 5, 2023
2951acc
Merge branch 'feature/118-boost-integration' of github.com:anarthal/b…
anarthal Oct 5, 2023
d386b30
Simplified ci.py
anarthal Oct 5, 2023
ea6c553
CMAKE_BUILD_PARALLEL_LEVEL for coverage
anarthal Oct 5, 2023
0303ae0
Simplified & documented Jamfile
anarthal Oct 5, 2023
60ba5b6
Missing packages in coverage build
anarthal Oct 5, 2023
7412b37
choco => vcpkg
anarthal Oct 5, 2023
14d3c02
Removed unnecessary checks fom jamfile
anarthal Oct 5, 2023
92be6d9
Reduced ci.py verbosity
anarthal Oct 5, 2023
4d30d1e
split cmake_test
anarthal Oct 5, 2023
199fb6c
Fixed libc++ link flags
anarthal Oct 5, 2023
9a7816d
switched to default installation of openssl
anarthal Oct 5, 2023
d6f9e43
Revert "Fixed libc++ link flags"
anarthal Oct 5, 2023
11c9c1b
Merge pull request #155 from anarthal/feature/118-boost-integration
mzimbres Oct 5, 2023
66b632b
Small fixes in the docs.
mzimbres Oct 7, 2023
548e3d4
Updates the copywrite notice.
mzimbres Oct 7, 2023
ff73469
Merge pull request #156 from boostorg/prepare_for_first_boost_release
mzimbres Oct 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ codecov:

ignore:
- "benchmarks/cpp/asio/*"
- "examples/*"
- "example/*"
- "tests/*"
- "/usr/*"
- "**/boost/*"
Expand Down
294 changes: 194 additions & 100 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,95 +1,128 @@
# CI script to verify that CMake and B2 builds work.
# B2 builds include only tests that don't require a DB server, to avoid race conditions.
# CMake tests include the actual project tests and all the CMake integration workflows
# recommended by Boost.CI.
# Windows CMake jobs build the code but don't run the tests,
# since we don't have a way to set up a Redis server on Windows (yet).
# Subcommands are implemented by the tools/ci.py script in a platform-independent manner.

name: CI

on: [push, pull_request]

jobs:
windows:
name: "${{matrix.generator}} ${{matrix.toolset}} Boost ${{matrix.boost_version}} ${{matrix.build_type}} ${{matrix.name_args}}"
windows-cmake:
name: "CMake ${{matrix.toolset}} ${{matrix.build-type}} C++${{matrix.cxxstd}}"
runs-on: ${{matrix.os}}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
boost_version: ["1.81.0"]
os: [windows-2019, windows-2022]
toolset: [v142, v143]
build_type: [Release]
generator: ["Visual Studio 16 2019", "Visual Studio 17 2022"]
config_args: [""]
build_args: [""]
name_args: [""]
exclude:
- { os: windows-2019, toolset: v143 }
- { os: windows-2019, generator: "Visual Studio 17 2022" }
- { os: windows-2022, generator: "Visual Studio 16 2019" }
# The following combinations are not available through install-boost
- { boost_version: "1.81.0", toolset: v143 }

include:
- { toolset: msvc-14.2, os: windows-2019, generator: "Visual Studio 16 2019", cxxstd: '17', build-type: 'Debug', build-shared-libs: 1 }
- { toolset: msvc-14.2, os: windows-2019, generator: "Visual Studio 16 2019", cxxstd: '17', build-type: 'Release', build-shared-libs: 0 }
- { toolset: msvc-14.3, os: windows-2022, generator: "Visual Studio 17 2022", cxxstd: '20', build-type: 'Debug', build-shared-libs: 0 }
- { toolset: msvc-14.3, os: windows-2022, generator: "Visual Studio 17 2022", cxxstd: '20', build-type: 'Release', build-shared-libs: 1 }
env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Add boost toolset to environment
if: contains(fromJson('["1.81.0"]'), matrix.boost_version)
run: echo BOOST_TOOLSET=$(echo "msvc") >> $GITHUB_ENV
- name: Setup Boost
run: python3 tools/ci.py setup-boost --source-dir=$(pwd)

# The platform_version passed to boost-install determines the msvc toolset version for which static libs are installed.
- name: Add boost platform version to environment
- name: Build a Boost distribution using B2
run: |
declare -A toolset_to_platform_version=( [v142]="2019" [v143]="2022" )
key=$(echo "${{matrix.toolset}}")
echo BOOST_PLATFORM_VERSION="${toolset_to_platform_version[$key]}" >> $GITHUB_ENV

- name: Add boost install path to environment
run: echo BOOST_INSTALL_PATH="${GITHUB_WORKSPACE}/boost-${{matrix.boost_version}}${BOOST_TOOLSET}${BOOST_PLATFORM_VERSION}" >> $GITHUB_ENV

- name: Add build type configuration to environment
run: echo BUILD_CONFIG_ARG="--config ${{matrix.build_type}}" >> $GITHUB_ENV

- name: Cache Boost installation
id: cache-boost
uses: actions/cache@v3
with:
path: ${{env.BOOST_INSTALL_PATH}}
key: ${{matrix.boost_version}}${{env.BOOST_TOOLSET}}${{env.BOOST_PLATFORM_VERSION}}

- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
uses: MarkusJx/[email protected]
with:
boost_version: ${{matrix.boost_version}}
toolset: ${{env.BOOST_TOOLSET}}
boost_install_dir: ${{env.BOOST_INSTALL_PATH}}
platform_version: ${{env.BOOST_PLATFORM_VERSION}}
arch: null

- name: Install openssl
run: choco install openssl

- name: Create build directory
run: mkdir build

- name: Configure
working-directory: build
python3 tools/ci.py build-b2-distro \
--toolset ${{ matrix.toolset }}

- name: Build a Boost distribution using CMake
run: |
python3 tools/ci.py build-cmake-distro \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }} \
--generator "${{ matrix.generator }}" \
--build-shared-libs ${{ matrix.build-shared-libs }}

- name: Build the project tests
run: |
cmake -T "${{matrix.toolset}}" \
-G "${{matrix.generator}}" \
${{matrix.config_args}} \
${BOOST_COMPILER_ARG}\
"${GITHUB_WORKSPACE}"
env:
BOOST_ROOT: ${{env.BOOST_INSTALL_PATH}}/boost

- name: Build
working-directory: build
python3 tools/ci.py build-cmake-standalone-tests \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }} \
--generator "${{ matrix.generator }}" \
--build-shared-libs ${{ matrix.build-shared-libs }}

# # TODO: re-enable this when a Redis server is available for this job
# - name: Run the project tests
# run: |
# python3 tools/ci.py run-cmake-standalone-tests \
# --build-type ${{ matrix.build-type }}

- name: Run add_subdirectory tests
run: |
cmake --build . ${BUILD_CONFIG_ARG} ${{matrix.build_args}}
python3 tools/ci.py run-cmake-add-subdirectory-tests \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }} \
--generator "${{ matrix.generator }}" \
--build-shared-libs ${{ matrix.build-shared-libs }}

posix:
- name: Run find_package tests with the built cmake distribution
run: |
python3 tools/ci.py run-cmake-find-package-tests \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }} \
--generator "${{ matrix.generator }}" \
--build-shared-libs ${{ matrix.build-shared-libs }}

- name: Run find_package tests with the built b2 distribution
run: |
python3 tools/ci.py run-cmake-b2-find-package-tests \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }} \
--generator "${{ matrix.generator }}" \
--build-shared-libs ${{ matrix.build-shared-libs }}

windows-b2:
name: "B2 ${{matrix.toolset}}"
runs-on: ${{matrix.os}}
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
include:
- { toolset: msvc-14.2, os: windows-2019 }
- { toolset: msvc-14.3, os: windows-2022 }
env:
OPENSSL_ROOT: "C:\\Program Files\\OpenSSL"
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup user-config.jam
run: cp tools/user-config.jam "${HOMEDRIVE}${HOMEPATH}/"

- name: Setup Boost
run: python3 tools/ci.py setup-boost --source-dir=$(pwd)

- name: Build and run project tests using B2
run: |
python3 tools/ci.py run-b2-tests \
--toolset ${{ matrix.toolset }} \
--cxxstd 17,20 \
--variant debug,release

posix-cmake:
name: "CMake ${{ matrix.toolset }} ${{ matrix.cxxstd }} ${{ matrix.build-type }} ${{ matrix.cxxflags }}"
defaults:
run:
shell: bash
Expand All @@ -98,39 +131,100 @@ jobs:
fail-fast: false
matrix:
include:
- { toolset: gcc, compiler: g++-11, install: g++-11, os: ubuntu-22.04, cxxflags: '-std=c++17', ldflags: '' }
- { toolset: gcc, compiler: g++-11, install: g++-11, os: ubuntu-22.04, cxxflags: '-std=c++20', ldflags: '' }
- { toolset: clang, compiler: clang++-11, install: clang-11, os: ubuntu-22.04, cxxflags: '-std=c++17', ldflags: '' }
- { toolset: clang, compiler: clang++-11, install: clang-11, os: ubuntu-22.04, cxxflags: '-std=c++20', ldflags: '' }
- { toolset: clang, compiler: clang++-13, install: clang-13, os: ubuntu-22.04, cxxflags: '-std=c++17', ldflags: '' }
- { toolset: clang, compiler: clang++-13, install: clang-13, os: ubuntu-22.04, cxxflags: '-std=c++20', ldflags: '' }
- { toolset: clang, compiler: clang++-14, install: 'clang-14 libc++-14-dev libc++abi-14-dev', os: ubuntu-22.04, cxxflags: '-std=c++17 -stdlib=libc++', ldflags: '-lc++' }
- { toolset: clang, compiler: clang++-14, install: 'clang-14 libc++-14-dev libc++abi-14-dev', os: ubuntu-22.04, cxxflags: '-std=c++20 -stdlib=libc++', ldflags: '-lc++' }
- { toolset: gcc-11, install: g++-11, os: ubuntu-22.04, cxxstd: '17', build-type: 'Debug', ldflags: '' }
- { toolset: gcc-11, install: g++-11, os: ubuntu-22.04, cxxstd: '20', build-type: 'Release', ldflags: '' }
- { toolset: clang-11, install: clang-11, os: ubuntu-22.04, cxxstd: '17', build-type: 'Debug', ldflags: '' }
- { toolset: clang-11, install: clang-11, os: ubuntu-22.04, cxxstd: '20', build-type: 'Debug', ldflags: '' }
- { toolset: clang-13, install: clang-13, os: ubuntu-22.04, cxxstd: '17', build-type: 'Release', ldflags: '' }
- { toolset: clang-13, install: clang-13, os: ubuntu-22.04, cxxstd: '20', build-type: 'Release', ldflags: '' }
- { toolset: clang-14, install: 'clang-14 libc++-14-dev libc++abi-14-dev', os: ubuntu-22.04, cxxstd: '17', build-type: 'Debug', cxxflags: '-stdlib=libc++', ldflags: '-lc++' }
- { toolset: clang-14, install: 'clang-14 libc++-14-dev libc++abi-14-dev', os: ubuntu-22.04, cxxstd: '20', build-type: 'Release', cxxflags: '-stdlib=libc++', ldflags: '-lc++' }
runs-on: ${{ matrix.os }}
env:
CXXFLAGS: -g -O0 ${{matrix.cxxflags}} -Wall -Wextra
CXXFLAGS: ${{matrix.cxxflags}} -Wall -Wextra
LDFLAGS: ${{matrix.ldflags}}
CMAKE_BUILD_PARALLEL_LEVEL: 4
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install CMake
run: sudo apt-get -y install cmake
- name: Install protobuf
run: sudo apt-get -y install protobuf-compiler
- name: Install compiler
run: sudo apt-get install -y ${{ matrix.install }}
- name: Install Redis
run: sudo apt-get install -y redis-server
- name: Install boost
uses: MarkusJx/[email protected]
id: install-boost
with:
boost_version: 1.81.0
platform_version: 22.04
- name: Run CMake

- name: Install dependencies
run: sudo apt-get -y install cmake protobuf-compiler redis-server python3 ${{ matrix.install }}

- name: Setup Boost
run: ./tools/ci.py setup-boost --source-dir=$(pwd)

- name: Build a Boost distribution using B2
run: |
./tools/ci.py build-b2-distro \
--toolset ${{ matrix.toolset }}

- name: Build a Boost distribution using CMake
run: |
./tools/ci.py build-cmake-distro \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }}

- name: Build the project tests
run: |
./tools/ci.py build-cmake-standalone-tests \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }}

- name: Run the project tests
run: |
./tools/ci.py run-cmake-standalone-tests \
--build-type ${{ matrix.build-type }}

- name: Run add_subdirectory tests
run: |
./tools/ci.py run-cmake-add-subdirectory-tests \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }}

- name: Run find_package tests with the built cmake distribution
run: |
./tools/ci.py run-cmake-find-package-tests \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }}

- name: Run find_package tests with the built b2 distribution
run: |
./tools/ci.py run-cmake-b2-find-package-tests \
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }}

posix-b2:
name: "B2 ${{ matrix.toolset }}"
defaults:
run:
shell: bash

strategy:
fail-fast: false
matrix:
include:
- { toolset: gcc-11, install: g++-11, cxxstd: "11,17,20" } # Having C++11 shouldn't break the build
- { toolset: clang-14, install: clang-14, cxxstd: "17,20" }
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt-get -y install python3 ${{ matrix.install }}

- name: Setup Boost
run: ./tools/ci.py setup-boost --source-dir=$(pwd)

- name: Build and run project tests using B2
run: |
BOOST_ROOT=${{steps.install-boost.outputs.BOOST_ROOT}} cmake -DCMAKE_CXX_COMPILER="${{matrix.compiler}}" -DCMAKE_CXX_FLAGS="${{env.CXXFLAGS}}" -DCMAKE_EXE_LINKER_FLAGS="${{env.LDFLAGS}}"
- name: Build
run: make
- name: Check
run: ctest --output-on-failure
python3 tools/ci.py run-b2-tests \
--toolset ${{ matrix.toolset }} \
--cxxstd ${{ matrix.cxxstd }} \
--variant debug,release
Loading