Skip to content

Add setSocketErrorCallback #90

Add setSocketErrorCallback

Add setSocketErrorCallback #90

name: Build rockylinux-gcc
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
build:
name: '${{matrix.link}}-${{matrix.build-type}}-${{matrix.tls-provider}}'
runs-on: ubuntu-latest
container:
image: rockylinux:9.3
options: --user root
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: |
dnf install gcc-c++ cmake git wget -y
- name: Install dependencies - spdlog
run: |
git clone https://github.com/gabime/spdlog.git
cd spdlog && mkdir build && cd build
cmake .. && make -j
- name: Install dependencies - OpenSSL
if: matrix.tls-provider == 'openssl'
run: |
dnf install openssl-devel -y
- 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 && 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: |
make && 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