Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit fa24f3e

Browse files
authored
GitLab CI improvements (#770)
* CoreNEURON URL is now in GitLab by default. * Explicitly default to master for NEURON and NMODL. * Branch handling simplified by changes in gitlab-pipelines.
1 parent 572965b commit fa24f3e

File tree

1 file changed

+15
-39
lines changed

1 file changed

+15
-39
lines changed

.gitlab-ci.yml

Lines changed: 15 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,56 +6,34 @@ include:
66
- project: hpc/gitlab-upload-logs
77
file: enable-upload.yml
88

9+
variables:
10+
NEURON_BRANCH:
11+
description: Branch of NEURON to build against CoreNEURON (NEURON_COMMIT and NEURON_TAG also possible)
12+
value: master
13+
NMODL_BRANCH:
14+
description: Branch of NMODL to build CoreNEURON against (NMODL_COMMIT and NMODL_TAG also possible)
15+
value: master
16+
917
# Set up Spack
1018
spack_setup:
1119
extends: .spack_setup_ccache
1220
variables:
1321
# Enable fetching GitHub PR descriptions and parsing them to find out what
1422
# branches to build of other projects.
1523
PARSE_GITHUB_PR_DESCRIPTIONS: "true"
16-
script:
17-
- !reference [.spack_setup_ccache, script]
18-
# This allows us to use the CoreNEURON repository in regression tests of
19-
# the gitlab-pipelines repositories. The regression test pipeline triggers
20-
# *this* pipeline as a child, having pushed a modified branch to the GitLab
21-
# mirror of the CoreNEURON repository. We have to update the Spack recipe
22-
# to point at the GitLab mirror so the relevant commit (on the modified
23-
# branch) can be found.
24-
- if [[ "${CI_PIPELINE_SOURCE}" == "pipeline" ]]; then
25-
- cd $(spack location -p coreneuron)
26-
- sed -i -e 's#\(git\s*=\s\)"https://github.com/BlueBrain/CoreNeuron"#\1"[email protected]:hpc/coreneuron.git"#' package.py
27-
- git diff
28-
- fi
29-
# Translate the GitHub PR specifications, which are things like
30-
# SPACK_PACKAGE_REF_neuron=branch="master"
31-
# into the form that the SimulationStack CI understands, which are plain
32-
# ${foo}_BRANCH variables that only accept branch names. Current names are
33-
# CORENEURON,MODELS_COMMON,NEURON,PYNEURODAMUS,REPORTINGLIB,SPACK,SYNAPSETOOL
34-
# where CORENEURON_BRANCH is just ${CI_COMMIT_BRANCH}, but the others might
35-
# be set in the GitHub PR description. Save the values of things like
36-
# NEURON_BRANCH to spack_clone_variables.env, which is already defined by
37-
# the gitlab-pipelines helper and can just be appended to.
38-
# TODO: consider allowing these to be overriden when launching the
39-
# CoreNEURON pipeline
40-
- echo "SPACK_BRANCH=${SPACK_BRANCH}" >> spack_clone_variables.env
41-
- for package in MODELS_COMMON NEURON PYNEURODAMUS REPORTINGLIB SYNAPSETOOL; do
42-
- PACKAGE_BRANCH=$(sed -n -e "s/^SPACK_PACKAGE_REF_${package,,}=branch=\(['\"]\)\([^\1]\+\)\1/\2/p" spack_clone_variables.env)
43-
- echo "${package}_BRANCH=${PACKAGE_BRANCH}" >> spack_clone_variables.env
44-
- done
45-
- cat spack_clone_variables.env
4624

4725
simulation_stack:
4826
stage: .pre
4927
# Take advantage of GitHub PR description parsing in the spack_setup job.
5028
needs: [spack_setup]
5129
variables:
52-
CORENEURON_BRANCH: "${CI_COMMIT_BRANCH}"
53-
MODELS_COMMON_BRANCH: "${MODELS_COMMON_BRANCH}"
54-
NEURON_BRANCH: "${NEURON_BRANCH}"
55-
PYNEURODAMUS_BRANCH: "${PYNEURODAMUS_BRANCH}"
56-
REPORTINGLIB_BRANCH: "${REPORTINGLIB_BRANCH}"
57-
SPACK_BRANCH: "${SPACK_BRANCH}"
58-
SYNAPSETOOL_BRANCH: "${SYNAPSETOOL_BRANCH}"
30+
CORENEURON_BRANCH: $CI_COMMIT_BRANCH
31+
MODELS_COMMON_BRANCH: $MODELS_COMMON_BRANCH
32+
NEURON_BRANCH: $NEURON_BRANCH
33+
PYNEURODAMUS_BRANCH: $PYNEURODAMUS_BRANCH
34+
REPORTINGLIB_BRANCH: $REPORTINGLIB_BRANCH
35+
SPACK_BRANCH: $SPACK_BRANCH
36+
SYNAPSETOOL_BRANCH: $SYNAPSETOOL_BRANCH
5937
trigger:
6038
project: hpc/sim/blueconfigs
6139
# CoreNEURON CI status depends on the BlueConfigs CI status.
@@ -81,7 +59,6 @@ simulation_stack:
8159
variables:
8260
bb5_duration: "2:00:00"
8361
SPACK_PACKAGE: neuron
84-
SPACK_PACKAGE_REF: ''
8562
SPACK_PACKAGE_SPEC: +coreneuron+debug+tests~legacy-unit~rx3d model_tests=channel-benchmark,olfactory,tqperf-heavy
8663
.gpu_node:
8764
variables:
@@ -97,7 +74,6 @@ build:nmodl:
9774
extends: [.build]
9875
variables:
9976
SPACK_PACKAGE: nmodl
100-
SPACK_PACKAGE_REF: ''
10177
SPACK_PACKAGE_SPEC: ~legacy-unit
10278
SPACK_PACKAGE_COMPILER: gcc
10379

0 commit comments

Comments
 (0)