forked from ComputationalRadiationPhysics/picongpu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
90 lines (82 loc) · 2.71 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
stages:
- validate
- generate
- test_picongpu
- test_pmacc
variables:
CONTAINER_TAG: "1.3"
.base_generate-reduced-matrix:
stage: generate
script:
- apt update
- apt install -y python3-pip
- pip3 install allpairspy
- $CI_PROJECT_DIR/share/ci/git_merge.sh
- $CI_PROJECT_DIR/share/ci/generate_reduced_matrix.sh -n ${TEST_TUPLE_NUM_ELEM} -j 15 > compile.yml
- cat compile.yml
artifacts:
paths:
- compile.yml
interruptible: true
# pull request validation:
# - check PR destination
# - check python code style: flake8, pyflake
# - rebase the PR to the destination branch
# - check C++ code style
pull-request-validation:
stage: validate
image: ubuntu:focal
script:
- apt update
- apt install -y -q git curl wget python3 python3-pip
# Test if pull request can be merged into the destination branch
- $CI_PROJECT_DIR/test/correctBranchPR
- source $CI_PROJECT_DIR/share/ci/git_merge.sh
- pip3 install -U flake8 pyflakes
# Test Python Files for PEP8 conformance
- flake8 --exclude=thirdParty .
# Warnings, unused code, etc.
- pyflakes .
# install clang-format-11
- apt install -y -q gnupg2
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
- echo "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main" | tee -a /etc/apt/sources.list
- apt update
- DEBIAN_FRONTEND=noninteractive apt install -y clang-format-11
# Check C++ code style
- source $CI_PROJECT_DIR/share/ci/check_cpp_code_style.sh
tags:
- x86_64
interruptible: true
# generate reduced test matrix
# required variables (space separated lists):
# PIC_INPUTS - Path to examples relative to share/picongpu.
# If input is 'pmacc' the folder will be ignored and tests for pmacc will be generated.
# e.g.
# "examples" starts one gitlab job per directory in `examples/*`
# "examples/" compile all directories in `examples/*` within one gitlab job
# "examples/KelvinHelmholtz" compile all cases within one gitlab job
picongpu-generate-reduced-matrix:
variables:
PIC_INPUTS: "examples tests benchmarks"
TEST_TUPLE_NUM_ELEM: 1
extends: ".base_generate-reduced-matrix"
picongpu-compile-reduced-matrix:
stage: test_picongpu
trigger:
include:
- artifact: compile.yml
job: picongpu-generate-reduced-matrix
strategy: depend
pmacc-generate-reduced-matrix:
variables:
PIC_INPUTS: "pmacc"
TEST_TUPLE_NUM_ELEM: 1
extends: ".base_generate-reduced-matrix"
pmacc-compile-reduced-matrix:
stage: test_pmacc
trigger:
include:
- artifact: compile.yml
job: pmacc-generate-reduced-matrix
strategy: depend