diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9a2b87b423c4e6a256d3572e415c0de928747d1c..5cd1acb217b4da51ae4bf827cdad6b206840498f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44 + variables: PYTHON_VERSION: "3.6.13" @@ -9,9 +9,12 @@ variables: stages: - build + - test + - package build: stage: build + image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44 script: - yum -y install zlib-devel bzip2-devel openssl-devel readline-devel ncurses-devel sqlite-devel gdbm-devel db4-devel expat-devel libpcap-devel xz-devel pcre-devel libffi-devel tk-devel - curl -s https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz | tar -xJf - @@ -27,6 +30,16 @@ build: - grep -I -r -l "^#\!${PYTHON_ROOT}/bin/python.*$" ${PYTHON_ROOT} | xargs sed -i '1c\#\!/usr/bin/env python' # Clean pycache - find ${PYTHON_ROOT} -iname __pycache__ -print0 | xargs -0 rm -rf + +test: + stage: test + image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44 + scripts: + - ${PYTHON_ROOT}/bin/python --version | grep "python ${PYTHON_VERSION}" + +package: + stage: package + scripts: - cd ${PYTHON_ROOT} - zip -r --symlinks ${CI_PROJECT_DIR}/${NAME}.zip * artifacts: