forked from HEP-FCC/FCCDetectors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
executable file
·85 lines (82 loc) · 2.34 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
#
# This deployment publishes latest versions of selected detectors to the FCCSW
# website, mainly to be consumed by Phoenix@FCC web application.
# Inspired by https://github.com/key4hep/EDM4hep/blob/master/.gitlab-ci.yml
#
generate-root:
tags:
- cvmfs
stage: .pre
script:
- yum install -y glibc-devel
- yum install -y libnsl
- source /cvmfs/sw.hsf.org/key4hep/setup.sh
- mkdir -p build install
- cd build
- >
cmake -DCMAKE_INSTALL_PREFIX=../install
-DCMAKE_CXX_STANDARD=17
-DCMAKE_CXX_FLAGS=" -fdiagnostics-color=always "
-G Ninja ..
- ninja -k0
- ninja -k0 install
- ninja -k0 && ctest --output-on-failure
- cd ..
- mkdir -p detectors
- mv build/fccee_cld.root detectors/
- mv build/fccee_idea.root detectors/
- mv build/fccee_nlq.root detectors/
- mv build/fcchh_baseline.root detectors/
artifacts:
paths:
- detectors/*root
expire_in: 1 week
convert-gltf:
dependencies:
- generate-root
stage: build
image: registry.cern.ch/docker.io/library/fedora:latest
script:
- cd ..
- dnf -y groupinstall "Development Tools"
- dnf -y module install nodejs:16
- git clone https://github.com/kjvbrt/root2gltf.git
- cd root2gltf
- npm ci
- >
node . -c configs/config_fccee_cld.json
-o ../FCCDetectors/detectors/fccee_cld.gltf
../FCCDetectors/detectors/fccee_cld.root
- >
node . -c configs/config_fccee_idea.json
-o ../FCCDetectors/detectors/fccee_idea.gltf
../FCCDetectors/detectors/fccee_idea.root
- >
node . -c configs/config_fccee_nlq.json
-o ../FCCDetectors/detectors/fccee_nlq.gltf
../FCCDetectors/detectors/fccee_nlq.root
- >
node . -c configs/config_fcchh_baseline.json
-o ../FCCDetectors/detectors/fcchh_baseline.gltf
../FCCDetectors/detectors/fcchh_baseline.root
artifacts:
paths:
- detectors/*.gltf
expire_in: 1 week
# Variables of the deployment
# CI_OUTPUT_DIR: detectors/
# EOS_ACCOUNT_USERNAME: key4hep
# EOS_ACCOUNT_PASSWORD: xxxx
# EOS_PATH: /eos/project-f/fccsw-web/www/detectors/
# METHOD: rsync
deploy-eos:
only:
refs:
- main
dependencies:
- generate-root
- convert-gltf
stage: deploy
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer:latest
script:
- deploy-eos