Skip to content

Commit

Permalink
Make ci actually test things
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaAtulTewari committed Apr 12, 2024
1 parent 920616e commit d355217
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 44 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
prep-mpi-ubuntu-2204-docker:
name: gcc / ${{ matrix.build-type }}
name: gcc / ${{ matrix.project }} / ${{ matrix.build-type }}
runs-on: self-hosted
permissions:
contents: read
Expand All @@ -36,9 +36,14 @@ jobs:
strategy:
matrix:
build-type: ['Release', 'LSAN', 'UBSAN']
project: ["ROOT", "GALOIS", "WF4"]
exclude:
- build-type: "UBSAN"
project: "ROOT"
- build-type: "UBSAN"
project: "ROOT"

steps:

- name: Checkout
uses: actions/checkout@v4
with:
Expand All @@ -54,25 +59,25 @@ jobs:
echo "SRC_DIR=$(pwd)" >> $GITHUB_ENV
echo "PANDO_TEST_DISCOVERY_TIMEOUT=600" >> $GITHUB_ENV
echo "IMAGE_VERSION=$(git log --pretty="%h" -1 Dockerfile.dev)" >> $GITHUB_ENV
if [ ${{ matrix.build-type }} == 'LSAN' ]; then
echo "PANDO_BUILD_DOCS=OFF" >> $GITHUB_ENV
echo "PANDO_CONTAINER_ENV=-e=PANDO_PREP_L1SP_HART=16384" >> $GITHUB_ENV
if [ ${{ matrix.build-type }} == 'LSAN' ] || [ ${{ matrix.build-type}} == 'UBSAN']; then
PANDO_CONTAINER_ENV="-e=PANDO_PREP_L1SP_HART=16384"
fi
if [ ${{ matrix.library }} == 'ROOT' ]; then
PANDO_CONTAINER_ENV="${PANDO_CONTAINER_ENV} -e=ROOT_TESTS=ON"
fi
if [ ${{ matrix.build-type }} == 'UBSAN' ]; then
echo "PANDO_BUILD_DOCS=OFF" >> $GITHUB_ENV
echo "PANDO_CONTAINER_ENV=-e=PANDO_PREP_L1SP_HART=16384" >> $GITHUB_ENV
if [ ${{ matrix.library }} == 'GALOIS' ]; then
PANDO_CONTAINER_ENV="${PANDO_CONTAINER_ENV} -e=GALOIS_TESTS=ON"
fi
if [ ${{ matrix.build-type }} == 'Release' ]; then
echo "PANDO_BUILD_DOCS=OFF" >> $GITHUB_ENV
echo "PANDO_CONTAINER_ENV=-e=PANDORT_TESTS=ON -e=WF4_TESTS=ON" >> $GITHUB_ENV
if [ ${{ matrix.library }} == 'WF4' ]; then
PANDO_CONTAINER_ENV="${PANDO_CONTAINER_ENV} -e=BUILD_WORKFLOWS=ON -e=WF4_TESTS=ON"
fi
echo ${{ runner.name }}
if [ ${{ runner.name }} == 'zerberus-0' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30'" >> $GITHUB_ENV
fi
if [ ${{ runner.name }} == 'zerberus-1' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31'" >> $GITHUB_ENV
fi
echo "PANDO_CONTAINER_ENV=${PANDO_CONTAINER_ENV}" >> ${GITHUB_ENV}
cat $GITHUB_ENV
- name: Configure
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/drivex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
docker-drivex-ubuntu-2204:
name: gcc / ${{ matrix.build-type }}
name: gcc / ${{ matrix.project }} / ${{ matrix.build-type }}
runs-on: self-hosted
permissions:
contents: read
Expand All @@ -36,6 +36,7 @@ jobs:
strategy:
matrix:
build-type: ['Release']
project: ["ROOT", "GALOIS", "WF4"]

steps:

Expand All @@ -54,14 +55,22 @@ jobs:
echo "SRC_DIR=$(pwd)" >> $GITHUB_ENV
echo "PANDO_TEST_DISCOVERY_TIMEOUT=600" >> $GITHUB_ENV
echo "IMAGE_VERSION=$(git log --pretty="%h" -1 Dockerfile.dev)" >> $GITHUB_ENV
echo "PANDO_CONTAINER_ENV=-e=PANDORT_TESTS=ON" >> $GITHUB_ENV
echo ${{ runner.name }}
if [ ${{ matrix.project }} == 'ROOT' ]; then
PANDO_CONTAINER_ENV="${PANDO_CONTAINER_ENV} -e=ROOT_TESTS=ON"
fi
if [ ${{ matrix.project }} == 'GALOIS' ]; then
PANDO_CONTAINER_ENV="${PANDO_CONTAINER_ENV} -e=GALOIS_TESTS=ON"
fi
if [ ${{ matrix.project }} == 'WF4' ]; then
PANDO_CONTAINER_ENV="${PANDO_CONTAINER_ENV} -e=BUILD_WORKFLOWS=ON -e=WF4_TESTS=ON"
fi
if [ ${{ runner.name }} == 'zerberus-0' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30'" >> $GITHUB_ENV
fi
if [ ${{ runner.name }} == 'zerberus-1' ]; then
echo "CONTAINER_CPUSET='--cpuset-cpus=1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31'" >> $GITHUB_ENV
fi
echo "PANDO_CONTAINER_ENV=${PANDO_CONTAINER_ENV}" >> ${GITHUB_ENV}
cat $GITHUB_ENV
- name: Configure
Expand Down
26 changes: 10 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,11 @@ if(CMAKE_CXX_FLAGS)
message(STATUS "Provided CXX Flags: " ${CMAKE_CXX_FLAGS})
endif()

option(ENABLE_PANDORT_TESTS "Enable pando-rt to run tests" OFF)
option(ENABLE_WF4_TESTS "Enable wf4 to run tests" OFF)
option(ENABLE_GALOIS_TESTS "Enable GALOIS to run tests" OFF)
option(ENABLE_ROOT_TESTS "Enable ROOT to run tests" OFF)
option(ENABLE_INFLUENCE_MAX_TESTS "Enable Influence Maximization to run tests" OFF)

if (NOT ENABLE_PANDORT_TESTS)
message("Not Enabling Pandort testing")
set(BUILD_TESTING_SAVED "${BUILD_TESTING}")
set(BUILD_TESTING OFF)
endif()
add_subdirectory(pando-rt)
if(NOT ENABLE_PANDORT_TESTS)
set(BUILD_TESTING "${BUILD_TESTING_SAVED}")
endif()

# CMake modules
list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_CURRENT_LIST_DIR}/pando-rt/cmake/Modules)
Expand Down Expand Up @@ -164,31 +157,32 @@ set_target_properties(pando-lib-galois
add_subdirectory(src)

# tests
option(BUILD_TESTING "Build tests." ON)
include(cmake/PANDOTesting.cmake)
if (BUILD_TESTING)
if (ENABLE_GALOIS_TESTS)
enable_testing()
add_subdirectory(test)
endif ()

# Microbencharmks
option(BUILD_MICROBENCH "Build Microbenchmarks" ON)
option(MICROBENCH_TESTING "Testing for microbenchmarks" ON)
option(BUILD_MICROBENCH "Build Microbenchmarks" OFF)
if (BUILD_MICROBENCH)
add_subdirectory(microbench)
endif()

# examples
option(BUILD_EXAMPLES "Build examples" ON)
option(BUILD_EXAMPLES "Build examples" OFF)
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif ()

# documentation
option(BUILD_DOCS "Build documentation" ON)
option(BUILD_DOCS "Build documentation" OFF)
if (BUILD_DOCS)
add_subdirectory(docs)
endif ()

# workflows
option(BUILD_WORKFLOWS "Build Workflows" OFF)
if (BUILD_WORKFLOWS)
add_subdirectory(workflows)
endif()
19 changes: 12 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ CONTAINER_CMD ?= setarch `uname -m` -R bash -l
INTERACTIVE ?= i

BUILD_TYPE ?= Release
PANDORT_TESTS ?= OFF
ROOT_TESTS ?= OFF
GALOIS_TESTS ?= OFF
BFS_TESTS ?= OFF
WF4_TESTS ?= OFF

# CMake variables
Expand Down Expand Up @@ -131,8 +133,9 @@ cmake-mpi:
-DCMAKE_INSTALL_PREFIX=/opt/pando-lib-galois \
-DBUILD_TESTING=ON \
-DBUILD_EXAMPLES=ON \
-DENABLE_PANDORT_TESTS=${PANDORT_TESTS} \
-DENABLE_WF4_TESTS=${WF4_TESTS} \
-DENABLE_ROOT_TESTS=${ROOT_TESTS} \
-DENABLE_GALOIS_TESTS=${GALOIS_TESTS} \
-DENABLE_INFLUENCE_MAX_TESTS=${WF4_TESTS} \
-DBUILD_DOCS=${PANDO_BUILD_DOCS} \
-DPANDO_TEST_DISCOVERY_TIMEOUT=${PANDO_TEST_DISCOVERY_TIMEOUT} \
-DCMAKE_CXX_COMPILER=g++-12 \
Expand All @@ -151,8 +154,9 @@ cmake-smp:
-DCMAKE_INSTALL_PREFIX=/opt/pando-lib-galois \
-DBUILD_TESTING=ON \
-DBUILD_EXAMPLES=ON \
-DENABLE_PANDORT_TESTS=${PANDORT_TESTS} \
-DENABLE_WF4_TESTS=${WF4_TESTS} \
-DENABLE_ROOT_TESTS=${ROOT_TESTS} \
-DENABLE_GALOIS_TESTS=${GALOIS_TESTS} \
-DENABLE_INFLUENCE_MAX_TESTS=${WF4_TESTS} \
-DBUILD_DOCS=${PANDO_BUILD_DOCS} \
-DPANDO_TEST_DISCOVERY_TIMEOUT=${PANDO_TEST_DISCOVERY_TIMEOUT} \
-DCMAKE_CXX_COMPILER=g++-12 \
Expand All @@ -169,8 +173,9 @@ cmake-drv:
-DCMAKE_INSTALL_PREFIX=/opt/pando-lib-galois \
-DBUILD_TESTING=ON \
-DBUILD_EXAMPLES=ON \
-DENABLE_PANDORT_TESTS=${PANDORT_TESTS} \
-DENABLE_WF4_TESTS=${WF4_TESTS} \
-DENABLE_ROOT_TESTS=${ROOT_TESTS} \
-DENABLE_GALOIS_TESTS=${GALOIS_TESTS} \
-DENABLE_INFLUENCE_MAX_TESTS=${WF4_TESTS} \
-DBUILD_DOCS=OFF \
-DCMAKE_CXX_COMPILER=g++-12 \
-DCMAKE_C_COMPILER=gcc-12
Expand Down
5 changes: 1 addition & 4 deletions pando-rt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,18 @@ set_target_properties(pando-rt
add_subdirectory(src)

# tests
option(BUILD_TESTING "Build tests." ON)
if (BUILD_TESTING)
if (ENABLE_ROOT_TESTS)
include(cmake/PANDOTesting.cmake)
enable_testing()
add_subdirectory(test)
endif ()

# examples
option(BUILD_EXAMPLES "Build examples" ON)
if (BUILD_EXAMPLES)
add_subdirectory(examples)
endif ()

# documentation
option(BUILD_DOCS "Build documentation" ON)
if (BUILD_DOCS)
add_subdirectory(docs)
endif ()
4 changes: 2 additions & 2 deletions workflows/influence_maximization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ set_target_properties(pando-wf4-galois
add_subdirectory(src)

# tests
option(BUILD_TESTING "Build tests." ON)
if (BUILD_TESTING AND ENABLE_WF4_TESTS)
option(ENABLE_INFLUENCE_MAX_TESTS "Build INFLUENCE MAX tests." ON)
if (ENABLE_INFLUENCE_MAX_TESTS)
add_subdirectory(test)
endif ()

0 comments on commit d355217

Please sign in to comment.