Skip to content

Commit c890ddb

Browse files
committed
updated github flow with asio for newer crowcpp
1 parent 6a68f1c commit c890ddb

File tree

4 files changed

+55
-25
lines changed

4 files changed

+55
-25
lines changed

.github/workflows/cmake.yaml

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,31 +19,44 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
os: [ubuntu-latest, macos-latest, windows-latest]
22+
os: [ubuntu-latest,
23+
macos-latest,
24+
windows-latest]
2325

2426
steps:
2527
- uses: actions/checkout@v3
2628
- name: Prepare dependencies
2729
run: |
28-
if [ "$RUNNER_OS" == "Linux" ]; then
29-
sudo apt-get update && \
30-
sudo apt-get install -yq \
31-
libboost-system-dev \
32-
libboost-date-time-dev \
33-
cmake \
34-
graphviz doxygen
35-
elif [ "$RUNNER_OS" == "Windows" ]; then
36-
choco install boost-msvc-14.3 graphviz doxygen.install
37-
elif [ "$RUNNER_OS" == "macOS" ]; then
38-
brew install boost graphviz doxygen
30+
if [ "$RUNNER_OS" == "Linux" ]; then
31+
sudo apt-get update && \
32+
sudo apt-get install -yq \
33+
libasio-dev \
34+
libssl-dev zlib1g-dev \
35+
cmake graphviz doxygen
36+
elif [ "$RUNNER_OS" == "Windows" ]; then
37+
VCPKG_DEFAULT_TRIPLET=x64-windows vcpkg install
38+
elif [ "$RUNNER_OS" == "macOS" ]; then
39+
brew install asio openssl zlib doxygen graphviz
40+
else
41+
echo "$RUNNER_OS not supported"
42+
exit 1
43+
fi
44+
shell: bash
45+
- name: Configure CMake
46+
run: |
47+
if [ "$RUNNER_OS" == "Windows" ]; then
48+
cmake \
49+
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake \
50+
-B build
51+
elif [ "$RUNNER_OS" == "macOS" ]; then
52+
cmake \
53+
-B build
3954
else
40-
echo "$RUNNER_OS not supported"
41-
exit 1
42-
fi
43-
shell: bash
44-
- name: Configure CMake
45-
run: cmake -B build
46-
shell: bash
55+
cmake \
56+
-B build
57+
fi
58+
shell: bash
59+
4760
- name: Build
4861
# Build your program with the given configuration
4962
run: cmake --build build --config ${{env.BUILD_TYPE}}

.github/workflows/doxygen-gh-pages.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ jobs:
1515
- name: Checkout 🛎️
1616
uses: actions/checkout@v3
1717
- name: Prepare dependencies
18-
run: sudo apt-get update && sudo apt-get install -yq libboost-system-dev libboost-date-time-dev cmake graphviz doxygen
18+
run: |
19+
sudo apt-get update && \
20+
sudo apt-get install -yq \
21+
libasio-dev \
22+
libssl-dev zlib1g-dev \
23+
cmake graphviz doxygen
1924
- name: configure
2025
run: cmake -B build -S . -DEXPATPP_BUILD_DOCS=ON
2126
- name: clean generated docs dir

CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
cmake_minimum_required(VERSION 3.1.3)
1+
cmake_minimum_required(VERSION 3.15.0 FATAL_ERROR)
2+
3+
project(oc-issuer VERSION 0.0.2 LANGUAGES CXX)
24

35
enable_language(C)
46
enable_language(CXX)
57
set(CMAKE_CXX_STANDARD 17)
8+
set(CMAKE_EXPORT_COMPILE_COMMANDS On)
69

710
if(POLICY CMP0077)
811
cmake_policy(SET CMP0077 NEW)
@@ -14,7 +17,6 @@ else()
1417
add_compile_options(-Wall -Wextra -pedantic)
1518
endif()
1619

17-
project(oc-issuer VERSION 0.0.2 LANGUAGES CXX)
1820

1921
include(FetchContent)
2022

@@ -25,11 +27,12 @@ set(CROW_BUILD_EXAMPLES Off)
2527
set(CROW_BUILD_TOOLS Off)
2628
set(CROW_BUILD_TESTS Off)
2729
set(CROW_BUILD_DOCS Off)
30+
set(CROW_FEATURES "ssl;compression")
2831

2932
# add crow project to the build
3033
FetchContent_Declare(crow
3134
GIT_REPOSITORY https://github.com/CrowCpp/Crow.git
32-
GIT_TAG v1.0+5
35+
GIT_TAG v1.2.0
3336
)
3437

3538
if(NOT crow_POPULATED)
@@ -47,14 +50,14 @@ if(NOT expected_POPULATED)
4750
endif(NOT expected_POPULATED)
4851

4952
include(CTest)
50-
enable_testing()
53+
enable_testing()
5154

5255
set(CATCH_INSTALL_DOCS Off)
5356
set(CATCH_INSTALL_EXTRAS Off)
5457
FetchContent_Declare(
5558
Catch2
5659
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
57-
GIT_TAG v3.3.1
60+
GIT_TAG v3.6.0
5861
)
5962

6063
FetchContent_MakeAvailable(Catch2)

vcpkg.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "oc-mint-cpp",
3+
"version-string": "master",
4+
"dependencies": [
5+
"asio",
6+
"openssl",
7+
"zlib"
8+
]
9+
}

0 commit comments

Comments
 (0)