Skip to content

Commit

Permalink
Merge b492e5e into 825300c
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbernede committed Mar 10, 2020
2 parents 825300c + b492e5e commit 8d82a82
Show file tree
Hide file tree
Showing 10 changed files with 756 additions and 404 deletions.
144 changes: 144 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
##############################################################################
# Copyright (c) 2014-20, Lawrence Livermore National Security, LLC and Conduit
# project contributors. See the COPYRIGHT file for details.
##############################################################################

variables:
GIT_SUBMODULE_STRATEGY: recursive
CONDUIT_ALLOC_NAME: conduit_${CI_PIPELINE_ID}
BUILD_ROOT: ${CI_BUILDS_DIR}/conduit_${CI_COMMIT_REF_SLUG}_${CI_PIPELINE_ID}
INSTALL_ROOT: ${CI_BUILDS_DIR}/spack_uberenv
SPACK_UPSTREAM: /usr/workspace/radiuss/spack-chain-parent/opt/spack

stages:
- allocate_resources
- deps
- install
- release_resources
- clean

# Some scripts
.run_update_uberenv: &run_update_uberenv |
[[ -n "${UPDATE_UBERENV}" ]] && ./scripts/ci/update-uberenv.sh "${UPDATE_UBERENV}"

.def_uberenv_cmd: &def_uberenv_cmd |
INSTALL=""
[[ "${UBERENV_INSTALL}" == "ON" ]] && INSTALL="--install --run_tests"
PREFIX="--prefix=${INSTALL_ROOT}_${SYS_TYPE}_${TOOLCHAIN}"
UPSTREAM="--upstream=${SPACK_UPSTREAM}"
SPEC="--spec=${PKG_SPEC}"
UBERENV_CMD="scripts/uberenv/uberenv.py ${INSTALL} ${SPEC} ${PREFIX} ${UPSTREAM}"

# Build modes
.mode_deps:
stage: deps
variables:
UBERENV_INSTALL: "OFF"

.mode_install:
stage: install
variables:
UBERENV_INSTALL: "ON"

##################
# QUARTZ TEMPLATES
##################

# Shared configuration of jobs for quartz
.on_quartz:
tags:
- shell
- quartz
timeout: 3h
except:
refs:
- /_qnone/
variables:
- $CONDUIT_CI_QUARTZ == "OFF"

# Allocation sequence
.def_srun_prefix: &def_srun_prefix |
JOB_ID=$(squeue -h --name=${CONDUIT_ALLOC_NAME} --format=%A)
[[ -n "${JOB_ID}" ]] && JOB_ID="--jobid=${JOB_ID}"
RESOURCES="-N 1 -n 1 -c 12"
export SRUN_PREFIX="srun ${JOB_ID} ${RESOURCES}"

# Template defining the generic script for quartz
.srun_build_script:
script:
- *run_update_uberenv
- *def_srun_prefix
- *def_uberenv_cmd
- set -x; ${SRUN_PREFIX} ${UBERENV_CMD}; set +x

####
# Generic qwartz jobs
.build_deps_on_quartz:
extends: [.srun_build_script, .mode_deps, .on_quartz]

.install_on_quartz:
extends: [.srun_build_script, .mode_install, .on_quartz]

##################
# LASSEN TEMPLATES
##################

# Shared configuration of jobs for lassen
.on_lassen:
variables:
tags:
- shell
- lassen
rules:
- if: '$CI_COMMIT_BRANCH =~/_lnone/ || $CONDUIT_CI_LASSEN == "OFF"'
when: never
- when: on_success
allow_failure: true

# Template defining the generic script for lassen
.lsf_build_script:
script:
- *run_update_uberenv
- *def_uberenv_cmd
- set -x; lalloc 1 ${UBERENV_CMD}; set +x

####
# Generic lassen jobs
.build_deps_on_lassen:
extends: [.lsf_build_script, .mode_deps, .on_lassen]

.install_on_lassen:
extends: [.lsf_build_script, .mode_install, .on_lassen]

############
# TOOLCHAINS
############

.with_gcc:
variables:
TOOLCHAIN: "gcc"
PKG_SPEC: ""

.with_gcc_static:
variables:
TOOLCHAIN: "gcc_static"
PKG_SPEC: "%gcc~shared"

.with_clang:
variables:
TOOLCHAIN: "clang"
PKG_SPEC: "%clang@coral~python~fortran"

.with_xl:
variables:
TOOLCHAIN: "xl"
PKG_SPEC: "%xl@coral~shared~python~fortran"

################
# JOBS INCLUSION
################

# This is where jobs are included
include:
- local: .gitlab/ci/build_quartz.yml
- local: .gitlab/ci/build_lassen.yml
21 changes: 21 additions & 0 deletions .gitlab/ci/build_lassen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
##############################################################################
# Copyright (c) 2016-2020, Lawrence Livermore National Security, LLC and
# Conduit project contributors. See the COPYRIGHT file for details.
#
# SPDX-License-Identifier: (MIT)
##############################################################################

# Here are all lassen build jobs
L_build_deps_clang:
extends: [.build_deps_on_lassen, .with_clang]

L_install_clang:
extends: [.install_on_lassen, .with_clang]
needs: [L_build_deps_clang]

L_build_deps_xl:
extends: [.build_deps_on_lassen, .with_xl]

L_install_xl:
extends: [.install_on_lassen, .with_xl]
needs: [L_build_deps_xl]
38 changes: 38 additions & 0 deletions .gitlab/ci/build_quartz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
##############################################################################
# Copyright (c) 2016-2020, Lawrence Livermore National Security, LLC and
# Conduit project contributors. See the COPYRIGHT file for details.
#
# SPDX-License-Identifier: (MIT)
##############################################################################

## In pre-build phase, allocate a node for builds
#allocate_resources_build_quartz:
# extends: .quartz_common
# stage: allocate_resources
# script:
# - salloc -N 1 -c 36 --no-shell --job-name=${CONDUIT_ALLOC_NAME}
#
## In post-build phase, deallocate resources
## Note : make sure this is run even on build phase failure
#release_resources_build_quartz:
# extends: .quartz_common
# stage: release_resources
# script:
# - export JOBID=$(squeue -h --name=${CONDUIT_ALLOC_NAME} --format=%A)
# - ([[ -n "${JOBID}" ]] && scancel ${JOBID})
# when: always

# Here are all quartz build jobs
Q_build_deps_gcc:
extends: [.build_deps_on_quartz, .with_gcc]

Q_install_gcc:
extends: [.install_on_quartz, .with_gcc]
needs: [Q_build_deps_gcc]

Q_build_deps_gcc_static:
extends: [.build_deps_on_quartz, .with_gcc_static]

Q_install_gcc_static:
extends: [.install_on_quartz, .with_gcc_static]
needs: [Q_build_deps_gcc_static]
13 changes: 13 additions & 0 deletions scripts/ci/update-uberenv.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

if [[ ! ${1} ]]
then
echo "ERROR: expecting reference for uberenv repo" >&2
else
uberenv_ref="${1}"
fi

uberenv_file="scripts/uberenv/uberenv.py"
uberenv_master="https://raw.githubusercontent.com/LLNL/uberenv/${uberenv_ref}/uberenv.py"

curl --fail --output ${uberenv_file} ${uberenv_master}
87 changes: 0 additions & 87 deletions scripts/uberenv/packages/uberenv-conduit/package.py

This file was deleted.

Binary file not shown.
12 changes: 7 additions & 5 deletions scripts/uberenv/project.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"package_name" : "conduit",
"uberenv_package_name" : "uberenv-conduit",
"spack_url": "https://github.com/alpine-DAV/spack",
"spack_branch": "task/2019_10_update_conduit",
"spack_activate" : {"py-numpy" : ["+python"],
"py-sphinx": ["+python","+doc"],
"package_version" : "master",
"package_final_phase" : "configure",
"package_source_dir" : "../..",
"spack_url": "https://github.com/spack/spack",
"spack_commit": "6d2e6e1f4",
"spack_activate" : {"py-numpy" : ["+python"],
"py-sphinx": ["+python","+doc"],
"py-sphinx-rtd-theme": ["+python","+doc"] }
}

0 comments on commit 8d82a82

Please sign in to comment.