forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
100 lines (94 loc) · 2.95 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
clang_tidy:
stage: build
image: ghcr.io/acts-project/ubuntu2004:v29
artifacts:
paths:
- src/clang-tidy/
when: always
expire_in: 2 weeks
script:
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- >
apt-get update
&& apt-get install -y clang-10 clang-tidy-10 g++-8 libstdc++-8-dev
&& ln -s /usr/bin/clang++-10 /usr/bin/clang++
&& ln -s /usr/bin/clang-10 /usr/bin/clang
&& ln -s /usr/bin/clang-tidy-10 /usr/bin/clang-tidy
&& mkdir -p /opt/lib/gcc/x86_64-linux-gnu
&& ln -s /usr/lib/gcc/x86_64-linux-gnu/8/ /opt/lib/gcc/x86_64-linux-gnu/
&& clang++ --gcc-toolchain=/opt -v
- >
cmake -B build -S .
-GNinja
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_C_COMPILER=clang
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS="-Werror --gcc-toolchain=/opt"
-DACTS_BUILD_EVERYTHING=on
-DACTS_RUN_CLANG_TIDY=on
- mkdir clang-tidy
- CI/clang_tidy/run_clang_tidy.sh build > clang-tidy/clang-tidy.log
- pip install -r CI/clang_tidy/requirements.txt
- CI/clang_tidy/parse_clang_tidy.py clang-tidy/clang-tidy.log clang-tidy/clang-tidy.json --exclude "*thirdparty*"
- CI/clang_tidy/check_clang_tidy.py --report clang-tidy/clang-tidy.json --config CI/clang_tidy/limits.yml
- codereport clang-tidy/clang-tidy.json clang-tidy/html
build:
stage: build
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v29
tags:
- docker
variables:
CCACHE_DIR: ${CI_PROJECT_DIR}/ccache
CCACHE_MAXSIZE: 10G
CCACHE_KEY_SUFFIX: r1
cache:
key: ccache-exatrkx-$CI_COMMIT_REF_SLUG
paths:
- ${CI_PROJECT_DIR}/ccache_${CCACHE_KEY_SUFFIX}
artifacts:
paths:
- build/
- src/Examples/Python
- src/Examples/Scripts/Python
- src/Examples/Algorithms/TrackFinding/share
- src/Examples/Algorithms/Digitization/share
exclude:
- build/**/*.o
script:
- export PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
- export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:$PATH
- echo $PATH
- git clone $CLONE_URL src
- cd src
- git checkout $HEAD_SHA
- cd ..
- mkdir build
- >
cmake -B build -S src
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-GNinja
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_CXX_FLAGS=-w
-DCMAKE_CUDA_FLAGS=-w
-DCMAKE_CUDA_ARCHITECTURES="75;86"
-DACTS_BUILD_PLUGIN_EXATRKX=ON
-DACTS_BUILD_EXAMPLES_EXATRKX=ON
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
- cmake --build build --
test:
stage: test
needs:
- build
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v29
tags:
- docker-gpu-nvidia
script:
- apt-get update -y
- apt-get install -y python3 libxxhash0
- curl https://acts.web.cern.ch/ci/exatrkx/onnx_models_v01.tar --output models.tar
- tar -xf models.tar
- source build/python/setup.sh
- nvidia-smi
- python3 src/Examples/Scripts/Python/exatrkx.py