-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
101 lines (91 loc) · 2.69 KB
/
.gitlab-ci.yml
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
image: eicweb.phy.anl.gov:4567/containers/image_recipes/ubuntu_dind:latest
variables:
VERSION: "${CI_COMMIT_REF_NAME}"
stages:
- build
- analysis
- config
- docker ## build new version of juggler
- deploy ## repo-local singularity image for development work
workflow:
## Only rebuild on MRs and on commits to the main, as in other cases
## we should use the tagged jug_xl releases from eic_container.
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$CI_COMMIT_BRANCH == "main"'
default:
## plan:
## Workflows:
## - main --> config + docker (eic_container) + singularity (this repo)
## --> trigger eic_container master
## - MR --> config + docker (eic_container) + singularity (this repo)
## - upstream trigger from eic_container (nightly) --> run main
##
## Container images tags
## - main --> nightly on eicweb & DH, and export to eic_container
## - MR --> unstable-mr-XXX (on eicweb only, untag at end of pipeline)
juggler:local:
image: eicweb.phy.anl.gov:4567/containers/eic_container/jug_xl:nightly
stage: build
parallel:
matrix:
- CMAKE_CXX_STANDARD:
- 20
script:
- |
cmake -Bbuild -S. -DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build build -j20
artifacts:
expire_in: 1 hour
paths:
- build/
analysis:clang-tidy:
image: eicweb.phy.anl.gov:4567/containers/eic_container/jug_xl:nightly
stage: analysis
needs:
- juggler:local
script:
- |
run-clang-tidy -p build -j20 -export-fixes clang_tidy_fixes.yml -extra-arg='-std=c++20'
artifacts:
expire_in: 1 week
paths:
- clang_tidy_fixes.yml
allow_failure: true
version:
stage: config
rules:
- if: '$CI_SERVER_HOST == "eicweb.phy.anl.gov"'
script:
- |
if [ "x${CI_PIPELINE_SOURCE}" == "xmerge_request_event" ]; then
VERSION="unstable-mr-${CI_MERGE_REQUEST_PROJECT_ID}-${CI_MERGE_REQUEST_IID}"
fi
echo "VERSION=$VERSION" >> build.env
cat build.env
artifacts:
reports:
dotenv: build.env
eic_container:
stage: deploy
needs:
- version
variables:
VERSION: "${VERSION}"
JUGGLER_VERSION: "${CI_COMMIT_REF_NAME}"
trigger:
project: containers/eic_container
strategy: depend
allow_failure: false
pages:
image: eicweb.phy.anl.gov:4567/containers/eic_container/alpine
stage: deploy
rules:
- if: '$CI_SERVER_HOST == "gitlab.phy.anl.gov" && $CI_COMMIT_BRANCH == "main"'
script:
- apk update && apk add doxygen graphviz ttf-ubuntu-font-family
- cd doc && doxygen Doxyfile && cd ..
- mkdir -p public && cp -r doc/docs/html/* public/.
artifacts:
paths:
- public