Skip to content
Snippets Groups Projects
Commit 8aaa882a authored by Tobias Leibner's avatar Tobias Leibner
Browse files

[ci] remove duplication in python stage

parent 4a690bf5
No related branches found
No related tags found
1 merge request!47More ci fixes
Pipeline #65353 passed
......@@ -3,8 +3,8 @@
stages:
- images
- cpp
- python
- headercheck
- python
variables:
GIT_SUBMODULE_STRATEGY: recursive
......@@ -121,18 +121,6 @@ common unstable_gcc_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
common unstable_gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian-unstable_gcc_full
TESTS_MODULE_SUBDIR: common
tags:
- dustin
stage: python
needs: ["debian-unstable_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
common unstable_gcc_full headercheck:
extends: .subdir-test
variables:
......@@ -157,18 +145,6 @@ grid unstable_gcc_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
grid unstable_gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian-unstable_gcc_full
TESTS_MODULE_SUBDIR: grid
tags:
- dustin
stage: python
needs: ["debian-unstable_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
grid unstable_gcc_full headercheck:
extends: .subdir-test
variables:
......@@ -193,18 +169,6 @@ functions unstable_gcc_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
functions unstable_gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian-unstable_gcc_full
TESTS_MODULE_SUBDIR: functions
tags:
- dustin
stage: python
needs: ["debian-unstable_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
functions unstable_gcc_full headercheck:
extends: .subdir-test
variables:
......@@ -229,18 +193,6 @@ la unstable_gcc_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
la unstable_gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian-unstable_gcc_full
TESTS_MODULE_SUBDIR: la
tags:
- dustin
stage: python
needs: ["debian-unstable_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
la unstable_gcc_full headercheck:
extends: .subdir-test
variables:
......@@ -265,18 +217,6 @@ common gcc_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
common gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian_gcc_full
TESTS_MODULE_SUBDIR: common
tags:
- dustin
stage: python
needs: ["debian_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
common gcc_full headercheck:
extends: .subdir-test
variables:
......@@ -301,18 +241,6 @@ grid gcc_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
grid gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian_gcc_full
TESTS_MODULE_SUBDIR: grid
tags:
- dustin
stage: python
needs: ["debian_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
grid gcc_full headercheck:
extends: .subdir-test
variables:
......@@ -337,18 +265,6 @@ functions gcc_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
functions gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian_gcc_full
TESTS_MODULE_SUBDIR: functions
tags:
- dustin
stage: python
needs: ["debian_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
functions gcc_full headercheck:
extends: .subdir-test
variables:
......@@ -373,18 +289,6 @@ la gcc_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
la gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian_gcc_full
TESTS_MODULE_SUBDIR: la
tags:
- dustin
stage: python
needs: ["debian_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
la gcc_full headercheck:
extends: .subdir-test
variables:
......@@ -407,16 +311,6 @@ common clang_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
common clang_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian_clang_full
TESTS_MODULE_SUBDIR: common
stage: python
needs: ["debian_clang_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
common clang_full headercheck:
extends: .subdir-test
variables:
......@@ -437,16 +331,6 @@ grid clang_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
grid clang_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian_clang_full
TESTS_MODULE_SUBDIR: grid
stage: python
needs: ["debian_clang_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
grid clang_full headercheck:
extends: .subdir-test
variables:
......@@ -467,16 +351,6 @@ functions clang_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
functions clang_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian_clang_full
TESTS_MODULE_SUBDIR: functions
stage: python
needs: ["debian_clang_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
functions clang_full headercheck:
extends: .subdir-test
variables:
......@@ -497,23 +371,46 @@ la clang_full cpp:
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_cpp.bash
la clang_full python:
la clang_full headercheck:
extends: .subdir-test
variables:
CI_IMAGE: debian_clang_full
TESTS_MODULE_SUBDIR: la
stage: python
stage: headercheck
needs: ["debian_clang_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_headercheck.bash
unstable_gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian-unstable_gcc_full
tags:
- dustin
stage: python
needs: ["debian-unstable_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
la clang_full headercheck:
gcc_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian_gcc_full
tags:
- dustin
stage: python
needs: ["debian_gcc_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
clang_full python:
extends: .subdir-test
variables:
CI_IMAGE: debian_clang_full
TESTS_MODULE_SUBDIR: la
stage: headercheck
stage: python
needs: ["debian_clang_full"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_headercheck.bash
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
......@@ -8,6 +8,7 @@ stages:
{%- for kind in kinds %}
- {{kind}}
{%- endfor %}
- python
variables:
GIT_SUBMODULE_STRATEGY: recursive
......@@ -120,6 +121,21 @@ variables:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_{{kind}}.bash
{% endfor %}
{% for image in images %}
{{ image[image.find('debian')+1+6:] }} python:
extends: .subdir-test
variables:
CI_IMAGE: {{ image }}
{%- if 'gcc' in image %}
tags:
- dustin
{%- endif %}
stage: python
needs: ["{{image}}"]
script:
- /home/dune-ci/src/${MY_MODULE}/.ci/shared/scripts/test_python.bash
{% endfor %}
'''
import os
......@@ -129,7 +145,7 @@ from itertools import product
tpl = jinja2.Template(tpl)
images = ['debian-unstable_gcc_full', 'debian_gcc_full', 'debian_clang_full']
subdirs = ['common', 'grid', 'functions', 'la']
kinds = ['cpp', 'python', 'headercheck']
kinds = ['cpp', 'headercheck']
matrix = product(images, subdirs, kinds)
with open(os.path.join(os.path.dirname(__file__), 'config.yml'), 'wt') as yml:
yml.write(tpl.render(matrix=matrix, images=images, kinds=kinds))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment