Skip to content
Snippets Groups Projects
Commit bebb6b5d authored by Iñigo Moreno i Caireta's avatar Iñigo Moreno i Caireta
Browse files

Use auto-rules to determine python version

parent 22e467b4
No related branches found
No related tags found
1 merge request!77Resolve "python_syntax is python2 only"
Pipeline #76222 passed
...@@ -38,6 +38,25 @@ industrial_ci_noetic: ...@@ -38,6 +38,25 @@ industrial_ci_noetic:
- if: $DEFAULT_DISTRO == "noetic" - if: $DEFAULT_DISTRO == "noetic"
- if: $BUILD_NOETIC - if: $BUILD_NOETIC
python3_syntax:
extends: .python_syntax_template
variables:
PYTHON_VERSION: python3
rules:
- if: $DEFAULT_DISTRO == "noetic"
- if: $BUILD_NOETIC
python2_syntax:
extends: .python_syntax_template
variables:
PYTHON_VERSION: python2
rules:
- if: $DEFAULT_DISTRO == "kinetic"
- if: $BUILD_KINETIC
- if: $DEFAULT_DISTRO == "melodic"
- if: $BUILD_MELODIC
ddeploy: ddeploy:
extends: .ddeploy extends: .ddeploy
rules: rules:
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
clang_format: clang_format:
stage: .post stage: .post
before_script: before_script:
- apk add --update bash coreutils tar wget - apk add --update git bash coreutils tar wget
- git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .ci_config -b legacy - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .ci_config -b legacy
- wget https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/clang-format -O .clang-format - wget https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/master/clang-format -O .clang-format
script: .ci_config/gitlab.sh script: .ci_config/gitlab.sh
...@@ -19,11 +19,11 @@ clang_format: ...@@ -19,11 +19,11 @@ clang_format:
## Simple check for basic Python syntax errors; this is much less thorough than ## Simple check for basic Python syntax errors; this is much less thorough than
## other options like pylint, but much faster and less strict ## other options like pylint, but much faster and less strict
########################################################## ##########################################################
python_syntax: .python_syntax_template:
before_script: before_script:
- apk add --update python2 - apk add --update ${PYTHON_VERSION}
stage: build stage: build
script: python -m compileall -q . script: ${PYTHON_VERSION} -m compileall -q .
when: always when: always
########################################################## ##########################################################
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment