Skip to content

Bump version to 1.1 #24

Bump version to 1.1

Bump version to 1.1 #24

Workflow file for this run

name: ci
on:
pull_request:
release:
types: [published]
push:
tags:
branches:
- main
- develop
env:
# Conan cache environment variables
CONAN_SYSREQUIRES_MODE: enabled
CONAN_USER_HOME: "${{ github.workspace }}/conan-cache"
CONAN_USER_HOME_SHORT: "${{ github.workspace }}/conan-cache/short"
jobs:
Clang-tidy:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Cache
uses: ./.github/actions/setup_cache
with:
compiler: llvm
build_type: Release
doxygen: "OFF"
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: llvm
cmake: true
conan: true
clangtidy: true
- name: Setup Linux
run: |
sudo apt install -y libglfw3-dev libglfw3
- name: Installing conan dependencies
run: |
conan install . --build=missing -s build_type=Release
- name: Configure CMake
run: |
cmake -B ./build -S. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="build/Release/generators/conan_toolchain.cmake" -DENABLE_MAIN=ON -DENABLE_TESTING=ON -DENABLE_DOXYGEN=OFF -DLOG_LEVEL=DATA -DWARNINGS_AS_ERRORS=ON -DENABLE_CPPCHECK=OFF -DENABLE_CLANG_TIDY=ON -DENABLE_INCLUDE_WHAT_YOU_USE=OFF
- name: Copy compile commands
run: |
cmake --build ./build --target copy-compile-commands --config Release
- name: Run clang-tidy on ./src
run: |
python3 ./tools/run-clang-tidy.py $PWD/src
- name: Run clang-tidy on ./test
run: |
python3 ./tools/run-clang-tidy.py $PWD/test
Documentation:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Cache
uses: ./.github/actions/setup_cache
with:
compiler: gcc
build_type: Release
doxygen: "ON"
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: gcc
cmake: true
conan: true
doxygen: true
- name: Setup Linux
run: |
sudo apt install -y libglfw3-dev libglfw3
sudo apt install -y flex bison graphviz dia mscgen pdf2svg texlive texlive-lang-german texlive-latex-extra ghostscript
- name: Cleanup Conan system packages (they are not properly cached)
run: |
conan remove -f '*/system'
- name: Installing conan dependencies
run: |
conan install . --build=missing -s build_type=Release
- name: Configure CMake
run: |
cmake -B ./build -S. -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE="build/Release/generators/conan_toolchain.cmake" -DENABLE_MAIN=OFF -DENABLE_TESTING=OFF -DENABLE_DOXYGEN=ON -DLOG_LEVEL=OFF -DENABLE_CLANG_TIDY=OFF -DENABLE_CPPCHECK=OFF -DENABLE_INCLUDE_WHAT_YOU_USE=OFF -DDOC_CHECK_CODE_DOCUMENTATION=YES
- name: Check documentation
run: |
cmake --build ./build --target doc --config Release
Test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- macos-12
- windows-2022
compiler:
# you can specify the version after `-` like "llvm-13.0.0".
- llvm
- gcc
- msvc
build_type:
- Release
- Debug
log-level:
- "DEBUG"
exclude:
- os: ubuntu-22.04
compiler: msvc
- os: macos-12
compiler: gcc
- os: macos-12
compiler: msvc
- os: windows-2022
compiler: gcc
- os: windows-2022
compiler: llvm
include:
# Add appropriate variables for gcov version required. This will intentionally break
# if you try to use a compiler that does not have gcov set
- compiler: gcc
gcov_executable: gcov
- compiler: llvm
gcov_executable: "llvm-cov gcov"
- os: ubuntu-22.04
compiler: gcc
build_type: Release
log-level: "OFF"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Cache
uses: ./.github/actions/setup_cache
with:
compiler: ${{ matrix.compiler }}
build_type: ${{ matrix.build_type }}
doxygen: "OFF"
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows' )}}
cmake: true
brew: true
conan: true
ccache: true
gcovr: true
- name: Setup MacOS
if: ${{ runner.os == 'macOS' }}
run: |
brew install glfw
- name: Setup Linux
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt install -y libglfw3-dev libglfw3
- name: Cleanup Conan system packages (they are not properly cached)
run: |
conan remove -f '*/system'
- name: Installing conan dependencies
run: |
conan install . --build=missing -s build_type=${{matrix.build_type}}
- name: Configure CMake
run: |
cmake -S . -B ./build -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DCMAKE_TOOLCHAIN_FILE="build/${{matrix.build_type}}/generators/conan_toolchain.cmake" -DENABLE_MAIN=TRUE -DENABLE_TESTING=TRUE -DENABLE_COVERAGE:BOOL=${{ matrix.build_type == 'Debug' }} -DENABLE_DOXYGEN=OFF -DLOG_LEVEL:STRING=${{matrix.log-level}} -DWARNINGS_AS_ERRORS:BOOL=${{ !contains(matrix.os, 'windows' )}} -DENABLE_CPPCHECK=OFF -DENABLE_CLANG_TIDY=OFF -DENABLE_INCLUDE_WHAT_YOU_USE=OFF
- name: Build
run: |
cmake --build ./build --config ${{matrix.build_type}}
- name: Test
working-directory: ./build
run: |
ctest -C ${{matrix.build_type}} --output-on-failure --timeout 180
- name: Coverage
if: ${{ runner.os != 'Windows' && matrix.build_type == 'Debug' }}
run: |
mkdir -p build/coverage
gcovr --config doc/coverage/gcovr.cfg --gcov-executable '${{ matrix.gcov_executable }}'
- name: Publish to codecov
uses: codecov/codecov-action@v3
with:
flags: ${{ runner.os }}
name: ${{ runner.os }}-coverage
files: ./build/cobertura.xml