Skip to content

fix windows compilation (#31) #36

fix windows compilation (#31)

fix windows compilation (#31) #36

Workflow file for this run

name: Linux build
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-22.04, ubuntu-26.04]
build_type: [Debug,Release]
cpp_compiler: [g++, clang++]
static: ["true","false"]
steps:
- uses: actions/checkout@v6
- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Dependencies
run: >
sudo apt-get -y install cmake valgrind libssl-dev zlib1g-dev libboost-test-dev libboost-filesystem-dev
libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-thread-dev libboost-date-time-dev
#Install extra deps for ubuntu 26-04 (and add valgrind and coverage tests)
- name: Extra Dependecies Ubuntu 26.04
if: ${{ matrix.os == 'ubuntu-26.04' }}
run: >
sudo apt-get install -y libjitterentropy3-dev valgrind lcov
#- name: Install cmake 4
# run: |
# test -f /usr/share/doc/kitware-archive-keyring/copyright || wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | \
# gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
# source /etc/os-release && echo "deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ ${UBUNTU_CODENAME} main" | \
# sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null
# sudo apt-get update
# sudo apt-get install -y cmake cmake-data
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: >
/usr/bin/cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}
-DSTATIC_RUNTIME:BOOL=${{matrix.static}} -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install
- name: Build
# Build your program with the given configuration.
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
/usr/bin/cmake --build ${{ steps.strings.outputs.build-output-dir }} --target install --config ${{ matrix.build_type }}
env:
CTEST_OUTPUT_ON_FAILURE: 1
VIRTUAL_ENV: VM
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}
- name: Memory checks in ubuntu 26.04
working-directory: ${{ steps.strings.outputs.build-output-dir }}
if: ${{ matrix.os == 'ubuntu-26.04' && matrix.static == 'false' }}
run: >
ctest -T memcheck
- name: On_Failure_print_logs
if: ${{ failure() }}
run: |
type $env:temp/open-license.log