11stages :
2+ - setup
23 - builds
34 - run
45 - tests
56 - cleanup
67
78variables :
8- CACHE_DIR : " /gpfs/f5/scratch/oar.gfdl.ogrp-account/gfdl_o/runner/cache/"
9+ JOB_DIR : " /gpfs/f5/gfdl_o/scratch/oar.gfdl.mom6-account/runner/builds/$CI_PIPELINE_ID"
10+ CACHE_DIR : " /gpfs/f5/scratch/oar.gfdl.mom6-account/gfdl_o/runner/cache/"
911
1012
1113# Merges SIS2 with dev/gfdl. Changes directory to test directory, if it exists.
@@ -14,70 +16,92 @@ variables:
1416# - set working directory to MOM6-examples
1517# - pull down latest of dev/gfdl (MOM6-examples might be ahead of Gaea-stats)
1618before_script :
17- - echo Cache directory set to $CACHE_DIR
18- - echo -e "\e[0Ksection_start:`date +%s`:before[collapsed=true]\r\e[0KPre-script"
19- - git clone https://gitlab.gfdl.noaa.gov/ogrp/Gaea-stats-MOM6-examples.git tests
20- - cd tests && git submodule init && git submodule update
21- - cd MOM6-examples && git checkout dev/gfdl && git pull
22- - mkdir -p $HOME/ci/sis2/$CI_PIPELINE_ID/build
23- - test ! -L build && ln -s $HOME/ci/sis2/$CI_PIPELINE_ID/build build
24- - test ! -L $HOME/ci/sis2/$CI_PIPELINE_ID/src && ln -s "$(pwd)"/src $HOME/ci/sis2/$CI_PIPELINE_ID/src
25- - git submodule update --init --recursive
26- - git submodule set-url src/SIS2 $CI_PROJECT_DIR/.git
27- - (cd src/SIS2 && git fetch origin $CI_COMMIT_SHA && git checkout $CI_COMMIT_SHA)
28- - echo -e "\e[0Ksection_end:`date +%s`:before\r\e[0K"
19+ - echo Job directory set to $JOB_DIR
20+
21+ clone :
22+ stage : setup
23+ tags :
24+ - mom6-ci-c5
25+ script :
26+ # Set up the job-wide source directory
27+ - mkdir -p $JOB_DIR
28+ - cd $JOB_DIR
29+ - git clone https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/Gaea-stats-MOM6-examples.git tests
30+ - cd tests && git submodule init && git submodule update
31+ - cd MOM6-examples && git checkout dev/gfdl && git pull
32+ - git submodule update --init --recursive
33+ # Pre-checkout AM3 and LM2 (to prevent conflict across builds)
34+ - make -f tools/MRS/Makefile.clone clone_gfdl
35+ # Point MOM6-Examples SIS2 to the repo SIS2
36+ - git submodule set-url src/SIS2 $CI_PROJECT_DIR/.git
37+ - (cd src/SIS2 && git fetch origin $CI_COMMIT_SHA && git checkout $CI_COMMIT_SHA)
38+ # Redirect build/ to $HOME
39+ - mkdir -p $HOME/ci/sis2/$CI_PIPELINE_ID/build
40+ - test ! -L build && ln -s $HOME/ci/sis2/$CI_PIPELINE_ID/build build
41+ # Now create a src/ link in $HOME to redirect local -I paths back to src/
42+ - test ! -L $HOME/ci/sis2/$CI_PIPELINE_ID/src && ln -s "$(pwd)"/src $HOME/ci/sis2/$CI_PIPELINE_ID/src
2943
3044# Tests that merge with dev/gfdl works.
3145merge :
32- stage : builds
46+ stage : setup
3347 tags :
3448 - mom6-ci-c5
3549 script :
3650 - cd $CI_PROJECT_DIR
3751 - git pull --no-edit https://github.com/NOAA-GFDL/SIS2.git dev/gfdl
3852
3953# Compiles
54+ gnu:debug :
55+ stage : builds
56+ tags :
57+ - mom6-ci-c5
58+ needs : ["clone"]
59+ script :
60+ - cd $JOB_DIR/tests/MOM6-examples
61+ - time make -f tools/MRS/Makefile pipeline-build-debug-gnu -s -j
62+
4063gnu:repro :
4164 stage : builds
4265 tags :
4366 - mom6-ci-c5
67+ needs : ["clone"]
4468 script :
69+ - cd $JOB_DIR/tests/MOM6-examples
4570 - time make -f tools/MRS/Makefile pipeline-build-repro-gnu -s -j
4671
47- # gnu:ice-ocean-nolibs:
48- # stage: builds
49- # tags:
50- # - mom6-ci-c5
51- # script:
52- # - make -f tools/MRS/Makefile pipeline-build-gnu-iceocean-nolibs
53-
5472intel:repro :
5573 stage : builds
5674 tags :
5775 - mom6-ci-c5
76+ needs : ["clone"]
5877 script :
78+ - cd $JOB_DIR/tests/MOM6-examples
5979 - time make -f tools/MRS/Makefile pipeline-build-repro-intel -s -j
6080
6181pgi:repro :
6282 stage : builds
6383 tags :
6484 - mom6-ci-c5
85+ needs : ["clone"]
6586 script :
87+ - cd $JOB_DIR/tests/MOM6-examples
6688 - time make -f tools/MRS/Makefile pipeline-build-repro-pgi -s -j
6789
68- gnu:debug :
69- stage : builds
70- tags :
71- - mom6-ci-c5
72- script :
73- - time make -f tools/MRS/Makefile pipeline-build-debug- gnu -s -j
90+ # gnu:ice-ocean-nolibs :
91+ # stage: builds
92+ # tags:
93+ # - mom6-ci-c5
94+ # script:
95+ # - make -f tools/MRS/Makefile pipeline-build-gnu-iceocean-nolibs
7496
7597# Runs
7698run :
7799 stage : run
78100 tags :
79101 - mom6-ci-c5
102+ needs : ["gnu:debug", "gnu:repro", "intel:repro", "pgi:repro"]
80103 script :
104+ - cd $JOB_DIR/tests/MOM6-examples
81105 - make -f tools/MRS/Makefile sis2-pipeline-run
82106
83107# Tests
@@ -86,20 +110,23 @@ gnu:non-symmetric:
86110 tags :
87111 - mom6-ci-c5
88112 script :
113+ - cd $JOB_DIR/tests/MOM6-examples
89114 - make -f tools/MRS/Makefile sis2-pipeline-test-gnu_non_symmetric
90115
91116gnu:symmetric :
92117 stage : tests
93118 tags :
94119 - mom6-ci-c5
95120 script :
121+ - cd $JOB_DIR/tests/MOM6-examples
96122 - make -f tools/MRS/Makefile sis2-pipeline-test-gnu_symmetric
97123
98124gnu:memory :
99125 stage : tests
100126 tags :
101127 - mom6-ci-c5
102128 script :
129+ - cd $JOB_DIR/tests/MOM6-examples
103130 - make -f tools/MRS/Makefile sis2-pipeline-test-gnu_memory
104131
105132# gnu:static:
@@ -114,13 +141,15 @@ gnu:restart:
114141 tags :
115142 - mom6-ci-c5
116143 script :
144+ - cd $JOB_DIR/tests/MOM6-examples
117145 - make -f tools/MRS/Makefile sis2-pipeline-test-gnu_restarts
118146
119147gnu:params :
120148 stage : tests
121149 tags :
122150 - mom6-ci-c5
123151 script :
152+ - cd $JOB_DIR/tests/MOM6-examples
124153 - make -f tools/MRS/Makefile sis2-pipeline-test-params_gnu_symmetric
125154 allow_failure : true
126155
@@ -129,41 +158,47 @@ intel:symmetric:
129158 tags :
130159 - mom6-ci-c5
131160 script :
161+ - cd $JOB_DIR/tests/MOM6-examples
132162 - make -f tools/MRS/Makefile sis2-pipeline-test-intel_symmetric
133163
134164intel:non-symmetric :
135165 stage : tests
136166 tags :
137167 - mom6-ci-c5
138168 script :
169+ - cd $JOB_DIR/tests/MOM6-examples
139170 - make -f tools/MRS/Makefile sis2-pipeline-test-intel_non_symmetric
140171
141172intel:memory :
142173 stage : tests
143174 tags :
144175 - mom6-ci-c5
145176 script :
177+ - cd $JOB_DIR/tests/MOM6-examples
146178 - make -f tools/MRS/Makefile sis2-pipeline-test-intel_memory
147179
148180pgi:symmetric :
149181 stage : tests
150182 tags :
151183 - mom6-ci-c5
152184 script :
185+ - cd $JOB_DIR/tests/MOM6-examples
153186 - make -f tools/MRS/Makefile sis2-pipeline-test-pgi_symmetric
154187
155188pgi:non-symmetric :
156189 stage : tests
157190 tags :
158191 - mom6-ci-c5
159192 script :
193+ - cd $JOB_DIR/tests/MOM6-examples
160194 - make -f tools/MRS/Makefile sis2-pipeline-test-pgi_non_symmetric
161195
162196pgi:memory :
163197 stage : tests
164198 tags :
165199 - mom6-ci-c5
166200 script :
201+ - cd $JOB_DIR/tests/MOM6-examples
167202 - make -f tools/MRS/Makefile sis2-pipeline-test-pgi_memory
168203
169204cleanup :
0 commit comments