Skip to content

Commit 398e7fa

Browse files
baltzellc-dilks
authored andcommitted
add clon profiling job
1 parent 9a8a0b2 commit 398e7fa

1 file changed

Lines changed: 66 additions & 35 deletions

File tree

‎.gitlab-ci.yml‎

Lines changed: 66 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
image: codecr.jlab.org/hallb/clas12/container-forge/base:latest
1+
image: codecr.jlab.org/hallb/clas12/iguana/ci_no_root:latest
22

33
workflow:
44
rules:
55
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
66
auto_cancel:
77
on_new_commit: interruptible
88
- if: $CI_PIPELINE_SOURCE == "schedule"
9-
- if: $CI_COMMIT_BRANCH == "main"
9+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
1010
auto_cancel:
1111
on_new_commit: conservative
1212
- if: $CI_COMMIT_TAG
1313
auto_cancel:
1414
on_new_commit: conservative
1515

16+
variables:
17+
EVIOFILE: clas_018779.evio.00001
18+
1619
default:
1720
interruptible: true
1821
before_script:
@@ -22,6 +25,25 @@ default:
2225
- export PATH=$CLARA_HOME/bin:$PATH
2326
- export PATH=$COATJAVA/bin:$PATH
2427

28+
.clon:
29+
tags:
30+
- clonfarm3-shell
31+
stage: test
32+
needs: [build,download]
33+
dependencies: [build,download]
34+
interruptible: true
35+
before_script:
36+
- export JAVA_HOME=/usr/clas12/offline/jdk/21.0.2
37+
- export PATH=$JAVA_HOME:$PATH
38+
- export PATH=/usr/clas12/offline/maven/3.9.6/bin:$PATH
39+
- export PATH=/usr/clas12/offline/asprof/4.4/bin:$PATH
40+
- export CLARA_HOME=$CI_PROJECT_DIR/clara
41+
- export COATJAVA=$CI_PROJECT_DIR/coatjava
42+
- export PATH=$CLARA_HOME/plugins/clas12/bin:$PATH
43+
- export PATH=$CLARA_HOME/bin:$PATH
44+
- export PATH=$COATJAVA/bin:$PATH
45+
- tar -xzvf clara.tar.gz
46+
2547
stages:
2648
- mirror
2749
- build
@@ -50,7 +72,7 @@ build:
5072
optional: true
5173
script:
5274
- git config --global --add safe.directory $CI_PROJECT_DIR
53-
- ./build-coatjava.sh --lfs --clara -T$JL_RUNNER_AVAIL_CPU --quiet --no-progress
75+
- ./build-coatjava.sh --lfs --clara -T48 --quiet --no-progress
5476
- tar -czf coatjava.tar.gz coatjava
5577
- tar -czf clara.tar.gz clara
5678
artifacts:
@@ -63,42 +85,44 @@ build:
6385
download:
6486
stage: build
6587
script:
66-
# - xrdcp xroot://sci-xrootd.jlab.org///osgpool/hallb/clas12/validation/raw/rg-d/clas_018779.evio.00001 ./
67-
- git lfs install
68-
- git clone https://code.jlab.org/hallb/clas12/validation-data
69-
- cp validation-data/raw/rg-d/clas_018779.evio.00001 .
88+
- GIT_LFS_SKIP_SMUDGE=1 git clone https://code.jlab.org/hallb/clas12/validation-data
89+
- cd validation-data
90+
- git lfs install --skip-smudge
91+
- git config lfs.fetchinclude raw/rg-d/$EVIOFILE
92+
- git lfs pull
93+
- cd -
94+
- ln validation-data/raw/rg-d/$EVIOFILE
7095
artifacts:
7196
when: always
72-
expire_in: 1 day
7397
paths:
74-
- clas_018779.evio.00001
98+
- $EVIOFILE
7599

76-
.spotbugs:
100+
spotbugs:
77101
stage: test
78102
needs: [build]
79103
dependencies: [build]
80104
script:
81105
- tar -xzf coatjava.tar.gz
82-
- ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --spotbugs --quiet --no-progress
106+
- ./build-coatjava.sh -T48 --spotbugs --quiet --no-progress
83107

84-
.unit_tests:
108+
unit-tests:
85109
stage: test
86110
needs: [build]
87111
dependencies: [build]
88112
script:
89113
- tar -xzf coatjava.tar.gz
90-
- ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --lfs --unittests --quiet --no-progress
114+
- ./build-coatjava.sh -T48 --lfs --unittests --quiet --no-progress
91115
- ./validation/jacoco-aggregate.sh
92116
artifacts:
93117
when: always
94118
expire_in: 1 day
95119
paths:
96120
- publish
97121

98-
.docs:
122+
docs:
99123
stage: test
100-
needs: [build,unit_tests]
101-
dependencies: [build,unit_tests]
124+
needs: [build,unit-tests]
125+
dependencies: [build,unit-tests]
102126
script:
103127
- tar -xzf coatjava.tar.gz
104128
- python3 -m venv venv
@@ -111,7 +135,7 @@ download:
111135
- cp -r publish pages/jacoco
112136
artifacts:
113137
when: always
114-
expire_in: 7 days
138+
expire_in: 1 week
115139
paths:
116140
- pages
117141

@@ -121,7 +145,6 @@ eb:
121145
dependencies: [build]
122146
script:
123147
- tar -xzf coatjava.tar.gz
124-
- tar -xzf clara.tar.gz
125148
- git config --global --add safe.directory $CI_PROJECT_DIR
126149
- git lfs install
127150
- git submodule update --init validation/advanced-tests/data
@@ -141,37 +164,45 @@ decoder:
141164
dependencies: [build,download]
142165
script:
143166
- tar -xzf clara.tar.gz
144-
- decoder -l FINE -n 1000 -o clas_018779_00001.hipo clas_018779.evio.00001
145-
artifacts:
146-
when: always
147-
expire_in: 1 day
148-
paths:
149-
- clas_018779_00001.hipo
167+
- decoder -l FINE -n 1000 -o decoded.hipo $EVIOFILE
150168

151169
clara:
152170
stage: test
153171
needs: [build,download]
154172
dependencies: [build,download]
155173
script:
156174
- tar -xzf clara.tar.gz
157-
- run-clara -v -c $CLARA_HOME -t $JL_RUNNER_AVAIL_CPU -y ./etc/services/rgd-clarode.yml -n 100 -o out clas_018779.evio.00001
175+
- run-clara -v -c $CLARA_HOME -t 4 -y ./etc/services/rgd-clarode.yml -n 30 -o out $EVIOFILE
176+
- mv out/rec_$EVIOFILE.hipo claroded.hipo
158177

159178
profile:
160-
stage: test
161-
needs: [build,decoder]
162-
dependencies: [build,decoder]
179+
extends: .clon
180+
allow_failure: true
163181
script:
164-
- tar -xzf coatjava.tar.gz
165-
- libexec/profile -f flamegraph -e cpu clas_018779_00001.hipo
166-
- libexec/profile -f flamegraph -e nativemem clas_018779_00001.hipo
167-
- libexec/profile -f flamegraph -e alloc clas_018779_00001.hipo
182+
- ./clara/plugins/clas12/libexec/profile -e cpu run-clara -c ./clara -y ./etc/services/rgd-clarode.yml -o tmp1 -t 16 -l $EVIOFILE
183+
- ./clara/plugins/clas12/libexec/profile -e alloc run-clara -c ./clara -y ./etc/services/rgd-clarode.yml -o tmp2 -t 16 -l $EVIOFILE
184+
- ./clara/plugins/clas12/libexec/profile -e lock run-clara -c ./clara -y ./etc/services/rgd-clarode.yml -o tmp3 -t 16 -l $EVIOFILE
168185
artifacts:
169186
when: always
170187
expire_in: 1 week
171188
paths:
172-
- pro_flamegraph_cpu_clas_018779_00001
173-
- pro_flamegraph_nativemem_clas_018779_00001
174-
- pro_flamegraph_alloc_clas_018779_00001
189+
- "asprof*.html"
190+
191+
pages:
192+
stage: deploy
193+
needs: [profile,docs]
194+
dependencies: [profile,docs]
195+
script:
196+
- cp -r pages public
197+
- mkdir public/perf
198+
- cp asprof*.html public/perf
199+
pages: true
200+
artifacts:
201+
expire_in: 1 week
202+
paths:
203+
- public
204+
rules:
205+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
175206

176207
.deploy:
177208
stage: deploy

0 commit comments

Comments
 (0)