[pull] main from KFTrack:main #210
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "KinKal" | |
on: [push, pull_request] | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
CLICOLOR_FORCE: 1 | |
jobs: | |
build-test-kinkal: | |
name: Tests (${{ matrix.build-type }}, ${{ matrix.os }}, root ${{ matrix.root-version }}, py${{ matrix.python-version }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest"] | |
python-version: ["3.9"] | |
root-version: ["6.30.2"] | |
build-type: ["Debug", "Release"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install conda environment with micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
micromamba-version: 'latest' | |
environment-name: "kinkal-test-env" | |
create-args: >- | |
python=${{ matrix.python-version }} | |
root=${{ matrix.root-version }} | |
cxx-compiler | |
cmake | |
condarc : | | |
channels: | |
- conda-forge | |
- defaults | |
channel-priority: strict | |
- name: CMake (${{ matrix.build-type }}) | |
run: | | |
cd .. | |
ENABLE_COVERAGE="" | |
# if [ "${{ matrix.build-type }}" = "Debug" ]; then | |
# if [ "${{ matrix.os }}" = "macos-latest" ]; then | |
# ENABLE_COVERAGE="-DCOVERAGE=ON" | |
# fi | |
#fi | |
cmake -S KinKal -B KinKal_${{ matrix.build-type }} \ | |
-DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
-DCMAKE_COLOR_MAKEFILE=ON ${ENABLE_COVERAGE} | |
- name: Build (${{ matrix.build-type }}) | |
run: | | |
cd ../KinKal_${{ matrix.build-type }} | |
make -j8 | |
- name: Run tests | |
run: | | |
cd ../KinKal_${{ matrix.build-type }} | |
env CTEST_OUTPUT_ON_FAILURE=1 make test | |
# - name: Create coverage report | |
# run: | | |
# cd ../KinKal_${{ matrix.build-type }} | |
# mamba install -c conda-forge -y gcovr | |
# | |
# make coverage | |
# gcovr -r ../KinKal . --xml -o coverage.xml --gcov-executable "llvm-cov gcov" --exclude-directories Tests | |
# | |
# if: ${{ matrix.build-type == 'Debug' && matrix.os == 'macos-latest' }} | |
# | |
# - name: Upload coverage | |
# uses: codecov/codecov-action@v1 | |
# with: | |
# files: ../KinKal_${{ matrix.build-type }}/coverage.xml | |
# flags: unittests | |
# name: codecov-umbrella | |
# if: ${{ matrix.build-type == 'Debug' && matrix.os == 'macos-latest' }} | |
# | |
# - name: Run clang-tidy | |
# if: ${{ matrix.build-type == 'Release' && matrix.os == 'ubuntu-latest' }} | |
# run: | | |
# cd .. | |
# cmake -S KinKal -B KinKal_${{ matrix.build-type }}_ClangTidy \ | |
# -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} \ | |
# -DCMAKE_COLOR_MAKEFILE=ON \ | |
# -DENABLE_CLANG_TIDY_WITH_FIXES=ON | |
# cd KinKal_${{ matrix.build-type }}_ClangTidy | |
# make -j8 | |
# - name: suggester / clang-tidy | |
# if: ${{ matrix.build-type == 'Release' && matrix.os == 'ubuntu-latest' && github.event_name == 'pull_request' }} | |
# uses: reviewdog/action-suggester@v1 | |
# with: | |
# tool_name: clang-tidy |