Skip to content

Commit d317a5f

Browse files
baltzellc-dilks
authored andcommitted
feat: gitlab updates (#864)
* gitlab ci prep * add missing libexec placeholder * Update .gitlab-ci.yml Co-authored-by: Christopher Dilks <[email protected]> * Update .gitlab-ci.yml Co-authored-by: Christopher Dilks <[email protected]> * Update .gitlab-ci.yml Co-authored-by: Christopher Dilks <[email protected]> --------- Co-authored-by: Christopher Dilks <[email protected]>
1 parent 1e2ed36 commit d317a5f

File tree

2 files changed

+85
-39
lines changed

2 files changed

+85
-39
lines changed

.gitlab-ci.yml

Lines changed: 69 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
image: codecr.jlab.org/hallb/clas12/container-forge/base:latest
2+
13
workflow:
24
rules:
35
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
@@ -12,80 +14,108 @@ workflow:
1214

1315
default:
1416
interruptible: true
15-
before_script:
16-
# FIXME: build minimal el9 container, or use container-forge
17-
- dnf install -y java-21-openjdk maven wget tree ruby python3-pip
1817

1918
stages:
20-
- build-stage
21-
- test-stage
22-
- deploy-stage
19+
- build
20+
- test
21+
- deploy
2322

2423
build:
25-
stage: build-stage
24+
stage: build
2625
script:
27-
- ./build-coatjava.sh -T4 --unittests --spotbugs --quiet --no-progress
26+
- ./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --quiet --no-progress
27+
- tar -czf coatjava.tar.gz coatjava
2828
artifacts:
2929
when: always
3030
expire_in: 1 day
3131
paths:
32-
- coatjava
32+
- coatjava.tar.gz
3333

3434
depana:
3535
allow_failure: true
36-
stage: test-stage
37-
dependencies: [build]
36+
stage: build
3837
script:
3938
- libexec/dependency-tree.sh
4039
- libexec/dependency-analysis.sh
4140

42-
eb:
43-
stage: test-stage
41+
spotbugs:
42+
stage: test
43+
needs: [build]
4444
dependencies: [build]
4545
script:
46-
- cd validation/advanced-tests && ./run-eb-tests.sh -100 ${ARG}
47-
parallel:
48-
matrix:
49-
- ARG: electronproton
50-
- ARG: electronprotonC
51-
- ARG: electrongamma
52-
- ARG: electronneutronC
53-
- ARG: electronFTpion
46+
- >
47+
tar -xzf coatjava.tar.gz &&
48+
./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --spotbugs --quiet --no-progress
5449
55-
jacoco:
56-
allow_failure: true
57-
stage: test-stage
50+
unit_tests:
51+
stage: test
5852
needs: [build]
5953
dependencies: [build]
6054
script:
61-
- ./validation/jacoco-aggregate.sh
55+
- >
56+
tar -xzf coatjava.tar.gz &&
57+
./build-coatjava.sh -T$JL_RUNNER_AVAIL_CPU --unittests --quiet --no-progress &&
58+
./validation/jacoco-aggregate.sh
6259
artifacts:
6360
when: always
6461
expire_in: 1 day
6562
paths:
6663
- publish
6764

6865
docs:
69-
stage: test-stage
70-
needs: [build,jacoco]
71-
dependencies: [build,jacoco]
66+
stage: test
67+
needs: [build,unit_tests]
68+
dependencies: [build,unit_tests]
7269
script:
73-
- python3 -m pip install -r docs/mkdocs/requirements.txt
74-
- ./docs/mkdocs/generate.sh pages
75-
- libexec/build-javadocs.sh
76-
- mv target/reports/apidocs pages/javadoc
77-
- mv publish pages/jacoco
70+
- >
71+
tar -xzf coatjava.tar.gz &&
72+
python3 -m venv venv &&
73+
source venv/bin/activate &&
74+
python3 -m pip install -r docs/mkdocs/requirements.txt &&
75+
./docs/mkdocs/generate.sh pages &&
76+
libexec/build-javadocs.sh &&
77+
ls -l && ls -l pages && ls -l publish &&
78+
mv target/reports/apidocs pages/javadoc &&
79+
cp -r publish pages/jacoco
7880
artifacts:
7981
when: always
8082
expire_in: 7 days
8183
paths:
8284
- pages
8385

84-
#deploy:
85-
# stage: deploy-stage
86-
# dependencies: [docs,jacoco,depana]
86+
eb:
87+
stage: test
88+
needs: [build]
89+
dependencies: [build]
90+
script:
91+
- >
92+
tar -xzf coatjava.tar.gz &&
93+
cd validation/advanced-tests &&
94+
./run-eb-tests.sh -100 ${ARG}
95+
parallel:
96+
matrix:
97+
- ARG: electronproton
98+
- ARG: electronprotonC
99+
- ARG: electrongamma
100+
- ARG: electronneutronC
101+
- ARG: electronFTpion
102+
103+
profile:
104+
stage: test
105+
needs: [build]
106+
dependencies: [build]
107+
script:
108+
- >
109+
tar -xzf coatjava.tar.gz &&
110+
libexec/profile.sh
87111
88-
#release:
89-
# stage: deploy-stage
90-
# dependencies: [deploy]
112+
deploy:
113+
stage: deploy
114+
script:
115+
- echo DEPLOY!!!
116+
117+
release:
118+
stage: deploy
119+
script:
120+
- echo RELEASE!!!
91121

libexec/profile.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
echo PROFILE!!!
4+
5+
#asprof -e cpu -d 120 \
6+
# -o tree -f results/$1_tree_cpu.html \
7+
# $(pidof java)
8+
9+
#asprof -e nativemem -d 120 \
10+
# -o tree -f results/$1_tree_nativemem.html \
11+
# $(pidof java)
12+
13+
#asprof -e nativemem -d 120 \
14+
# -f results/$1_mem.jfr \
15+
# $(pidof java)
16+

0 commit comments

Comments
 (0)