-
Notifications
You must be signed in to change notification settings - Fork 134
81 lines (70 loc) · 2.28 KB
/
ubuntu-gcc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build ubuntu-gcc
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
build:
name: '${{matrix.link}}-${{matrix.build-type}}-${{matrix.tls-provider}}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
link: [ 'STATIC', 'SHARED' ]
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
build-type: ['Debug', 'Release']
# TODO: ubuntu botan is v2, v2 support is removed
# tls-provider: ['', 'openssl', 'botan']
tls-provider: ['', 'openssl']
steps:
- name: Install dependencies
run: |
# Installing packages might fail as the github image becomes outdated
sudo apt update
sudo apt install libspdlog-dev libfmt-dev
- name: Install dependencies - OpenSSL
if: matrix.tls-provider == 'openssl'
run: |
sudo apt install openssl libssl-dev
- name: Install gtest
run: |
wget https://github.com/google/googletest/archive/refs/tags/v1.13.0.tar.gz
tar xf v1.13.0.tar.gz
cd googletest-1.13.0
cmake .
make -j && sudo make install
- name: Checkout Trantor source code
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Create build directory
run: |
mkdir build
- name: Create Build Environment & Configure Cmake
shell: bash
working-directory: ./build
if: ${{matrix.link}} == "SHARED"
run: |
[[ ${{ matrix.link }} == "SHARED" ]] && shared="ON" || shared="OFF"
cmake .. \
-DTRANTOR_USE_TLS=${{matrix.tls-provider}} \
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
-DBUILD_SHARED_LIBS=$shared \
-DCMAKE_INSTALL_PREFIX=../install \
-DUSE_SPDLOG=ON \
-DBUILD_TESTING=ON
- name: Build
shell: bash
working-directory: ./build
# Execute the build. You can specify a specific target with "--target <NAME>"
run: |
sudo make && sudo make install
- name: Test
working-directory: ./build
shell: bash
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
make test