forked from BlueBrain/nmodl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
91 lines (82 loc) · 2.68 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
include:
- project: hpc/gitlab-pipelines
file:
- spack-build-components.gitlab-ci.yml
- github-project-pipelines.gitlab-ci.yml
- project: hpc/gitlab-upload-logs
file: enable-upload.yml
variables:
CVF_BRANCH:
description: Branch of the channel validation framework (CVF) to trigger the CI of
value: main
SPACK_BRANCH:
description: Branch of BlueBrain Spack to use for the CI pipeline
value: develop
SPACK_DEPLOYMENT_SUFFIX:
description: Extra path component used when finding deployed software. Set to something like `pulls/1497` use software built for https://github.com/BlueBrain/spack/pull/1497. You probably want to set SPACK_BRANCH to the branch used in the relevant PR if you set this.
value: ''
trigger cvf:
# Stop the globally-defined CVF_BRANCH above from being set in the child pipeline
inherit:
variables: false
needs: [spack_setup] # for SPACK_SETUP_COMMIT_MAPPING_URL
stage: .pre
rules:
# Don't run on PRs targeting the LLVM development branch
- if: '$CI_EXTERNAL_PULL_REQUEST_TARGET_BRANCH_NAME == "llvm"'
when: never
# Otherwise always run this
- when: always
trigger:
branch: ${CVF_BRANCH}
project: hpc/cvf
# Make the NMODL CI status depend on the CVF CI status
strategy: depend
variables:
# Tell CVF to use the same commits/branches as NMODL.
SPACK_ENV_FILE_URL: $SPACK_SETUP_COMMIT_MAPPING_URL
.spack_nmodl:
variables:
SPACK_PACKAGE: nmodl
SPACK_PACKAGE_SPEC: ~legacy-unit+python
spack_setup:
extends: .spack_setup_ccache
script:
- !reference [.spack_setup_ccache, script]
# Setting CVF_BRANCH in the PR description will cause it to be set in the
# environment of this job, but because we put CVF in
# SPACK_SETUP_IGNORE_PACKAGE_VARIABLES then nothing will be done with it.
- echo "CVF_BRANCH=${CVF_BRANCH}" >> spack_clone_variables.env
variables:
NMODL_COMMIT: ${CI_COMMIT_SHA}
# Enable fetching GitHub PR descriptions and parsing them to find out what
# branches to build of other projects.
PARSE_GITHUB_PR_DESCRIPTIONS: "true"
SPACK_SETUP_IGNORE_PACKAGE_VARIABLES: CVF
build:intel:
extends:
- .spack_build
- .spack_nmodl
variables:
SPACK_PACKAGE_COMPILER: intel
build:nvhpc:
extends:
- .spack_build
- .spack_nmodl
variables:
SPACK_PACKAGE_COMPILER: nvhpc
SPACK_PACKAGE_DEPENDENCIES: ^bison%gcc^flex%gcc^py-jinja2%gcc^py-sympy%gcc^py-pyyaml%gcc
.nmodl_tests:
variables:
# https://github.com/BlueBrain/nmodl/issues/737
bb5_ntasks: 1
test:intel:
extends:
- .ctest
- .nmodl_tests
needs: ["build:intel"]
test:nvhpc:
extends:
- .ctest
- .nmodl_tests
needs: ["build:nvhpc"]