This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathxt_and_gdt_config_template.txt
171 lines (159 loc) · 4.86 KB
/
xt_and_gdt_config_template.txt
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# THIS FILE IS AUTOGENERATED -- DO NOT EDIT #
# Edit and Re-run .ci/gitlab/config_template.py instead #
stages:
- sanity
- images
{%- for kind in kinds %}
- {{kind}}
{%- endfor %}
- python
variables:
GIT_SUBMODULE_STRATEGY: recursive
TRAVIS_BRANCH: ${CI_COMMIT_REF_NAME}
TRAVIS_COMMIT: ${CI_COMMIT_SHA}
CCACHE_BASEDIR: ${CI_PROJECT_DIR}
CCACHE_DIR: "${CI_PROJECT_DIR}/.ccache"
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: "true"
PYTEST_ADDOPTS: "-s"
MY_MODULE: DUNE_XT_OR_DUNE_GDT
BASE_PROJECT: zivgitlab.wwu.io/ag-ohlberger/dune-community/DUNE_XT_OR_DUNE_GDT-super
.image_builder:
tags:
- docker-in-docker
- long execution time
stage: images
rules:
- if: '$CI_COMMIT_REF_NAME =~ /^staging.*/'
when: never
- when: on_success
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- api_failure
image: harbor.uni-muenster.de/proxy-docker/library/docker:19.03.12
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
IMAGE: ${CI_REGISTRY_IMAGE}/ci_testing_${CI_IMAGE}:${CI_COMMIT_SHORT_SHA}
before_script:
- |
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
apk --update add py3-pip openssh-client rsync git file bash python3 curl
pip3 install -U docker jinja2 docopt
export BASEIMAGE="${MY_MODULE}-testing_${CI_IMAGE}:${CI_COMMIT_REF_NAME/\//_}"
# get image with fallback to master branch of the super repo
docker pull ${BASE_PROJECT}/${BASEIMAGE} || export BASEIMAGE="${MY_MODULE}-testing_${CI_IMAGE}:master"
docker pull ${BASE_PROJECT}/${BASEIMAGE}
script:
- |
git submodule update --init --recursive
docker build --build-arg BASE=${BASEIMAGE} -t ${IMAGE} -f .ci/gitlab/Dockerfile .
docker push ${IMAGE}
services:
- name: harbor.uni-muenster.de/proxy-docker/library/docker:dind
alias: docker
environment:
name: unsafe
.subdir-test:
tags:
- long execution time
stage: test
rules:
- if: '$CI_COMMIT_REF_NAME =~ /^staging.*/'
when: never
- when: on_success
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- api_failure
image: ${CI_REGISTRY_IMAGE}/ci_testing_${CI_IMAGE}:${CI_COMMIT_SHORT_SHA}
cache:
key: "$CI_JOB_NAME"
paths:
- .ccache
before_script:
- |
mkdir /home/dune-ci/testresults && chmod -R 777 /home/dune-ci/testresults
[[ -f ./.gitsuper ]] && echo "Please remove .gitsuper from the repo" && exit 1
ccache --zero-stats || true
after_script:
- ccache --show-stats
artifacts:
reports:
junit: '/home/dune-ci/testresults/*xml'
environment:
name: unsafe
.pre-commit:
stage: sanity
retry:
max: 2
when:
- runner_system_failure
- stuck_or_timeout_failure
- api_failure
image: "harbor.uni-muenster.de/proxy-docker/library/python:3.9"
cache:
paths:
- ${CI_PROJECT_DIR}/.cache/pre-commit
variables:
PRECOMMIT: "pre-commit run --all"
before_script:
- pip install pre-commit
- pre-commit install --install-hooks
format_check:
extends: .pre-commit
script:
- ${PRECOMMIT} clang-format
- ${PRECOMMIT} yapf
- ${PRECOMMIT} trailing-whitespace
lint:
extends: .pre-commit
script:
- ${PRECOMMIT} check-added-large-files
#- ${PRECOMMIT} flake8 disabled for now, finds lots of issue
- ${PRECOMMIT} debug-statements
- ${PRECOMMIT} check-yaml
{% for image in images -%}
{{ image }}:
extends: .image_builder
variables:
CI_IMAGE: {{ image }}
{% endfor %}
{% for image, subdir, kind in matrix %}
{%- if ('cpp' in kind and subdir != 'functions') or ('headercheck' in kind and subdir not in ('functions1', 'functions2')) %}
{{subdir}} {{ image[image.find('debian')+1+6:] }} {{kind}}:
extends: .subdir-test
variables:
CI_IMAGE: {{ image }}
TESTS_MODULE_SUBDIR: {{ subdir }}
{%- if 'cpp' in kind or 'gdt' in subdir %}
tags:
- dustin
{%- endif %}
stage: {{kind}}
needs: ["{{image}}"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_{{kind}}.bash
{%- endif %}
{% endfor %}
{% for image in images %}
{{ image[image.find('debian')+1+6:] }} python:
extends: .subdir-test
variables:
CI_IMAGE: {{ image }}
tags:
{%- if 'gdt' in subdirs[0] and 'clang' in image %}
- lucas
{%- else %}
- dustin
{%- endif %}
stage: python
needs: ["{{image}}"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
{% endfor %}