Skip to content

Commit 3e2686b

Browse files
committed
update workflows for building options
1 parent f65c313 commit 3e2686b

File tree

4 files changed

+405
-198
lines changed

4 files changed

+405
-198
lines changed

.github/workflows/macos-clang.yml

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -8,64 +8,70 @@ on:
88

99
jobs:
1010
build:
11-
name: '${{matrix.link}}-${{matrix.build-type}}-${{matrix.tls-provider}}'
11+
name: "${{matrix.link}}-${{matrix.build-type}}-TLS:${{matrix.tls-provider}}"
1212
runs-on: macos-latest
13+
env:
14+
shared: ${{matrix.link == 'SHARED' && 'ON' || 'OFF'}}
1315
strategy:
1416
fail-fast: false
1517
matrix:
16-
link: [ 'STATIC', 'SHARED' ]
17-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
18-
build-type: ['Debug', 'Release']
19-
tls-provider: ['', 'openssl', 'botan']
18+
link: ["STATIC", "SHARED"]
19+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, MinSizeRel, etc.)
20+
build-type: ["Debug", "Release"]
21+
# Support (none, openssl, botan-3, auto)
22+
tls-provider: ["none", "openssl", "botan-3"]
2023

2124
steps:
22-
- name: Install dependencies
23-
# botan v3
24-
run: |
25-
brew install botan spdlog
25+
- name: Checkout Trantor source code
26+
uses: actions/checkout@v4
27+
with:
28+
submodules: true
29+
fetch-depth: 0
2630

27-
- name: Install gtest
28-
run: |
29-
wget https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz
30-
tar xf v1.13.0.tar.gz
31-
cd googletest-1.13.0
32-
cmake .
33-
make && sudo make install
31+
- name: Install dependencies
32+
shell: bash
33+
working-directory: ${{env.GITHUB_WORKSPACE}}
34+
run: |
35+
sh deps.macos-12.sh
3436
35-
- name: Checkout Trantor source code
36-
uses: actions/checkout@v4
37-
with:
38-
submodules: true
39-
fetch-depth: 0
37+
- name: Configure Cmake [ BUILD_DEPENDENCIES OFF | SPDLOG OFF | C-ARES OFF ]
38+
run: |
39+
cmake -B build -S . \
40+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
41+
-DBUILD_SHARED_LIBS=$shared \
42+
-DBUILD_DEPENDENCIES=OFF \
43+
-DTRANTOR_USE_SPDLOG=OFF \
44+
-DTRANTOR_USE_C-ARES=OFF \
45+
-DTRANTOR_TLS_PROVIDER=${{matrix.tls-provider}} \
46+
-DBUILD_TESTING=ON
4047
41-
- name: Create build directory
42-
run: |
43-
mkdir build
48+
- name: Build
49+
working-directory: ./build
50+
run: |
51+
make -j
4452
45-
- name: Create Build Environment & Configure Cmake
46-
shell: bash
47-
working-directory: ./build
48-
run: |
49-
[[ ${{ matrix.link }} == "SHARED" ]] && shared="ON" || shared="OFF"
50-
cmake .. \
51-
-DTRANTOR_USE_TLS=${{matrix.tls-provider}} \
52-
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
53-
-DBUILD_SHARED_LIBS=$shared \
54-
-DCMAKE_INSTALL_PREFIX=../install \
55-
-DUSE_SPDLOG=ON \
56-
-DBUILD_TESTING=ON \
53+
- name: Test
54+
working-directory: ./build
55+
run: |
56+
make test
5757
58-
- name: Build
59-
shell: bash
60-
working-directory: ./build
61-
# Execute the build. You can specify a specific target with "--target <NAME>"
62-
run: |
63-
sudo make && sudo make install
58+
- name: Configure Cmake [ BUILD_DEPENDENCIES OFF | SPDLOG ON | C-ARES ON ]
59+
run: |
60+
cmake -B build -S . \
61+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
62+
-DBUILD_SHARED_LIBS=$shared \
63+
-DBUILD_DEPENDENCIES=OFF \
64+
-DTRANTOR_USE_SPDLOG=ON \
65+
-DTRANTOR_USE_C-ARES=ON \
66+
-DTRANTOR_TLS_PROVIDER=${{matrix.tls-provider}} \
67+
-DBUILD_TESTING=ON
6468
65-
- name: Test
66-
working-directory: ./build
67-
shell: bash
68-
# Execute tests defined by the CMake configuration.
69-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
70-
run: |
71-
make test
69+
- name: Build
70+
working-directory: ./build
71+
run: |
72+
make -j
73+
74+
- name: Test
75+
working-directory: ./build
76+
run: |
77+
make test

.github/workflows/rockylinux-gcc.yml

Lines changed: 56 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -8,81 +8,75 @@ on:
88

99
jobs:
1010
build:
11-
name: '${{matrix.link}}-${{matrix.build-type}}-${{matrix.tls-provider}}'
11+
name: "${{matrix.link}}-${{matrix.build-type}}-TLS:${{matrix.tls-provider}}"
1212
runs-on: ubuntu-latest
13-
container:
13+
env:
14+
shared: ${{matrix.link == 'SHARED' && 'ON' || 'OFF'}}
15+
container:
1416
image: rockylinux:9.3
1517
options: --user root
1618
strategy:
1719
fail-fast: false
1820
matrix:
19-
link: [ 'STATIC', 'SHARED' ]
20-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
21-
build-type: ['Debug', 'Release']
22-
# TODO: ubuntu botan is v2, v2 support is removed
23-
# tls-provider: ['', 'openssl', 'botan']
24-
tls-provider: ['', 'openssl']
21+
link: ["STATIC", "SHARED"]
22+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, MinSizeRel, etc.)
23+
build-type: ["Debug", "Release"]
24+
# Support (none, openssl, botan-3, auto)
25+
tls-provider: ["none", "openssl"]
2526

2627
steps:
27-
- name: Install dependencies
28-
run: |
29-
dnf install gcc-c++ cmake git wget -y
28+
- name: Install build dependencies
29+
run: |
30+
dnf install git cmake gcc gcc-c++ -y
3031
31-
- name: Install dependencies - spdlog
32-
run: |
33-
git clone https://github.com/gabime/spdlog.git
34-
cd spdlog && mkdir build && cd build
35-
cmake .. && make -j
32+
- name: Checkout Trantor source code
33+
uses: actions/checkout@v4
34+
with:
35+
submodules: true
36+
fetch-depth: 0
3637

37-
- name: Install dependencies - OpenSSL
38-
if: matrix.tls-provider == 'openssl'
39-
run: |
40-
dnf install openssl-devel -y
41-
42-
- name: Install gtest
43-
run: |
44-
wget https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz
45-
tar xf v1.13.0.tar.gz
46-
cd googletest-1.13.0
47-
cmake .
48-
make -j && make install
38+
- name: Install dependencies
39+
run: |
40+
sh ./deps.rockylinux-9.sh
4941
50-
- name: Checkout Trantor source code
51-
uses: actions/checkout@v4
52-
with:
53-
submodules: true
54-
fetch-depth: 0
42+
- name: Configure Cmake [ BUILD_DEPENDENCIES OFF | SPDLOG OFF | C-ARES OFF ]
43+
run: |
44+
cmake -B build -S . \
45+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
46+
-DBUILD_SHARED_LIBS=$shared \
47+
-DBUILD_DEPENDENCIES=OFF \
48+
-DTRANTOR_USE_SPDLOG=OFF \
49+
-DTRANTOR_USE_C-ARES=OFF \
50+
-DTRANTOR_TLS_PROVIDER=${{matrix.tls-provider}} \
51+
-DBUILD_TESTING=ON
5552
56-
- name: Create build directory
57-
run: |
58-
mkdir build
53+
- name: Build
54+
working-directory: ./build
55+
run: |
56+
make -j
5957
60-
- name: Create Build Environment & Configure Cmake
61-
shell: bash
62-
working-directory: ./build
63-
if: ${{matrix.link}} == "SHARED"
64-
run: |
65-
[[ ${{ matrix.link }} == "SHARED" ]] && shared="ON" || shared="OFF"
66-
cmake .. \
67-
-DTRANTOR_USE_TLS=${{matrix.tls-provider}} \
68-
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
69-
-DBUILD_SHARED_LIBS=$shared \
70-
-DCMAKE_INSTALL_PREFIX=../install \
71-
-DUSE_SPDLOG=ON \
72-
-DBUILD_TESTING=ON
58+
- name: Test
59+
working-directory: ./build
60+
run: |
61+
make test
7362
74-
- name: Build
75-
shell: bash
76-
working-directory: ./build
77-
# Execute the build. You can specify a specific target with "--target <NAME>"
78-
run: |
79-
make && make install
63+
- name: Configure Cmake [ BUILD_DEPENDENCIES OFF | SPDLOG ON | C-ARES ON ]
64+
run: |
65+
cmake -B build -S . \
66+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
67+
-DBUILD_SHARED_LIBS=$shared \
68+
-DBUILD_DEPENDENCIES=OFF \
69+
-DTRANTOR_USE_SPDLOG=ON \
70+
-DTRANTOR_USE_C-ARES=ON \
71+
-DTRANTOR_TLS_PROVIDER=${{matrix.tls-provider}} \
72+
-DBUILD_TESTING=ON
8073
81-
- name: Test
82-
working-directory: ./build
83-
shell: bash
84-
# Execute tests defined by the CMake configuration.
85-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
86-
run: |
87-
make test
74+
- name: Build
75+
working-directory: ./build
76+
run: |
77+
make -j
8878
79+
- name: Test
80+
working-directory: ./build
81+
run: |
82+
make test

.github/workflows/ubuntu-gcc.yml

Lines changed: 52 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -8,74 +8,68 @@ on:
88

99
jobs:
1010
build:
11-
name: '${{matrix.link}}-${{matrix.build-type}}-${{matrix.tls-provider}}'
11+
name: "${{matrix.link}}-${{matrix.build-type}}-TLS:${{matrix.tls-provider}}"
1212
runs-on: ubuntu-latest
13+
env:
14+
shared: ${{matrix.link == 'SHARED' && 'ON' || 'OFF'}}
1315
strategy:
1416
fail-fast: false
1517
matrix:
16-
link: [ 'STATIC', 'SHARED' ]
17-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
18-
build-type: ['Debug', 'Release']
19-
# TODO: ubuntu botan is v2, v2 support is removed
20-
# tls-provider: ['', 'openssl', 'botan']
21-
tls-provider: ['', 'openssl']
18+
link: ["STATIC", "SHARED"]
19+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, MinSizeRel, etc.)
20+
build-type: ["Debug", "Release"]
21+
# Support (none, openssl, botan-3, auto)
22+
tls-provider: ["none", "openssl"]
2223

2324
steps:
24-
- name: Install dependencies
25-
run: |
26-
# Installing packages might fail as the github image becomes outdated
27-
sudo apt update
28-
sudo apt install libspdlog-dev libfmt-dev
25+
- name: Checkout Trantor source code
26+
uses: actions/checkout@v4
27+
with:
28+
submodules: true
29+
fetch-depth: 0
2930

30-
- name: Install dependencies - OpenSSL
31-
if: matrix.tls-provider == 'openssl'
32-
run: |
33-
sudo apt install openssl libssl-dev
34-
35-
- name: Install gtest
36-
run: |
37-
wget https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz
38-
tar xf v1.13.0.tar.gz
39-
cd googletest-1.13.0
40-
cmake .
41-
make -j && sudo make install
31+
- name: Install dependencies
32+
run: |
33+
sh ./deps.ubuntu-20.04.sh
4234
43-
- name: Checkout Trantor source code
44-
uses: actions/checkout@v4
45-
with:
46-
submodules: true
47-
fetch-depth: 0
35+
- name: Configure Cmake [ BUILD_DEPENDENCIES OFF | SPDLOG OFF | C-ARES OFF ]
36+
run: |
37+
cmake -B build -S . \
38+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
39+
-DBUILD_SHARED_LIBS=$shared \
40+
-DBUILD_DEPENDENCIES=OFF \
41+
-DTRANTOR_USE_SPDLOG=OFF \
42+
-DTRANTOR_USE_C-ARES=OFF \
43+
-DTRANTOR_TLS_PROVIDER=${{matrix.tls-provider}} \
44+
-DBUILD_TESTING=ON
4845
49-
- name: Create build directory
50-
run: |
51-
mkdir build
46+
- name: Build
47+
working-directory: ./build
48+
run: |
49+
make -j
5250
53-
- name: Create Build Environment & Configure Cmake
54-
shell: bash
55-
working-directory: ./build
56-
if: ${{matrix.link}} == "SHARED"
57-
run: |
58-
[[ ${{ matrix.link }} == "SHARED" ]] && shared="ON" || shared="OFF"
59-
cmake .. \
60-
-DTRANTOR_USE_TLS=${{matrix.tls-provider}} \
61-
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
62-
-DBUILD_SHARED_LIBS=$shared \
63-
-DCMAKE_INSTALL_PREFIX=../install \
64-
-DUSE_SPDLOG=ON \
65-
-DBUILD_TESTING=ON
51+
- name: Test
52+
working-directory: ./build
53+
run: |
54+
make test
6655
67-
- name: Build
68-
shell: bash
69-
working-directory: ./build
70-
# Execute the build. You can specify a specific target with "--target <NAME>"
71-
run: |
72-
sudo make && sudo make install
56+
- name: Configure Cmake [ BUILD_DEPENDENCIES OFF | SPDLOG ON | C-ARES ON ]
57+
run: |
58+
cmake -B build -S . \
59+
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
60+
-DBUILD_SHARED_LIBS=$shared \
61+
-DBUILD_DEPENDENCIES=OFF \
62+
-DTRANTOR_USE_SPDLOG=ON \
63+
-DTRANTOR_USE_C-ARES=ON \
64+
-DTRANTOR_TLS_PROVIDER=${{matrix.tls-provider}} \
65+
-DBUILD_TESTING=ON
7366
74-
- name: Test
75-
working-directory: ./build
76-
shell: bash
77-
# Execute tests defined by the CMake configuration.
78-
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
79-
run: |
80-
make test
67+
- name: Build
68+
working-directory: ./build
69+
run: |
70+
make -j
8171
72+
- name: Test
73+
working-directory: ./build
74+
run: |
75+
make test

0 commit comments

Comments
 (0)