Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tpls and macros - continuation #634

Merged
merged 56 commits into from
Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
343d35e
remove unused macros
fnrizzi Aug 14, 2023
6d3e5bf
remove macros
fnrizzi Aug 14, 2023
70887a0
wip
fnrizzi Aug 25, 2023
7c96e3e
Avoid macro redefinition
cz4rs Aug 29, 2023
0558a6c
ci: remove redundant parameters
cz4rs Aug 29, 2023
16d88a6
ci: simplify baseline workflow
cz4rs Aug 29, 2023
12b4cee
ci: simplify workflows and make them more consistent
cz4rs Aug 29, 2023
3903624
ci: use single workflow for baseline and cxx20
cz4rs Aug 29, 2023
371ae43
Remove C++11 support
cz4rs Aug 29, 2023
a7341ea
tests: improve CMake output
cz4rs Aug 29, 2023
df06cb1
tests: use FetchContent to obtain GTest when it is not found
cz4rs Aug 29, 2023
998150b
fix Trilinos configuration
cz4rs Aug 29, 2023
b65c124
ci: simplify trilinos workflow
cz4rs Aug 30, 2023
791412f
tests: link pressio in mpi tests
cz4rs Aug 30, 2023
f174f82
tests: find MPI package when enabled
cz4rs Aug 30, 2023
6bb8896
move CMake options to a separate file
cz4rs Aug 31, 2023
f2423f0
move option handling to a separate file
cz4rs Aug 31, 2023
f31d74b
Fix formatting
cz4rs Oct 10, 2023
3856540
do not extract timestamps when fetching content
cz4rs Oct 10, 2023
4f265c3
remove commented out / duplicated code
cz4rs Oct 10, 2023
30906e8
tests: remove empty directories
cz4rs Oct 10, 2023
6730b1e
add FIXME for missing libeigen
cz4rs Oct 10, 2023
33b118f
tests: use predefined gtest version when fetching from github
cz4rs Oct 10, 2023
1792892
tests: remove duplicated code
cz4rs Oct 10, 2023
99e202f
tests: re-enable all unit tests
cz4rs Oct 10, 2023
d90eea4
ensure Eigen is always enabled
cz4rs Oct 16, 2023
28cd0ff
examples: add cmake_installed example
cz4rs Oct 17, 2023
ebaab5f
tests: avoid CMake error for FetchContent_Declare
cz4rs Oct 17, 2023
d3622ba
search for Eigen package when EIGEN_INCLUDE_DIR is not provided
cz4rs Oct 17, 2023
690494a
tests: configure gtest
cz4rs Oct 17, 2023
befd65e
examples: run the example after building
cz4rs Oct 17, 2023
86c9387
examples: add in-tree example
cz4rs Oct 17, 2023
b799852
enforce PRESSIO_ENABLE_TPL_EIGEN ON
cz4rs Oct 18, 2023
8311d1a
add missing newline
cz4rs Oct 18, 2023
3ab6934
examples: add include only example
cz4rs Oct 18, 2023
6df1973
ci: remove unused workflow
cz4rs Oct 19, 2023
874845c
examples: add examples to trilinos workflow
cz4rs Oct 19, 2023
f9ba0c6
fix examples
cz4rs Oct 20, 2023
bd9eb3f
ci: add another example
cz4rs Oct 30, 2023
392307d
ci: run tests after examples
cz4rs Oct 30, 2023
1c45228
ci: use separate repository for examples
cz4rs Oct 30, 2023
2cad07d
use correct file name
cz4rs Oct 30, 2023
f390600
ci: use examples from a separate repo
cz4rs Oct 31, 2023
45cd9b8
ci: adjust trilinos build
cz4rs Oct 31, 2023
8fff1f9
ci: add more examples
cz4rs Oct 31, 2023
8a0237e
ci: use `main` branch for examples
cz4rs Oct 31, 2023
6e117d0
ci: restore test categorization
cz4rs Oct 31, 2023
d0de1e2
disable static_assert
cz4rs Oct 31, 2023
fee2a31
ci: use upgrade checkout action
cz4rs Oct 31, 2023
978e41f
ci: update trinilons examples
cz4rs Oct 31, 2023
0dc3d12
move test specific configuration to test dir
cz4rs Oct 31, 2023
1b74bb6
ci: reorganize examples
cz4rs Oct 31, 2023
aa6bc16
tests: add missing definitions
cz4rs Nov 2, 2023
378d215
tests: skip redundant checks
cz4rs Nov 2, 2023
520ff06
assert that eigen is enabled
cz4rs Nov 2, 2023
8801fa0
tests: handle CMake options in a single file
cz4rs Nov 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 0 additions & 138 deletions .github/workflows/.ci-workflow-trilinos.txt

This file was deleted.

143 changes: 97 additions & 46 deletions .github/workflows/ci-baseline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,75 +28,126 @@ jobs:
CI:
name: baseline
continue-on-error: false

strategy:
max-parallel: 10
fail-fast: false
matrix:
config:
# os: Stands for OS on GitHub Runner (Ubuntu / MacOS / Windows)
# image: Stands for used Docker Image
# mode: Stands for build mode inside Pressio (Debug / Release)
- { os: ubuntu-latest, image: ubuntu-20.04-gnu_9-eigen_3.3.7-gtest, mode: Release }
- { os: ubuntu-latest, image: ubuntu-20.04-gnu_9-eigen_3.3.7-gtest, mode: Debug }

- { os: ubuntu-latest, image: ubuntu-20.04-clang_9-eigen_3.3.7-gtest, mode: Release }
- { os: ubuntu-latest, image: ubuntu-20.04-clang_9-eigen_3.3.7-gtest, mode: Debug }

- { os: ubuntu-latest, image: fedora-34-gnu_11-eigen_3.3.7-gtest, mode: Release }
- { os: ubuntu-latest, image: fedora-34-gnu_11-eigen_3.3.7-gtest, mode: Debug }

- { os: ubuntu-latest, image: fedora-34-clang_12-eigen_3.3.7-gtest, mode: Release }
- { os: ubuntu-latest, image: fedora-34-clang_12-eigen_3.3.7-gtest, mode: Debug }
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'
fnrizzi marked this conversation as resolved.
Show resolved Hide resolved

#- { os: ubuntu-latest, image: intel_oneapi-eigen_3.3.7-gtest, mode: Release }
#- { os: ubuntu-latest, image: intel_oneapi-eigen_3.3.7-gtest, mode: Debug }

runs-on: ${{ matrix.config.os }}
container: pressiomodelreduction/${{ matrix.config.image }}
runs-on: ubuntu-latest
container: pressiomodelreduction/${{ matrix.image }}
env:
num_cpus: 2
num_cpus: 2 # $(cat /proc/cpuinfo | grep processor -c)
eigen_inc_dir: /usr/local/eigen/install/include/eigen3
gtest_dir: /usr/local/gtest/install
small: small
medium: medium
large: large

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Checkout pressio examples
uses: actions/checkout@v4
with:
repository: Pressio/pressio-templates-usage-as-library
path: examples

- name: Example - include only
working-directory: examples
run: |
$CXX \
-DPRESSIO_ENABLE_TPL_EIGEN \
-I$eigen_inc_dir \
-I../include \
-c main.cpp \
&& $CXX -o pressio-example main.o \
&& ./pressio-example

- name: Example - include only with embedded definitions
working-directory: examples
run: |
$CXX \
-I$eigen_inc_dir \
-I../include \
-c main_with_defines.cpp \
&& $CXX -o pressio-example main.o \
&& ./pressio-example

- name: configure
- name: Configure
run: |
cmake -B builddir \
-D CMAKE_BUILD_TYPE:STRING=${{ matrix.config.mode }} \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-D CMAKE_BUILD_TYPE:STRING=${{ matrix.build_type }} \
-D CMAKE_C_COMPILER=$CC \
-D CMAKE_CXX_COMPILER=$CXX \
-D PRESSIO_ENABLE_TPL_EIGEN:BOOL=ON \
-D EIGEN_INCLUDE_DIR=$eigen_inc_dir \
-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 CMAKE_INSTALL_PREFIX:PATH=../install \
-D CMAKE_CXX_FLAGS=''
-D PRESSIO_ENABLE_TPL_EIGEN:BOOL=ON \
-D EIGEN_INCLUDE_DIR=$eigen_inc_dir

- name: Build
run: |
cmake --build builddir --target install
fnrizzi marked this conversation as resolved.
Show resolved Hide resolved

- name: Example - CMake installed
working-directory: examples/cmake_find_package
run: |
cmake -B builddir \
-DCMAKE_PREFIX_PATH=../../install \
&& cmake --build builddir \
&& ./builddir/pressio-example

- name: Example - CMake add_subdirectory
working-directory: examples/cmake_add_subdirectory
run: |
cmake -B builddir \
-DEIGEN_INCLUDE_DIR=$eigen_inc_dir \
&& cmake --build builddir \
&& ./builddir/pressio-example

- name: Example - CMake include_directories
working-directory: examples/cmake_include_directories
run: |
cmake -B builddir \
-DEIGEN_INCLUDE_DIR=$eigen_inc_dir \
&& cmake --build builddir \
&& ./builddir/pressio-example

# In this stage small functional tests are built and run
- name: build-test-${{ env.small }}
- name: Run small tests
working-directory: builddir/tests/functional_small
run: |
cd builddir/tests/functional_${{ env.small }}
make -j $num_cpus
ctest -j $num_cpus --output-on-failure

# In this stage medium functional tests are built and run
- name: build-test-${{ env.medium }}
- name: Run medium tests
working-directory: builddir/tests/functional_medium
run: |
cd builddir/tests/functional_${{ env.medium }}
make -j $num_cpus
ctest -j $num_cpus --output-on-failure

# In this stage large functional tests are built and run
- name: build-test-${{ env.large }}
- name: Run large tests
working-directory: builddir/tests/functional_large
run: |
cd builddir/tests/functional_${{ env.large }}
make -j $num_cpus
ctest -j $num_cpus --output-on-failure
73 changes: 0 additions & 73 deletions .github/workflows/ci-cxx20.yml

This file was deleted.

Loading