-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
60 lines (53 loc) · 1.8 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
# This example shows usage of spack environments to build the proxy application
# miniqmc. This is an in place build, using an existing directory in the builders
# $HOME directory. It is a simple example using one build and one test stage.
# spack builds miniqmc in the myminiqmc environment in the build stage, then in the
# test stage the myminiqmc environment is activated and the miniqmc application is
# executed. This shows that by activating the enviroment the path to miniqmc is set.
stages:
- build
- test
.project_activation: &project_activation
# Will ensure that the CI pipeline will 'only' run when initiated via the
# the web GUI (CI / CD -> Pipelines -> Run Pipeline).
only:
- web
before_script:
- export TERM=xterm
- source $HOME/spack/share/spack/setup-env.sh
build_spack_batch:
# Similiar to past example we are leveraging the GitLab Batch runner and as
# such we will need to provide the job submission parameters.
variables:
SCHEDULER_PARAMETERS: "--nodes=1 --partition=ecp-p9-4v100"
tags:
- xx-testing
- dosequis
- slurm
- nmc
<<: *project_activation
stage: build
script:
- spack --version
- spack env create myciminiqmc || echo "Spack env myciminiqmc already created"
- spack env activate myciminiqmc
- spack install miniqmc^[email protected] ^openmpi ^[email protected]
# Use shared .test_spack_stage code and project activation code
test_spack_batch:
variables:
SCHEDULER_PARAMETERS: "--nodes=1 --partition=ecp-p9-4v100"
tags:
- xx-testing
- dosequis
- slurm
- nmc
<<: *project_activation
dependencies:
- build_spack_batch
stage: test
script:
- source $HOME/spack/share/spack/setup-env.sh
- spack env activate myciminiqmc
- which miniqmc
- which mpirun
- mpirun -np 2 miniqmc < ./input_args