Skip to content
Merged
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
71 changes: 45 additions & 26 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
-G Ninja -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
-D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=install
env:
CC: gcc-14
CXX: g++-14
Expand All @@ -76,6 +76,41 @@ jobs:
env:
CC: gcc-14
CXX: g++-14
- name: Install project
run: |
cmake --build build --target install
- name: Archive installed package
run: |
tar -czvf ubuntu-gcc-install.tar.gz -C install .
- name: Upload installed package
uses: actions/upload-artifact@v4
with:
name: ubuntu-gcc-install
path: ubuntu-gcc-install.tar.gz
ubuntu-gcc-test:
needs:
- ubuntu-gcc-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-14 g++-14
sudo apt-get install ninja-build
sudo apt-get install mpich
sudo apt-get install libomp-dev
sudo apt-get install valgrind
python3 -m pip install -r requirements.txt
- name: Download installed package
uses: actions/download-artifact@v4
with:
name: ubuntu-gcc-install
- name: Extract installed package
run: |
mkdir -p install
tar -xzvf ubuntu-gcc-install.tar.gz -C install
- name: Run func tests (MPI, num_proc=1)
run: |
source scripts/run_mpi.sh
Expand Down Expand Up @@ -116,14 +151,12 @@ jobs:
run: source scripts/run_threads.sh
env:
OMP_NUM_THREADS: 4
ubuntu-gcc-build-extended:
ubuntu-gcc-test-extended:
needs:
- ubuntu-gcc-build
- ubuntu-gcc-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup environment
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
Expand All @@ -134,28 +167,14 @@ jobs:
sudo apt-get install libomp-dev
sudo apt-get install valgrind
python3 -m pip install -r requirements.txt
- name: ccache
uses: hendrikmuhs/ccache-action@v1.2
- name: Download installed package
uses: actions/download-artifact@v4
with:
key: ${{ github.job }}
create-symlink: true
max-size: 1G
- name: CMake configure
run: >
cmake -S . -B build
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
-G Ninja -D USE_SEQ=ON -D USE_MPI=ON -D USE_OMP=ON -D USE_TBB=ON -D USE_STL=ON
-D USE_FUNC_TESTS=ON -D USE_PERF_TESTS=ON
-D CMAKE_BUILD_TYPE=RELEASE
env:
CC: gcc-14
CXX: g++-14
- name: Build project
name: ubuntu-gcc-install
- name: Extract installed package
run: |
cmake --build build --parallel
env:
CC: gcc-14
CXX: g++-14
mkdir -p install
tar -xzvf ubuntu-gcc-install.tar.gz -C install
- name: Run func tests (threads, num_threads=5)
run: source scripts/run_threads.sh
env:
Expand Down Expand Up @@ -899,7 +918,7 @@ jobs:
CLANG_BUILD: 1
ubuntu-gcc-build-codecov:
needs:
- ubuntu-gcc-build-extended
- ubuntu-gcc-test-extended
- ubuntu-clang-build-extended
- macos-clang-build-extended
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ sln/
CMakeSettings.json
.DS_Store
.cache
install
2 changes: 2 additions & 0 deletions cmake/onetbb.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ if( USE_TBB )
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/build" --config ${CMAKE_BUILD_TYPE} --parallel
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/install")
endif()
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ppc_onetbb/install/"
DESTINATION "${CMAKE_INSTALL_PREFIX}")
endif( USE_TBB )
2 changes: 2 additions & 0 deletions cmake/opencv.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ else()
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_opencv/build" --config ${CMAKE_BUILD_TYPE} --parallel
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_opencv/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_opencv/install")
endif()
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/ppc_opencv/install/"
DESTINATION "${CMAKE_INSTALL_PREFIX}")
9 changes: 9 additions & 0 deletions modules/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,12 @@ target_link_libraries(${exec_func_tests} PUBLIC ${exec_func_lib})

enable_testing()
add_test(NAME ${exec_func_tests} COMMAND ${exec_func_tests})

# Installation rules
install(TARGETS ${exec_func_lib}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)

install(TARGETS ${exec_func_tests}
RUNTIME DESTINATION bin)
9 changes: 9 additions & 0 deletions modules/ref/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,12 @@ target_link_libraries(${exec_func_tests} PUBLIC ${exec_func_lib})

enable_testing()
add_test(NAME ${exec_func_tests} COMMAND ${exec_func_tests})

# Installation rules
install(TARGETS ${exec_func_lib}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)

install(TARGETS ${exec_func_tests}
RUNTIME DESTINATION bin)
24 changes: 15 additions & 9 deletions scripts/run_mpi.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
#!/bin/bash
source build/ppc_opencv/install/bin/setup_vars_opencv4.sh
if [[ -f build/ppc_opencv/install/bin/setup_vars_opencv4.sh ]]; then
INSTALL_BIN_DIR="build/bin"
source build/ppc_opencv/install/bin/setup_vars_opencv4.sh
else
INSTALL_BIN_DIR="install/bin"
source $INSTALL_BIN_DIR/setup_vars_opencv4.sh
fi

if [[ $OSTYPE == "linux-gnu" && -z "$ASAN_RUN" ]]; then
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/core_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/ref_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/core_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/ref_func_tests

# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/all_func_tests
# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/mpi_func_tests
# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/all_func_tests
# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/mpi_func_tests
fi

./build/bin/core_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
./build/bin/ref_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
$INSTALL_BIN_DIR/core_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
$INSTALL_BIN_DIR/ref_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating

if [[ -z "$ASAN_RUN" ]]; then
mpirun $1 -np $PROC_COUNT ./build/bin/all_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
mpirun $1 -np $PROC_COUNT ./build/bin/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
mpirun $1 -np $PROC_COUNT $INSTALL_BIN_DIR/all_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
mpirun $1 -np $PROC_COUNT $INSTALL_BIN_DIR/mpi_func_tests --gtest_also_run_disabled_tests --gtest_repeat=10 --gtest_recreate_environments_when_repeating
fi
32 changes: 19 additions & 13 deletions scripts/run_threads.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
#!/bin/bash
source build/ppc_opencv/install/bin/setup_vars_opencv4.sh
if [[ -f build/ppc_opencv/install/bin/setup_vars_opencv4.sh ]]; then
INSTALL_BIN_DIR="build/bin"
source build/ppc_opencv/install/bin/setup_vars_opencv4.sh
else
INSTALL_BIN_DIR="install/bin"
source $INSTALL_BIN_DIR/setup_vars_opencv4.sh
fi

if [[ $OSTYPE == "linux-gnu" && -z "$ASAN_RUN" ]]; then
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/core_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/ref_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/core_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/ref_func_tests

# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/omp_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/seq_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/stl_func_tests
# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all ./build/bin/tbb_func_tests
# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/omp_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/seq_func_tests
valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/stl_func_tests
# valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all $INSTALL_BIN_DIR/tbb_func_tests
fi

./build/bin/core_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
./build/bin/ref_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
$INSTALL_BIN_DIR/core_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
$INSTALL_BIN_DIR/ref_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating

./build/bin/omp_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
./build/bin/seq_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
./build/bin/stl_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
./build/bin/tbb_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
$INSTALL_BIN_DIR/omp_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
$INSTALL_BIN_DIR/seq_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
$INSTALL_BIN_DIR/stl_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
$INSTALL_BIN_DIR/tbb_func_tests --gtest_also_run_disabled_tests --gtest_repeat=3 --gtest_recreate_environments_when_repeating
6 changes: 6 additions & 0 deletions tasks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,14 @@ foreach(TASK_TYPE ${LIST_OF_TASKS})
target_link_libraries(${EXEC_FUNC} PUBLIC gtest gtest_main)
enable_testing()
add_test(NAME ${EXEC_FUNC} COMMAND ${EXEC_FUNC})

# Install the executable
install(TARGETS ${EXEC_FUNC} RUNTIME DESTINATION bin)
endforeach ()

# Install the library
install(TARGETS ${exec_func_lib} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib)

set(LIST_OF_EXEC_TESTS "")
set(LIB_SOURCE_FILES "")
set(SRC_RES "")
Expand Down
Loading