From d3552174b768acbd4cfb062752da437ff637663c Mon Sep 17 00:00:00 2001 From: AdityaAtulTewari Date: Fri, 12 Apr 2024 06:03:33 +0000 Subject: [PATCH] Make ci actually test things --- .github/workflows/docker.yml | 29 +++++++++++-------- .github/workflows/drivex.yml | 15 ++++++++-- CMakeLists.txt | 26 +++++++---------- Makefile | 19 +++++++----- pando-rt/CMakeLists.txt | 5 +--- .../influence_maximization/CMakeLists.txt | 4 +-- 6 files changed, 54 insertions(+), 44 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e9732435..e3868174 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -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 @@ -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: @@ -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 diff --git a/.github/workflows/drivex.yml b/.github/workflows/drivex.yml index c20570de..413c6409 100644 --- a/.github/workflows/drivex.yml +++ b/.github/workflows/drivex.yml @@ -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 @@ -36,6 +36,7 @@ jobs: strategy: matrix: build-type: ['Release'] + project: ["ROOT", "GALOIS", "WF4"] steps: @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 56c7d995..206ed51e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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() diff --git a/Makefile b/Makefile index baa53950..0d9f4003 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 \ @@ -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 \ @@ -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 diff --git a/pando-rt/CMakeLists.txt b/pando-rt/CMakeLists.txt index c8ef5f7f..dad939da 100644 --- a/pando-rt/CMakeLists.txt +++ b/pando-rt/CMakeLists.txt @@ -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 () diff --git a/workflows/influence_maximization/CMakeLists.txt b/workflows/influence_maximization/CMakeLists.txt index 931b69a1..8be1b18d 100644 --- a/workflows/influence_maximization/CMakeLists.txt +++ b/workflows/influence_maximization/CMakeLists.txt @@ -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 ()