Skip to content

Commit c7f7e7d

Browse files
committed
add tested gitlab CI
1 parent f256fb5 commit c7f7e7d

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

.gitlab-ci.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
workflow:
2+
rules:
3+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
4+
auto_cancel:
5+
on_new_commit: interruptible
6+
- if: $CI_COMMIT_BRANCH == "main"
7+
auto_cancel:
8+
on_new_commit: conservative
9+
- if: $CI_COMMIT_TAG
10+
auto_cancel:
11+
on_new_commit: conservative
12+
13+
default:
14+
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
18+
19+
stages:
20+
- build-stage
21+
- test-stage
22+
- deploy-stage
23+
24+
build:
25+
stage: build-stage
26+
script:
27+
- ./build-coatjava.sh -T4 --unittests --spotbugs --quiet --no-progress
28+
- tar -czf coatjava.tar.gz coatjava
29+
artifacts:
30+
when: always
31+
expire_in: 1 day
32+
paths:
33+
- coatjava
34+
35+
depana:
36+
allow_failure: true
37+
stage: test-stage
38+
dependencies: [build]
39+
script:
40+
- mvn dependency:tree -Ddetail=true --no-transfer-progress
41+
- mvn dependency:analyze -DfailOnWarning=true -pl '!org.jlab.coat:coat-libs' --no-transfer-progress
42+
43+
eb:
44+
stage: test-stage
45+
dependencies: [build]
46+
script:
47+
- cd validation/advanced-tests && ./run-eb-tests.sh -100 ${ARG}
48+
parallel:
49+
matrix:
50+
- ARG: electronproton
51+
- ARG: electronprotonC
52+
- ARG: electrongamma
53+
- ARG: electronneutronC
54+
- ARG: electronFTpion
55+
56+
jacoco:
57+
allow_failure: true
58+
stage: test-stage
59+
needs: [build]
60+
dependencies: [build]
61+
script:
62+
- ./validation/jacoco-aggregate.sh
63+
artifacts:
64+
when: always
65+
expire_in: 1 day
66+
paths:
67+
- publish
68+
69+
docs:
70+
stage: test-stage
71+
needs: [build,jacoco]
72+
dependencies: [build,jacoco]
73+
script:
74+
- python3 -m pip install -r docs/mkdocs/requirements.txt
75+
- ./docs/mkdocs/generate.sh pages
76+
- mvn javadoc:aggregate -pl '!org.jlab.coat:coat-libs' --no-transfer-progress
77+
- mv target/reports/apidocs pages/javadoc
78+
- mv publish pages/jacoco
79+
artifacts:
80+
when: always
81+
expire_in: 7 days
82+
paths:
83+
- pages
84+
85+
#deploy:
86+
# stage: deploy-stage
87+
# dependencies: [docs,jacoco,depana]
88+
89+
#release:
90+
# stage: deploy-stage
91+
# dependencies: [deploy]
92+

0 commit comments

Comments
 (0)