Skip to content

refactor: use std=20 #66

refactor: use std=20

refactor: use std=20 #66

Workflow file for this run

name: linux
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
cxx: [g++]
build_type: [Debug]
os: [ubuntu-24.04]
steps:
- name: Set GH Checkout Action
uses: actions/checkout@v4
- name: Install Python Virtual Environment
run: |
sudo apt-get install python3-venv -y --quiet
python3 -m venv $HOME/.venv
- name: Activate Python Virtual Environment
run: |
source $HOME/.venv/bin/activate
export PATH=$HOME/.venv/bin:$PATH
- name: Setup Conan Client
uses: conan-io/setup-conan@v1
with:
cache_packages: true
use_venv: true
- name: Update Conan Profile
run: |
CONAN_CONFIG_HOME_VAR=$(conan config home)
sed -i 's/cppstd=gnu17/cppstd=gnu20/g' ${CONAN_CONFIG_HOME_VAR}/profiles/default
conan profile show
- name: Install Ubuntu Packages
run: |
sudo apt-get update --quiet
sudo apt-get install cmake ninja-build python3-pip lcov -y --quiet
pip3 install --upgrade pip --quiet
pip3 install coverage --quiet
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Run CMake Configure
working-directory: ${{runner.workspace}}/build
env:
CXX: ${{matrix.cxx}}
run: |
cmake -S ${GITHUB_WORKSPACE} \
-DCMAKE_PROJECT_TOP_LEVEL_INCLUDES="${GITHUB_WORKSPACE}/cmake/conan_provider.cmake" \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}} \
-DENABLE_TESTS=True \
-DENABLE_COVERAGE=True \
-G "Ninja"
- name: Run CMake Build
working-directory: ${{runner.workspace}}/build
run: cmake --build . --config ${{matrix.build_type}}
- name: Run CTest
working-directory: ${{runner.workspace}}/build/
run: ctest --progress --build-config ${{matrix.build_type}} --output-on-failure
- name: Create Coverage Report
working-directory: ${{runner.workspace}}/build/
run: |
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --remove coverage.info '*/.conan2/*' --output-file coverage.info
lcov --list coverage.info
- name: Upload Coverage to codecov
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: ${{runner.workspace}}/build/coverage.info
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}