forked from NOAA-GFDL/FRE-NCtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
105 lines (96 loc) · 2.05 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
# ******************************************************************************
# gitlab-ci.yml file to build and deploy fre-nctools
# ******************************************************************************
before_script:
- hostname
variables:
buildDir: build.${FRE_SITE}.${CI_COMMIT_REF_SLUG}
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
.buildScript: &buildScript
script:
- if [[ -n ${CI_COMMIT_TAG} ]]; then installLabel=${CI_COMMIT_TAG}; else installLabel=${CI_COMMIT_BRANCH}; fi
- eval `${CI_PROJECT_DIR}/site-configs/${FRE_SITE}/env.sh`
- autoreconf -i
- mkdir ${buildDir}
- cd ${buildDir}
- ../configure --prefix=${FMS_HOME}/local/opt/fre-nctools/${installLabel}/${FRE_SITE}
- make
- make -j check
.deployScript: &deployScript
script:
- cd ${CI_PROJECT_DIR}
- eval `${CI_PROJECT_DIR}/site-configs/${FRE_SITE}/env.sh`
- autoreconf -i
- cd ${CI_PROJECT_DIR}/${buildDir}
- make install
build:gfdl-ws:
stage: build
tags:
- gfdl-ws
variables:
FRE_SITE: gfdl-ws
FMS_HOME: /home/fms
<<: *buildScript
build:gfdl:
stage: build
tags:
- gfdl
variables:
FRE_SITE: gfdl
FMS_HOME: /home/fms
<<: *buildScript
build:ncrc:
stage: build
tags:
- ncrc
variables:
FRE_SITE: ncrc
FMS_HOME: /ncrc/home2/fms
SKIP_MPI_TEST: 1
<<: *buildScript
deploy:gfdl-ws:
stage: deploy
tags:
- gfdl-ws_deploy
environment:
name: stage_gfdl-ws
variables:
FRE_SITE: gfdl-ws
FMS_HOME: /home/fms
only:
- master
- tags
dependencies:
- build:gfdl-ws
<<: *deployScript
deploy:gfdl:
stage: deploy
tags:
- gfdl_deploy
environment:
name: stage_gfdl
variables:
FRE_SITE: gfdl
FMS_HOME: /home/fms
only:
- master
- tags
dependencies:
- build:gfdl
<<: *deployScript
deploy:ncrc:
stage: deploy
tags:
- ncrc_deploy
environment:
name: stage_ncrc
variables:
FRE_SITE: ncrc
FMS_HOME: /ncrc/home2/fms
only:
- master
- tags
dependencies:
- build:ncrc
<<: *deployScript