-
Notifications
You must be signed in to change notification settings - Fork 60
/
.gitlab-ci.yml
74 lines (69 loc) · 3.07 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
# -- Gitlab CI configuration for podio -----------------------------
#
# This file configures the deployment of the code reference generated by sphinx
# / doxygen to a web site. The site produced in the generate-docs is static and
# relocatable, the html files can simply be hosted by any server. Here, the CERN
# gitlab and eos infrastructure is used to publish to
# https://key4hep.web.cern.ch/podio/
# -- Run the document generation ------------------------------
#
# We are going through the cmake infrastructure here. It is equivalent to
# running sphinx-build manually as it is done in the github actions workflow
# run it.
# This step requires a runner that can build podio and run doxygen. The
# easiest way to ensure this is require cvmfs access on the runner and take the
# software from there.
generate-docs:
# need a runner with cvmfs installed. On the CERN gitlab instance,
# these are usually tagged with "cvmfs"
tags:
- k8s-cvmfs
image: registry.cern.ch/ghcr.io/key4hep/key4hep-images/alma9:latest
script:
# use the nightlies and install some dependencies on top of them
- source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh
- python3 -m venv /root/doc-gen-venv
- source /root/doc-gen-venv/bin/activate
- python3 -m pip install -r doc/requirements.txt
# For some weird reason we have to make sure that we actually really pick
# the packages we just installed into the venv here
- export PYTHONPATH=$VIRTUAL_ENV/lib/python3.$(python3 -c 'import sys; print(f"{sys.version_info[1]}")')/site-packages:$PYTHONPATH
- cmake -B build . --install-prefix=$(pwd)/install -GNinja -DENABLE_SIO=ON -DENABLE_RNTUPLE=ON -DBUILD_TESTING=OFF -DCMAKE_CXX_STANDARD=20 -DCREATE_DOC=ON
- cmake --build build --target documentation
# make the generated html available to the next step by declaring them as an artifact
# as an artifact
artifacts:
paths:
- build/doc/_build/html
expire_in: 1 week
# -- Deploy to EOS ----------------------------
# Use the standard workflow to publish to eos
# see https://gitlab.cern.ch/ci-tools/ci-web-deployer
# The variables for this particular deployment:
# CI_OUTPUT_DIR: doc_output
# EOS_ACCOUNT_PASSWORD: xxx
# EOS_ACCOUNT_USERNAME: xxx
# EOS_PATH: /eos/project/k/key4hep/www/key4hep/podio
# METHOD: rsync
# are set in the repository https://gitlab.cern.ch/key4hep/podio,
# which mirrors https://github.com/AIDASoft/podio
# In particular, the service account key4hep is used to write
# to the eos space /eos/project/k/key4hep/www/key4hep/podio
# Other accounts which are part of the e-groups
# cernbox-project-key4hep-{readers|writers} may be used.
# The eos path and website are configured using https://webeos.cern.ch/
deployment:
# make sure that changes are deployed only when they are merged to master
only:
refs:
- master
# need the doxygen artifacts for this step
dependencies:
- generate-docs
stage: deploy
# see see https://gitlab.cern.ch/ci-tools/ci-web-deployer
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer:latest
script:
- deploy-eos
before_script: []
after_script: []