Skip to content

Add cleanup on Connection destruction #32

Add cleanup on Connection destruction

Add cleanup on Connection destruction #32

Workflow file for this run

name: Test xapi-cpp
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
compiler: [g++, clang++]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Install dependencies
run: |
sudo apt-get update
if [ ${{ matrix.os }} == 'ubuntu-22.04' ]; then
sudo add-apt-repository ppa:mhier/libboost-latest -y
fi
sudo apt install libboost-system1.83-dev
sudo apt install libboost-url1.83-dev
sudo apt install libboost-json1.83-dev
sudo apt install libssl-dev libgtest-dev
- name: Configure CMake
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }} \
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} \
-DBUILD_TESTS=ON \
-S ${{ github.workspace }}
- name: Build unit tests
run: cmake --build ${{ steps.strings.outputs.build-output-dir }}
- name: Run unit tests
run: |
cd ${{ steps.strings.outputs.build-output-dir }}
./test/tests
- name: Install Xapi library
run: sudo cmake --install ${{ steps.strings.outputs.build-output-dir }}
- name: Compile examples
run: |
cd ${{ github.workspace }}/examples
mkdir build
cmake -B ${{ github.workspace }}/examples/build \
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} \
-S ${{ github.workspace }}/examples
cmake --build ${{ github.workspace }}/examples/build