Fix tpls and macros
- continuation
#55
Workflow file for this run
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: github-Linux-baseline | |
on: | |
pull_request: | |
types: [ opened, reopened, synchronize ] | |
paths-ignore: | |
- 'logos/**' | |
- 'helper_scripts/**' | |
- 'docker_scripts/**' | |
- 'docs/**' | |
- '**/*.md' | |
push: # for direct quick fixes | |
branches: | |
- 'main' | |
- 'develop' | |
paths-ignore: | |
- 'logos/**' | |
- 'helper_scripts/**' | |
- 'docker_scripts/**' | |
- 'docs/**' | |
- '**/*.md' | |
concurrency: | |
group: ${ {github.event_name }}-${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{github.event_name == 'pull_request'}} | |
jobs: | |
CI: | |
name: baseline | |
continue-on-error: false | |
strategy: | |
fail-fast: false | |
matrix: | |
image: | |
- ubuntu-20.04-gnu_9-eigen_3.3.7-gtest | |
- ubuntu-20.04-clang_9-eigen_3.3.7-gtest | |
- fedora-34-gnu_11-eigen_3.3.7-gtest | |
- fedora-34-clang_12-eigen_3.3.7-gtest | |
#- intel_oneapi-eigen_3.3.7-gtest | |
build_type: | |
- Release | |
- Debug | |
cmake_extra_args: | |
- '' | |
include: | |
- image: ubuntu-20.04_gnu-11_eigen-3.3.7_gtest | |
build_type: Release | |
cmake_extra_args: '-D CMAKE_CXX_STANDARD=20 -D PRESSIO_ENABLE_CXX20=ON' | |
- image: ubuntu-20.04_clang-12_eigen-3.3.7_gtest | |
build_type: Release | |
cmake_extra_args: '-D CMAKE_CXX_STANDARD=20 -D PRESSIO_ENABLE_CXX20=ON' | |
- image: fedora-34-gnu_11-eigen_3.3.7-gtest | |
build_type: Release | |
cmake_extra_args: '-D CMAKE_CXX_STANDARD=20 -D PRESSIO_ENABLE_CXX20=ON' | |
- image: fedora-34-clang_12-eigen_3.3.7-gtest | |
build_type: Release | |
cmake_extra_args: '-D CMAKE_CXX_STANDARD=20 -D PRESSIO_ENABLE_CXX20=ON' | |
runs-on: ubuntu-latest | |
container: pressiomodelreduction/${{ matrix.image }} | |
env: | |
num_cpus: 2 # $(cat /proc/cpuinfo | grep processor -c) | |
eigen_inc_dir: /usr/local/eigen/install/include/eigen3 | |
gtest_dir: /usr/local/gtest/install | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure | |
run: | | |
cmake -B builddir \ | |
-D CMAKE_BUILD_TYPE:STRING=${{ matrix.build_type }} \ | |
-D CMAKE_C_COMPILER=$CC \ | |
-D CMAKE_CXX_COMPILER=$CXX \ | |
-D CMAKE_CXX_FLAGS='' \ | |
-D CMAKE_INSTALL_PREFIX:PATH=../install \ | |
-D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \ | |
${{ matrix.cmake_extra_args }} \ | |
-D GTEST_ROOT=$gtest_dir \ | |
-D PRESSIO_ENABLE_DEBUG_PRINT=ON \ | |
-D PRESSIO_ENABLE_TESTS:BOOL=ON \ | |
-D PRESSIO_ENABLE_TPL_EIGEN:BOOL=ON \ | |
-D EIGEN_INCLUDE_DIR=$eigen_inc_dir | |
- name: Build | |
run: | | |
cmake --build builddir --target install | |
- name: Test | |
working-directory: builddir | |
run: | | |
ctest -j $num_cpus --output-on-failure | |
- name: Example - CMake installed | |
working-directory: examples/cmake_installed | |
run: | | |
cmake -B builddir \ | |
-DCMAKE_PREFIX_PATH=../../install \ | |
-DPRESSIO_ENABLE_TPL_EIGEN=ON \ | |
&& cmake --build builddir \ | |
&& ./builddir/pressio-cmake-example | |
- name: Example - CMake add_subdirectory | |
working-directory: examples/cmake_subdir | |
run: | | |
cmake -B builddir \ | |
-DEIGEN_INCLUDE_DIR=$eigen_inc_dir \ | |
-DPRESSIO_ENABLE_TPL_EIGEN=ON \ | |
&& cmake --build builddir \ | |
&& ./builddir/pressio-cmake-example | |
- name: Example - include only | |
working-directory: examples/include_only | |
run: | | |
$CXX \ | |
-DPRESSIO_ENABLE_TPL_EIGEN \ | |
-I$eigen_inc_dir \ | |
-I../../include \ | |
-o pressio-cmake-example \ | |
-c main.cpp |