Skip to content

Commit

Permalink
Add system boost package to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ngrodzitski committed Nov 8, 2023
1 parent 5112a48 commit 9bbf20a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 15 deletions.
34 changes: 26 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
cmake \
--build $RESTINIO_BUILD_DIR \
--config ${{ matrix.build_type }} \
--parallel ${NUMBER_OF_PROCESSORS} \
--verbose
- name: Test
shell: bash
Expand Down Expand Up @@ -93,6 +94,11 @@ jobs:
cppstd: 17
asio_source: boost

- toolset: gcc
toolset_version: 9
cppstd: 17
asio_source: boost-system-package

- toolset: gcc
toolset_version: 12
cppstd: 17
Expand Down Expand Up @@ -145,16 +151,15 @@ jobs:
- name: Install dependencies
run: |
sudo gem install Mxx_ru
if [ "${{ matrix.build_settings.asio_source }}" == "boost-system-package" ]; then
sudo apt-get update && sudo apt-get install -y libboost-all-dev
fi
mxxruexternals
# run: |
# sudo apt-get update && sudo apt-get install -y libboost-all-dev

- name: Configure (standalone ASIO)
- name: Configure
if: ${{ matrix.build_settings.asio_source == 'standalone' }}
shell: bash
run: |
mxxruexternals
cd dev
cmake \
-B ${RESTINIO_BUILD_DIR} \
Expand All @@ -172,11 +177,10 @@ jobs:
toolset: ${{ matrix.build_settings.toolset }}
platform_version: 22.04

- name: Configure (Boost ASIO)
- name: Configure
if: ${{ matrix.build_settings.asio_source == 'boost' }}
shell: bash
run: |
mxxruexternals
cd dev
cmake \
-B ${RESTINIO_BUILD_DIR} \
Expand All @@ -186,12 +190,25 @@ jobs:
-DBOOST_ROOT=${{ steps.install-boost.outputs.BOOST_ROOT }} \
-DRESTINIO_TEST_SUFFIX=" [${RESTINIO_BUILD_TAG}]"
- name: Configure
if: ${{ matrix.build_settings.asio_source == 'boost-system-package' }}
shell: bash
run: |
cd dev
cmake \
-B ${RESTINIO_BUILD_DIR} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DRESTINIO_EXPLICIT_CPPSTD=${{ matrix.build_settings.cppstd }} \
-DRESTINIO_ASIO_SOURCE=boost \
-DRESTINIO_TEST_SUFFIX=" [${RESTINIO_BUILD_TAG}]"
- name: Build
working-directory: ./dev
shell: bash
run: |
cmake \
--build $RESTINIO_BUILD_DIR \
--parallel $(nproc) \
--verbose
- name: Test
shell: bash
Expand Down Expand Up @@ -247,6 +264,7 @@ jobs:
run: |
cmake \
--build $RESTINIO_BUILD_DIR \
--parallel $(sysctl -n hw.ncpu) \
--verbose
- name: Test
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion dev/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ if (RESTINIO_ASIO_SOURCE STREQUAL "standalone")
endif ()
else ()
if (NOT RESTINIO_USE_SYSTEM_BOOST_ASIO)
find_package(Boost REQUIRED)
find_package(Boost REQUIRED COMPONENTS headers regex)
endif ()
endif ()

Expand Down
3 changes: 1 addition & 2 deletions dev/test/router/express_boost_regex/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ set(UNITTEST_SRCFILES
main.cpp )
include(${CMAKE_SOURCE_DIR}/cmake/unittest.cmake)

TARGET_INCLUDE_DIRECTORIES(${UNITTEST} PRIVATE ${Boost_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${UNITTEST} PRIVATE ${Boost_REGEX_LIBRARY})
TARGET_LINK_LIBRARIES(${UNITTEST} PRIVATE Boost::regex)
4 changes: 2 additions & 2 deletions dev/test/router/express_router_boost_regex/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(UNITTEST _unit.test.router.express_router_boost_regex)
include(${CMAKE_SOURCE_DIR}/cmake/unittest.cmake)

TARGET_INCLUDE_DIRECTORIES(${UNITTEST} PRIVATE ${Boost_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${UNITTEST} PRIVATE ${Boost_REGEX_LIBRARY})
TARGET_LINK_LIBRARIES(${UNITTEST} PRIVATE Boost::regex)

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
set(TEST_BENCH _test.router.express_router_boost_regex_bench)
include(${CMAKE_SOURCE_DIR}/cmake/testbench.cmake)

TARGET_INCLUDE_DIRECTORIES(${TEST_BENCH} PRIVATE ${Boost_INCLUDE_DIRS})
TARGET_LINK_LIBRARIES(${TEST_BENCH} PRIVATE ${Boost_REGEX_LIBRARY})
TARGET_LINK_LIBRARIES(${TEST_BENCH} PRIVATE Boost::regex)

0 comments on commit 9bbf20a

Please sign in to comment.