From e29d7443c59234394606e7494efda030fbff2dcb Mon Sep 17 00:00:00 2001 From: MADELA Patrick <patrick.madela@synchrotron-soleil.fr> Date: Tue, 4 Oct 2022 21:02:33 +0200 Subject: [PATCH] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 814f275..f916a6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,20 +1,12 @@ - variables: PYTHON_VERSION: "3.6.13" - OS: "linux-el6" - ARCH: "x86_64" - NAME: "python-${PYTHON_VERSION}-${OS}-${ARCH}" - PYTHON_ROOT: "${CI_PROJECT_DIR}/${NAME}" stages: - build - - test - - package -build: +.build-python: 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 - @@ -30,19 +22,27 @@ 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 - script: - - ${PYTHON_ROOT}/bin/python --version | grep "python ${PYTHON_VERSION}" - -package: - stage: package - script: - cd ${PYTHON_ROOT} - zip -r --symlinks ${CI_PROJECT_DIR}/${NAME}.zip * artifacts: name: ${NAME} paths: - - ${NAME}.zip + - *.zip + +build: + extends: [".build-python"] + image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44 + variables: + OS: "linux-el6" + ARCH: "x86_64" + NAME: "python-${PYTHON_VERSION}-${OS}-${ARCH}" + PYTHON_ROOT: "${CI_PROJECT_DIR}/${NAME}" + +build: + extends: [".build-python"] + image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44-x86 + variables: + OS: "linux-el6" + ARCH: "i686" + NAME: "python-${PYTHON_VERSION}-${OS}-${ARCH}" + PYTHON_ROOT: "${CI_PROJECT_DIR}/${NAME}" -- GitLab