-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
48 lines (44 loc) · 1.36 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
variables:
CONTAINER_VERSION: "3.1"
stages:
- validate
- generator
- run-test-jobs
################################################################################
# Check code formation with clang-format
# pull request validation:
# - check C++ code style
pull-request-validation:
stage: validate
image: ubuntu:focal
script:
- apt update
# install clang-format-11
- apt install -y -q wget
# source: https://github.com/muttleyxd/clang-tools-static-binaries/releases
- wget https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/master-f3a37dd2/clang-format-12.0.1_linux-amd64
- mv clang-format-12.0.1_linux-amd64 /usr/bin/clang-format
- chmod +x /usr/bin/clang-format
- clang-format --version
# Check C++ code style
- source $CI_PROJECT_DIR/ci/check_cpp_code_style.sh
generate:
stage: generator
# fixed alpine version, because the available python version is depending on the alpine version
image: alpine:3.18
script:
- apk update && apk add python3~=3.11 py3-pip
- pip3 install -r ci/job_generator/requirements.txt
- python3 ci/job_generator/job_generator.py ${CONTAINER_VERSION}
- cat jobs.yml
artifacts:
paths:
- jobs.yml
expire_in: 1 week
run-tests:
stage: run-test-jobs
trigger:
include:
- artifact: jobs.yml
job: generate
strategy: depend