Skip to content

feat: client_async example (#430) #1

feat: client_async example (#430)

feat: client_async example (#430) #1

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
jobs:
test:
name: ${{ matrix.config.name }} (${{ matrix.build_type }}, ${{ matrix.library_type }})
strategy:
fail-fast: true
matrix:
config:
- name: Linux GCC 9
os: ubuntu-22.04
compiler: g++-9
coverage: true
gcov: gcov-9
- name: Linux GCC 10
os: ubuntu-22.04
compiler: g++-10
coverage: true
gcov: gcov-10
- name: Linux GCC 11
os: ubuntu-22.04
compiler: g++-11
coverage: true
gcov: gcov-11
- name: Linux GCC 12
os: ubuntu-24.04
compiler: g++-12
coverage: true
gcov: gcov-12
- name: Linux GCC 13
os: ubuntu-24.04
compiler: g++-13
coverage: true
gcov: gcov-13
- name: Linux GCC 14
os: ubuntu-24.04
compiler: g++-14
coverage: true
gcov: gcov-14
- name: Linux Clang 13
os: ubuntu-22.04
compiler: clang++-13
coverage: true
gcov: llvm-cov-13 gcov
- name: Linux Clang 14
os: ubuntu-22.04
compiler: clang++-14
coverage: true
gcov: llvm-cov-14 gcov
- name: Linux Clang 15
os: ubuntu-22.04
compiler: clang++-15
coverage: true
gcov: llvm-cov-15 gcov
- name: Linux Clang 16
os: ubuntu-24.04
compiler: clang++-16
coverage: true
gcov: llvm-cov-16 gcov
- name: Linux Clang 17
os: ubuntu-24.04
compiler: clang++-17
coverage: true
gcov: llvm-cov-17 gcov
- name: Linux Clang 18
os: ubuntu-24.04
compiler: clang++-18
coverage: true
gcov: llvm-cov-18 gcov
- name: Linux ASan
os: ubuntu-24.04
compiler: clang++-18
flags: "-DUAPP_ENABLE_SANITIZER_ADDRESS=ON"
- name: Linux TSan
os: ubuntu-24.04
compiler: clang++-18
flags: "-DUA_MULTITHREADING=100 -DUAPP_ENABLE_SANITIZER_THREAD=ON"
- name: Linux UBSan
os: ubuntu-24.04
compiler: clang++-18
flags: "-DUAPP_ENABLE_SANITIZER_UNDEFINED_BEHAVIOR=ON"
- name: macOS AppleClang 15
os: macos-14
compiler: clang++
- name: macOS AppleClang 16
os: macos-15
compiler: clang++
- name: Windows Visual Studio 16
os: windows-2019
compiler: msvc
- name: Windows Visual Studio 17
os: windows-2022
compiler: msvc
build_type:
- Debug
- Release
library_type:
- static
- shared
include:
- config:
name: Clang-Tidy
os: ubuntu-24.04
compiler: clang++
flags: "-DUAPP_ENABLE_CLANG_TIDY=ON"
build_type: Debug
library_type: static
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure CMake
run: >
cmake -S . -B ./build
-DCMAKE_CXX_COMPILER=${{ matrix.config.compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DBUILD_SHARED_LIBS=${{ matrix.library_type == 'shared' }}
-DUA_ENABLE_ENCRYPTION=${{ runner.os == 'Windows' && 'OFF' || 'OPENSSL' }}
-DUA_ENABLE_METHODCALLS=ON
-DUA_ENABLE_SUBSCRIPTIONS=ON
-DUA_ENABLE_SUBSCRIPTIONS_EVENTS=ON
-DUAPP_BUILD_TESTS=ON
-DUAPP_BUILD_EXAMPLES=ON
-DUAPP_ENABLE_COVERAGE=${{ matrix.config.coverage && matrix.build_type == 'Debug' }}
-DUAPP_WARNINGS_AS_ERRORS=ON
${{ matrix.config.flags }}
- name: Build
run: cmake --build ./build --config ${{ matrix.build_type }} --parallel
- name: Run tests
run: ctest --test-dir ./build --build-config ${{ matrix.build_type }} --output-on-failure
- name: Generate coverage reports
if: matrix.config.coverage && matrix.build_type == 'Debug'
env:
GCOV: ${{ matrix.config.gcov }}
run: |
pipx install gcovr==7.2
gcovr ./build/ -f "include/" -f "src/" --txt --xml ./build/coverage.xml
- name: Upload coverage reports to Codecov
if: matrix.config.coverage && matrix.build_type == 'Debug'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./build/coverage.xml
disable_search: true
flags: ${{ runner.os }}
name: ${{ matrix.config.name }}
verbose: true