forked from acts-project/acts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
122 lines (111 loc) · 3.72 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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 g++-8 libstdc++-8-dev parallel software-properties-common
&& curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add
&& add-apt-repository 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main'
&& apt-get install -y clang-16 clang-tidy-16
&& ln -s /usr/bin/clang++-16 /usr/bin/clang++
&& ln -s /usr/bin/clang-16 /usr/bin/clang
&& ln -s /usr/bin/clang-tidy-16 /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
# Main clang-tidy run during cmake compilation
- CI/clang_tidy/run_clang_tidy.sh build | tee clang-tidy/clang-tidy.log
# Install dependencies for processing scripts
- pip install -r CI/clang_tidy/requirements.txt
# Parse the main clang-tidy run
- >
CI/clang_tidy/parse_clang_tidy.py
clang-tidy/clang-tidy.log
clang-tidy/clang-tidy.json
--exclude "*thirdparty*"
# Check the combined report against the defined limits
- CI/clang_tidy/check_clang_tidy.py --report clang-tidy/clang-tidy.json --config CI/clang_tidy/limits.yml
# Generate an html report
- codereport clang-tidy/clang-tidy.json clang-tidy/html
build:
stage: build
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v30
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_EXATRKX_ENABLE_TORCH=ON
-DACTS_EXATRKX_ENABLE_ONNX=ON
-DACTS_BUILD_EXAMPLES_PYTHON_BINDINGS=ON
- cmake --build build --
test:
stage: test
needs:
- build
image: ghcr.io/acts-project/ubuntu2004_exatrkx:v30
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 onnx_models.tar
- curl https://bhuth.webo.family/index.php/s/oyFg8WF2cDPrJYz/download --output torchscript_models.tar
- tar -xf onnx_models.tar
- tar -xf torchscript_models.tar
- source build/python/setup.sh
- nvidia-smi
- python3 src/Examples/Scripts/Python/exatrkx.py onnx
- python3 src/Examples/Scripts/Python/exatrkx.py torch