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

prep ci #3

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
89 changes: 89 additions & 0 deletions .github/workflows/ci-baseline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: github-Linux-baseline

on:
pull_request:
types: [ opened, reopened, synchronize ]
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:
- fedora-clang-17
- fedora-gnu-13
- ubuntu-clang-14
- ubuntu-gnu-11
build_type:
- Release
- Debug
cmake_extra_args:
- ''
include:
- image: ubuntu-gnu-11
build_type: Release
cmake_extra_args: '-D CMAKE_CXX_STANDARD=20 -D PRESSIO_ENABLE_CXX20=ON'
- image: ubuntu-clang-14
build_type: Release
cmake_extra_args: '-D CMAKE_CXX_STANDARD=20 -D PRESSIO_ENABLE_CXX20=ON'
- image: fedora-gnu-13
build_type: Release
cmake_extra_args: '-D CMAKE_CXX_STANDARD=20 -D PRESSIO_ENABLE_CXX20=ON'
- image: fedora-clang-17
build_type: Release
cmake_extra_args: '-D CMAKE_CXX_STANDARD=20 -D PRESSIO_ENABLE_CXX20=ON'

runs-on: ubuntu-latest
container:
image: ghcr.io/pressio/${{ matrix.image }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
env:
eigen_version: 3.4.0
num_cpus: 2 # $(cat /proc/cpuinfo | grep processor -c)

steps:
- uses: actions/checkout@v4

- name: Preparing environment
run: |
wget https://gitlab.com/libeigen/eigen/-/archive/${{ env.eigen_version }}/eigen-${{ env.eigen_version }}.tar.gz \
&& mkdir -p /eigen \
&& tar -xf eigen-${{ env.eigen_version }}.tar.gz -C /eigen

- 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='-Wall -Werror' \
-D CMAKE_INSTALL_PREFIX:PATH=../install \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
${{ matrix.cmake_extra_args }} \
-D PRESSIO_OPS_ENABLE_TESTS:BOOL=ON \
-D PRESSIO_ENABLE_TPL_EIGEN:BOOL=ON \
-D EIGEN_INCLUDE_DIR=/eigen/eigen-${{ env.eigen_version }}

- name: Build
run: |
cmake --build builddir --target install

- name: Run tests
working-directory: builddir/tests
run: |
ctest -j $num_cpus --output-on-failure
84 changes: 84 additions & 0 deletions .github/workflows/ci-trilinos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: github-Linux-trilinos

on:
pull_request:
types: [ opened, reopened, synchronize ]
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-trilinos:
name: Trilinos
strategy:
matrix:
image:
- ubuntu-gnu-trilinos-11
tag:
- ef73d14
- 702aac5
- trilinos-release-14-4-0
build_type:
- Release
- Debug
epetra_toggle:
- ON
- OFF

runs-on: ubuntu-latest
container: ghcr.io/pressio/${{ matrix.image }}:${{ matrix.tag }}

env:
eigen_version: 3.4.0
num_cpus: 4
trilinos_dir: /home/pressio_builds/trilinos/install

steps:
- uses: actions/checkout@v4

- name: Preparing environment
run: |
sed -i -e '$alocalhost slots=4' /etc/openmpi/openmpi-default-hostfile \
&& wget https://gitlab.com/libeigen/eigen/-/archive/${{ env.eigen_version }}/eigen-${{ env.eigen_version }}.tar.gz \
&& mkdir -p /eigen \
&& tar -xf eigen-${{ env.eigen_version }}.tar.gz -C /eigen

- name: Configure
run: |
cmake -B builddir \
-D CMAKE_BUILD_TYPE:STRING=${{ matrix.build_type }} \
-D CMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-D CMAKE_C_COMPILER:FILEPATH=/usr/bin/mpicc \
-D CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/mpic++ \
-D MPI_Fortran_COMPILER:FILEPATH=/usr/bin/mpif90 \
-D PRESSIO_OPS_ENABLE_TESTS:BOOL=ON \
-D PRESSIO_ENABLE_TPL_EIGEN:BOOL=ON \
-D PRESSIO_ENABLE_TPL_MPI:BOOL=ON \
-D PRESSIO_ENABLE_TPL_TRILINOS:BOOL=ON \
-D PRESSIO_ENABLE_EPETRA:BOOL=${{ matrix.epetra_toggle }} \
-D PRESSIO_ENABLE_TPL_KOKKOS:BOOL=ON \
-D PRESSIO_ENABLE_TPL_BLAS:BOOL=ON \
-D PRESSIO_ENABLE_TPL_LAPACK:BOOL=ON \
-D PRESSIO_ENABLE_DEBUG_PRINT=ON \
-D EIGEN_INCLUDE_DIR=/eigen/eigen-${{ env.eigen_version }} \
-D Trilinos_DIR=${{ env.trilinos_dir }}/lib/cmake/Trilinos \
-D CMAKE_INSTALL_PREFIX:PATH=../install \
-D CMAKE_CXX_FLAGS='-Wall -Werror'

- name: Build
run: cmake --build builddir -j $num_cpus --target install

- name: Test
working-directory: builddir
run: |
export LD_LIBRARY_PATH=${{ env.trilinos_dir }}/lib
export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
ctest -j $num_cpus --output-on-failure
4 changes: 0 additions & 4 deletions tests/cmake/.macrosForCreatingTests.cmake.~undo-tree~

This file was deleted.

4 changes: 2 additions & 2 deletions tests/cmake/.macrosForCreatingUnitTests.cmake.~undo-tree~
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(undo-tree-save-format-version . 1)
"d9f0f22f534574c2209c1758f13b89645d3321b2"
[nil current nil nil (26325 30216 49299 0) 0 nil]
"2b4f63d4ddc8744f7c3b6914c8bc4706cd7762dc"
[nil current nil nil (26376 53248 93049 0) 0 nil]
nil
4 changes: 0 additions & 4 deletions tests/cmake/.options.cmake.~undo-tree~

This file was deleted.

6 changes: 3 additions & 3 deletions tests/expressions/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# to include google test fixtures
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/fixtures)

if(PRESSIO_OPS_ENABLE_TPL_EIGEN)
if(PRESSIO_ENABLE_TPL_EIGEN)
add_serial_utest(
expressions_eigen
eigen_span.cc
Expand All @@ -11,7 +11,7 @@ if(PRESSIO_OPS_ENABLE_TPL_EIGEN)
)
endif()

if(PRESSIO_OPS_ENABLE_TPL_KOKKOS)
if(PRESSIO_ENABLE_TPL_KOKKOS)
add_serial_utest_kokkos(
expressions_kokkos
kokkos_span.cc
Expand All @@ -21,7 +21,7 @@ if(PRESSIO_OPS_ENABLE_TPL_KOKKOS)
)
endif()

if(PRESSIO_OPS_ENABLE_TPL_TRILINOS)
if(PRESSIO_ENABLE_TPL_TRILINOS)
set(SRC ${CMAKE_CURRENT_SOURCE_DIR}/tpetra_column.cc)
add_utest_mpi(expressions_tpetra_column gTestMain_tpetra 3 "${SRC}")

Expand Down
6 changes: 3 additions & 3 deletions tests/ops/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# to include google test fixtures
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/fixtures)

if(PRESSIO_OPS_ENABLE_TPL_EIGEN)
if(PRESSIO_ENABLE_TPL_EIGEN)
add_serial_utest(
ops_eigen
ops_eigen_vector.cc
Expand All @@ -16,7 +16,7 @@ if(PRESSIO_OPS_ENABLE_TPL_EIGEN)
)
endif()

if(PRESSIO_OPS_ENABLE_TPL_KOKKOS)
if(PRESSIO_ENABLE_TPL_KOKKOS)
add_serial_utest_kokkos(ops_vector_kokkos
ops_kokkos_vector.cc
ops_kokkos_matrix.cc
Expand All @@ -28,7 +28,7 @@ if(PRESSIO_OPS_ENABLE_TPL_KOKKOS)
)
endif()

if(PRESSIO_OPS_ENABLE_TPL_TRILINOS)
if(PRESSIO_ENABLE_TPL_TRILINOS)
# TPETRA
set(SRC1 ${CMAKE_CURRENT_SOURCE_DIR}/ops_tpetra_vector.cc)
add_utest_mpi(ops_vector_tpetra gTestMain_tpetra 3 "${SRC1}")
Expand Down
6 changes: 3 additions & 3 deletions tests/type_traits/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set(SRC1 ${CMAKE_CURRENT_SOURCE_DIR}/detect_typedefs.cc)
add_serial_utest(type_traits_nested_typedefs ${SRC1})

if(PRESSIO_OPS_ENABLE_TPL_EIGEN)
if(PRESSIO_ENABLE_TPL_EIGEN)
set(SRC1 ${CMAKE_CURRENT_SOURCE_DIR}/all_have_traits.cc)
set(EXE type_traits_all_have_traits_eigen)
add_serial_utest(${EXE} ${SRC1})
Expand All @@ -17,7 +17,7 @@ if(PRESSIO_OPS_ENABLE_TPL_EIGEN)
add_serial_utest(type_traits_eigen ${SRC1})
endif()

if(PRESSIO_OPS_ENABLE_TPL_KOKKOS)
if(PRESSIO_ENABLE_TPL_KOKKOS)
set(SRC1 ${CMAKE_CURRENT_SOURCE_DIR}/all_have_traits.cc)
set(EXE type_traits_all_have_traits_kokkos)
add_serial_utest(${EXE} ${SRC1})
Expand All @@ -32,7 +32,7 @@ if(PRESSIO_OPS_ENABLE_TPL_KOKKOS)
add_serial_utest_kokkos(type_traits_kokkos ${SRC1})
endif()

if(PRESSIO_OPS_ENABLE_TPL_TRILINOS)
if(PRESSIO_ENABLE_TPL_TRILINOS)
set(SRC ${CMAKE_CURRENT_SOURCE_DIR}/traits_teuchos.cc)
add_serial_utest(type_traits_teuchos ${SRC})

Expand Down