-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
134 lines (124 loc) · 3.39 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#
# stage0 is a convenience. We have it set to not run for every MR, but the MR
# will show a button that you can click to start an MR.
#
# stage1 is done at hip.txcorp.com and is not debug
#
# Goal is to eventually have stages for testing:
# 1. More complete build (with NetCDF, MPI, and HDF5)
# 2. Testing more compilers (Intel, PGI, Cray)
# 3. Higher resolution (make separate stage to save time)
# 4. At NERSC
# 5. At GA with MDS+
stages:
- stage0
- stage1
- stage2
variables:
GIT_STRATEGY: fetch
GIT_CLEAN_FLAGS: -ffdxq
TIMEOUT: 450 seconds
# The most basic template that most tests will expand upon
#
.test-basic:
interruptible: true
only:
refs:
# Can schedule tests from gitlab interface (CICD -> Schedules)
- schedules
# I'm not sure what this does
- api
# Can schedule tests from gitlab interface (CICD -> Pipelines -> Run pipeline)
- web
# Automatically start things for every MR
- merge_requests
dependencies: []
except:
variables:
# I'm not sure what this does
- $EFIT_CI_SCHEDULED =~ /yes/
pause-for-approval:
extends: .test-basic
stage: .pre
only:
refs:
- merge_requests
variables:
- $CI_MERGE_REQUEST_EVENT_TYPE == "merged_result"
- $CI_MERGE_REQUEST_EVENT_TYPE == "detached"
script:
- echo "pause-for-approval has no script to run"
variables:
GIT_STRATEGY: none
when: manual
allow_failure: false
.test:
extends: .test-basic
after_script:
- date
clang-docker:
extends: .test
stage: stage0
image: registry.gitlab.com/efit-ai/efitall/clang
# Note that currently I'm not actually running make test
script:
- mkdir build && cd build # Build out of place
- ../efit/config_cmake_clang.sh | tee config.log
- make -j4 | tee make.log
artifacts:
name: "$CI_JOB_NAME"
when: always
paths:
- build/*.log
- build/CMakeCache.txt
- build/Testing/Temporary/LastTest.log
expire_in: 4 days
linux-clang:
extends: .test
stage: stage1
tags:
- name:hip.txcorp_efitai
script:
- mkdir build && cd build # Build out of place
- ../share/config_examples/config_ci_hip.sh | tee config.log
- make -j4 | tee make.log
- make test | tee test.log
- make docs | tee docs.log
- mv docs/html ../public
# Include documentation as part of the review
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://$CI_PROJECT_NAMESPACE.gitlab.io/-/$CI_PROJECT_NAME/-/jobs/$CI_JOB_ID/artifacts/public/index.html
variables:
PATH: /scratch/soft/bin:/scratch/soft/mpich/bin:/opt/rh/devtoolset-7/root/usr/bin:/usr/bin:/bin
artifacts:
name: "$CI_JOB_NAME"
when: always
paths:
- build/*.log
- build/CMakeCache.txt
- build/Testing/Temporary/LastTest.log
- public
expire_in: 4 days
#
# Deploy documentation using GitLab pages
#
pages: # this job name has special meaning to GitLab
stage: stage2
tags:
- name:hip.txcorp_efitai
interruptible: true
variables:
PATH: /scratch/soft/bin:/scratch/soft/mpich/bin:/opt/rh/devtoolset-7/root/usr/bin:/usr/bin:/bin
script:
- source /scratch/soft/sphinx_load.sh
- mkdir build-docs && cd build-docs # Build out of place
- ../share/config_examples/config_ci_hip.sh | tee config.log
- make docs
- mv docs/html ../public
artifacts:
paths:
- public
except:
variables:
- $EFIT_CI_SCHEDULED =~ /yes/