Skip to content

Commit

Permalink
ci: Add olcf gitlab
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck Atkins committed May 7, 2020
1 parent 60808b1 commit e93e63c
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .gitlab/gitlab-ci-olcf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
stages:
- full

.all-steps:
stage: full
variables:
GITLAB_SITE: "OLCF GitLab"
CMAKE_ENV_MODULE: "cmake"
script:
- bash scripts/ci/gitlab-ci/run.sh update
- bash scripts/ci/gitlab-ci/run.sh configure
- bash scripts/ci/gitlab-ci/run.sh build
- bash scripts/ci/gitlab-ci/run.sh test

ascent-xl:
extends:
- .all-steps
tags: [nobatch]

ascent-gcc:
extends:
- .all-steps
tags: [nobatch]

#ascent-xl-smpi:
# extends:
# - .all-steps
# tags: [batch]
# variables:
# SCHEDULER_PARAMETERS: "-P CSC303 -W 1:00 -nnodes 1"
39 changes: 39 additions & 0 deletions scripts/ci/cmake/ci-ascent-gcc.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Client maintainer: chuck.atkins@kitware.com

find_package(EnvModules REQUIRED)

env_module(purge)
env_module(load git)
env_module(load gcc/8.1.1)
env_module(load hdf5)
env_module(load libfabric)
env_module(load python/3.7.0)
env_module(load zfp)
env_module(load zeromq)

set(ENV{CC} gcc)
set(ENV{CXX} g++)
set(ENV{FC} gfortran)
set(ENV{CFLAGS} "-Werror -Wno-error=builtin-declaration-mismatch")
set(ENV{CXXFLAGS} "-Werror -Wno-error=builtin-declaration-mismatch")
set(ENV{FFLAGS} "-Werror -Wno-error=builtin-declaration-mismatch")

set(dashboard_cache "
ADIOS2_USE_BZip2:BOOL=OFF
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=OFF
ADIOS2_USE_SST:BOOL=ON
ADIOS2_USE_SZ:BOOL=OFF
ADIOS2_USE_ZeroMQ:STRING=ON
ADIOS2_USE_ZFP:BOOL=OFF
")

set(NCPUS 4)
set(CTEST_TEST_ARGS PARALLEL_LEVEL 8)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake)
36 changes: 36 additions & 0 deletions scripts/ci/cmake/ci-ascent-xl.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Client maintainer: chuck.atkins@kitware.com

find_package(EnvModules REQUIRED)

env_module(purge)
env_module(load git)
env_module(load xl)
env_module(load hdf5)
env_module(load libfabric)
env_module(load python/3.7.0)
env_module(load zfp)
env_module(load zeromq)

set(ENV{CC} xlc)
set(ENV{CXX} xlc++)
set(ENV{FC} xlf)

set(dashboard_cache "
ADIOS2_USE_BZip2:BOOL=OFF
ADIOS2_USE_Blosc:BOOL=OFF
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=OFF
ADIOS2_USE_SST:BOOL=ON
ADIOS2_USE_SZ:BOOL=OFF
ADIOS2_USE_ZeroMQ:STRING=ON
ADIOS2_USE_ZFP:BOOL=OFF
")

set(NCPUS 4)
set(CTEST_TEST_ARGS PARALLEL_LEVEL 8)
set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake)
48 changes: 48 additions & 0 deletions scripts/ci/gitlab-ci/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash --login

if [ -n "${GITLAB_SITE}" ]
then
export CI_SITE_NAME="${GITLAB_SITE}"
else
export CI_SITE_NAME="GitLab CI"
fi

export CI_BUILD_NAME="${CI_COMMIT_BRANCH}_${CI_JOB_NAME}"
export CI_SOURCE_DIR="${CI_PROJECT_DIR}"
export CI_ROOT_DIR="${CI_PROJECT_DIR}/.."
export CI_BIN_DIR="${CI_ROOT_DIR}/${CI_BUILD_NAME}"
export CI_COMMIT_REF=${CI_COMMIT_SHA}

STEP=$1
CTEST_SCRIPT=scripts/ci/cmake/ci-${CI_JOB_NAME}.cmake

# Update and Test steps enable an extra step
CTEST_STEP_ARGS=""
case ${STEP} in
test) CTEST_STEP_ARGS="${CTEST_STEP_ARGS} -Ddashboard_do_end=ON" ;;
esac
CTEST_STEP_ARGS="${CTEST_STEP_ARGS} -Ddashboard_do_${STEP}=ON"

if [ -n "${CMAKE_ENV_MODULE}" ]
then
module load ${CMAKE_ENV_MODULE}

echo "**********module avail Begin************"
module avail
echo "**********module avail End**************"
fi

CTEST=ctest

echo "**********Env Begin**********"
env | sort
echo "**********Env End************"

echo "**********CTest Begin**********"
${CTEST} --version
echo ${CTEST} -VV -S ${CTEST_SCRIPT} -Ddashboard_full=OFF ${CTEST_STEP_ARGS}
${CTEST} -VV -S ${CTEST_SCRIPT} -Ddashboard_full=OFF ${CTEST_STEP_ARGS}
RET=$?
echo "**********CTest End************"

exit ${RET}

0 comments on commit e93e63c

Please sign in to comment.