2
0
mirror of https://github.com/boostorg/redis.git synced 2026-01-19 04:42:09 +00:00
This commit is contained in:
Ruben Perez
2023-10-04 18:41:48 +02:00
parent 1d329df81b
commit 0bf4e76981
2 changed files with 86 additions and 5 deletions

View File

@@ -4,14 +4,14 @@ 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: "${{matrix.toolset}} ${{matrix.build_type}} C++${{matrix.cxxstd}}"
runs-on: ${{matrix.os}}
defaults:
run:
shell: bash
strategy:
# fail-fast: false
fail-fast: false
matrix:
include:
- { toolset: msvc-14.2, os: windows-2019, generator: "Visual Studio 16 2019", cxxstd: '17', build-type: 'Debug' }
@@ -79,13 +79,42 @@ jobs:
--toolset ${{ matrix.toolset }} \
--generator "${{ matrix.generator }}"
posix:
windows-b2:
name: "${{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 }
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: choco install openssl
- 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:
defaults:
run:
shell: bash
strategy:
# fail-fast: false
fail-fast: false
matrix:
include:
- { toolset: gcc-11, install: g++-11, os: ubuntu-22.04, cxxstd: '17', build-type: 'Debug', ldflags: '' }
@@ -155,3 +184,33 @@ jobs:
--build-type ${{ matrix.build-type }} \
--cxxstd ${{ matrix.cxxstd }} \
--toolset ${{ matrix.toolset }}
posix-b2:
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-11, cxxstd: "17,20" }
name: "${{ matrix.toolset }}"
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: |
python3 tools/ci.py run-b2-tests \
--toolset ${{ matrix.toolset }} \
--cxxstd ${{ matrix.cxxstd }} \
--variant debug,release

View File

@@ -278,6 +278,22 @@ def _run_cmake_b2_find_package_tests(
_run(['ctest', '--output-on-failure', '--build-config', build_type, '--no-tests=error'])
# Builds and runs the library tests using b2
def _run_b2_tests(
variant: str,
cxxstd: str,
toolset: str
):
os.chdir(str(_boost_root))
_run([
'b2',
'--abbreviate-paths',
'toolset={}'.format(toolset),
'cxxstd={}'.format(cxxstd),
'variant={}'.format(variant),
'-j4',
'libs/redis/test'
])
def main():
@@ -336,6 +352,12 @@ def main():
subp.add_argument('--build-shared-libs', type=_str2bool, default=False)
subp.set_defaults(func=_run_cmake_b2_find_package_tests)
subp = subparsers.add_parser('run-b2-tests')
subp.add_argument('--variant', default='debug,release')
subp.add_argument('--cxxstd', default='17,20')
subp.add_argument('--toolset', default='gcc')
subp.set_defaults(func=_run_b2_tests)
args = parser.parse_args()
os.environ['CMAKE_BUILD_PARALLEL_LEVEL'] = '4'