-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
185 lines (169 loc) · 4.73 KB
/
.gitlab-ci.yml
File metadata and controls
185 lines (169 loc) · 4.73 KB
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
image: codecr.jlab.org/hallb/clas12/container-forge/base:latest
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
auto_cancel:
on_new_commit: interruptible
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_BRANCH == "main"
auto_cancel:
on_new_commit: conservative
- if: $CI_COMMIT_TAG
auto_cancel:
on_new_commit: conservative
default:
interruptible: true
before_script:
- export CLARA_HOME=$CI_PROJECT_DIR/clara
- export COATJAVA=$CI_PROJECT_DIR/coatjava
- export PATH=$CLARA_HOME/plugins/clas12/bin:$PATH
- export PATH=$CLARA_HOME/bin:$PATH
- export PATH=$COATJAVA/bin:$PATH
stages:
- mirror
- build
- test
- deploy
mirror:
stage: mirror
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
script:
- git config --global --add safe.directory $CI_PROJECT_DIR
- git config --global user.email "ci-bot@code.jlab.org"
- git config --global user.name "GitLab CI"
- git checkout development
- git config pull.rebase true
- git remote set-url origin https://github.com/jeffersonlab/coatjava
- git pull origin development
- git remote set-url origin https://gitlab-ci-token:${CI_JOB_TOKEN}@code.jlab.org/hallb/clas12/coatjava/coatjava.git
- git push
build:
stage: build
needs:
- job: mirror
optional: true
script:
- git config --global --add safe.directory $CI_PROJECT_DIR
- ./build-coatjava.sh --lfs --clara -T$JL_RUNNER_AVAIL_CPU --quiet --no-progress
- tar -czf coatjava.tar.gz coatjava
- tar -czf clara.tar.gz clara
artifacts:
when: always
expire_in: 1 day
paths:
- coatjava.tar.gz
- clara.tar.gz
download:
stage: build
script:
# - xrdcp xroot://sci-xrootd.jlab.org///osgpool/hallb/clas12/validation/raw/rg-d/clas_018779.evio.00001 ./
- git lfs install
- git clone https://code.jlab.org/hallb/clas12/validation-data
- cp validation-data/raw/rg-d/clas_018779.evio.00001 .
artifacts:
when: always
expire_in: 1 day
paths:
- clas_018779.evio.00001
.spotbugs:
stage: test
needs: [build]
dependencies: [build]
script:
- tar -xzf coatjava.tar.gz
- ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --spotbugs --quiet --no-progress
.unit_tests:
stage: test
needs: [build]
dependencies: [build]
script:
- tar -xzf coatjava.tar.gz
- ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --lfs --unittests --quiet --no-progress
- ./validation/jacoco-aggregate.sh
artifacts:
when: always
expire_in: 1 day
paths:
- publish
.docs:
stage: test
needs: [build,unit_tests]
dependencies: [build,unit_tests]
script:
- tar -xzf coatjava.tar.gz
- python3 -m venv venv
- source venv/bin/activate
- python3 -m pip install -r docs/mkdocs/requirements.txt
- ./docs/mkdocs/generate.sh pages
- libexec/build-javadocs.sh
- ls -l && ls -l pages && ls -l publish
- mv target/reports/apidocs pages/javadoc
- cp -r publish pages/jacoco
artifacts:
when: always
expire_in: 7 days
paths:
- pages
eb:
stage: test
needs: [build]
dependencies: [build]
script:
- tar -xzf coatjava.tar.gz
- tar -xzf clara.tar.gz
- git config --global --add safe.directory $CI_PROJECT_DIR
- git lfs install
- git submodule update --init validation/advanced-tests/data
- cd validation/advanced-tests
- ./run-eb-tests.sh -100 ${ARG}
parallel:
matrix:
- ARG: electronproton
- ARG: electronprotonC
- ARG: electrongamma
- ARG: electronneutronC
- ARG: electronFTpion
decoder:
stage: test
needs: [build,download]
dependencies: [build,download]
script:
- tar -xzf clara.tar.gz
- decoder -l FINE -n 1000 -o clas_018779_00001.hipo clas_018779.evio.00001
artifacts:
when: always
expire_in: 1 day
paths:
- clas_018779_00001.hipo
clara:
stage: test
needs: [build,download]
dependencies: [build,download]
script:
- tar -xzf clara.tar.gz
- 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
profile:
stage: test
needs: [build,decoder]
dependencies: [build,decoder]
script:
- tar -xzf coatjava.tar.gz
- libexec/profile -f flamegraph -e cpu clas_018779_00001.hipo
- libexec/profile -f flamegraph -e nativemem clas_018779_00001.hipo
- libexec/profile -f flamegraph -e alloc clas_018779_00001.hipo
artifacts:
when: always
expire_in: 1 week
paths:
- pro_flamegraph_cpu_clas_018779_00001
- pro_flamegraph_nativemem_clas_018779_00001
- pro_flamegraph_alloc_clas_018779_00001
.deploy:
stage: deploy
script:
- echo DEPLOY!
.release:
stage: deploy
script:
- echo RELEASE!