Skip to content

Commit

Permalink
Merge pull request #149 from ExaScience/dev/test_integration
Browse files Browse the repository at this point in the history
integrate all unittests in the single `smurff` binary
  • Loading branch information
tvandera authored Jun 24, 2024
2 parents e4c7b90 + 2cffa23 commit edab340
Show file tree
Hide file tree
Showing 38 changed files with 276 additions and 18,599 deletions.
6 changes: 6 additions & 0 deletions .actrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
--container-architecture linux/amd64
--secret-file=/home/vanderaa/.secrets
-P self-hosted=docker.exascience.org:5000/csa_env_dlang
-P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest
-P ubuntu-20.04=ghcr.io/catthehacker/ubuntu:act-20.04
-P ubuntu-18.04=ghcr.io/catthehacker/ubuntu:act-18.04
20 changes: 18 additions & 2 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,25 @@ jobs:
sudo apt-get install -y cmake wget ninja-build libblas-dev liblapack-dev liblapacke-dev libboost-all-dev libopenmpi-dev libeigen3-dev libhdf5-dev
sudo apt-get clean all
- name: Install Catch v3
run: |
cd /tmp
wget -O Catch2.tar.gz https://github.com/catchorg/Catch2/archive/refs/tags/v3.6.0.tar.gz
tar xzf Catch2.tar.gz
rm Catch2.tar.gz
cd Catch2*
cmake -S . -B build -DBUILD_TESTING=OFF
cmake --build build
sudo cmake --install build
- name: Install HighFive
run: |
cd /tmp
wget -O HighFive.tar.gz https://github.com/BlueBrain/HighFive/archive/v2.9.0.tar.gz
tar xzf HighFive.tar.gz
rm HighFive.tar.gz
cd HighFive*
cmake -S . -B build
cmake -DHIGHFIVE_EXAMPLES=OFF -DHIGHFIVE_USE_BOOST=OFF -DHIGHFIVE_UNIT_TESTS=OFF -S . -B build
cmake --build build
sudo cmake --install build
Expand All @@ -47,6 +59,10 @@ jobs:
run: |-
cmake --build build.${{ matrix.build.type }}
- name: Install
run: |-
sudo cmake --install build.${{ matrix.build.type }}
- name: Run tests
run: |-
./build.${{ matrix.build.type }}/bin/tests
smurff --bist
19 changes: 9 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,8 @@ elseif (CMAKE_COMPILER_IS_GNUCXX OR APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas -Wnon-virtual-dtor -Wno-parentheses -fPIC")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wno-unknown-pragmas -fPIC")

# suppress some pesky Eigen 3.3.7 warnings
if (CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 7.0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-int-in-bool-context")
endif()
# suppress some pesky Eigen warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-but-set-variable")

if (ENABLE_ASAN)
add_compile_options(-fno-omit-frame-pointer -fsanitize=address)
Expand Down Expand Up @@ -338,7 +336,13 @@ include_directories(cpp)

message(STATUS "Creating folder structure...")

SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin")

# tests
if(ENABLE_TESTS)
find_package(Catch2 3 REQUIRED)
add_definitions(-DENABLE_TESTS)
add_subdirectory (cpp/Tests)
endif (ENABLE_TESTS)

# libraries
add_subdirectory (cpp/SmurffCpp)
Expand All @@ -353,11 +357,6 @@ if(ENABLE_MPI)
add_subdirectory (cpp/SmurffMPI)
endif()

# tests
if(ENABLE_TESTS)
add_subdirectory (cpp/Tests)
endif()

# python
if(ENABLE_PYTHON)
configure_python()
Expand Down
34 changes: 0 additions & 34 deletions ci/Jenkinsfile

This file was deleted.

185 changes: 0 additions & 185 deletions ci/azure-pipelines.yml

This file was deleted.

2 changes: 1 addition & 1 deletion ci/buildwheel/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cd "$SCRIPT_DIR"
echo "MACOSX_DEPLOYMENT_TARGET: [$MACOSX_DEPLOYMENT_TARGET]"
echo "PWD: [$PWD]"

brew install --formulae eigen ../highfive.rb
brew install --formulae eigen ../highfive.rb catch2
brew uninstall --ignore-dependencies hdf5

./install_hdf5.sh
14 changes: 0 additions & 14 deletions ci/conda-steps.yml

This file was deleted.

Loading

0 comments on commit edab340

Please sign in to comment.