Skip to content
Snippets Groups Projects
Commit 73e89d17 authored by Patrick MADELA's avatar Patrick MADELA
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #1081 failed
variables:
CONAN_VERSION: "2.36.2"
PYTHON_VERSION: "3.6.13"
stages:
- build
- test
- package
.build:
stage: build
script:
# Install python 3
- curl -s -L -o ${PYTHON_ROOT}.zip https://gitlab.synchrotron-soleil.fr/software-control-system/devtools/python3/-/jobs/artifacts/main/download?job=linux-${PLATFORM}
- unzip -q ${PYTHON_ROOT}.zip -d ${CI_PROJECT_DIR}
- rm ${PYTHON_ROOT}.zip
# Install conan
- ${PYTHON_ROOT}/bin/pip3 install -q --no-cache-dir --prefix=${CONAN_ROOT} conan==${CONAN_VERSION} conan-package-tools
# Fix python shebang to make it independent of install path
- grep -I -r -l "^#\!${PYTHON_ROOT}/bin/python.*$" ${CONAN_ROOT} | xargs sed -i '1c\#\!/usr/bin/env python'
# Clean pycache
- find ${CI_PROJECT_DIR}/${CONAN_ROOT} -iname __pycache__ -print0 | xargs -0 rm -rf
artifacts:
name: ${CONAN_ROOT}
paths:
- ${CONAN_ROOT}
.test:
stage: test
script:
# Install python 3
- curl -s -L -o ${PYTHON_ROOT}.zip https://gitlab.synchrotron-soleil.fr/software-control-system/devtools/python3/-/jobs/artifacts/main/download?job=linux-${PLATFORM}
- unzip -q ${PYTHON_ROOT}.zip -d ${CI_PROJECT_DIR}
- rm ${PYTHON_ROOT}.zip
# Test
- ${CI_PROJECT_DIR}/${CONAN_ROOT}/bin/conan --version | grep ${CONAN_VERSION}
.package:
stage: package
script:
- cd ${CI_PROJECT_DIR}/${CONAN_ROOT}
- zip -r --symlinks ../${CONAN_ROOT}.zip *
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ../${CONAN_ROOT}.zip "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/conan/${CONAN_VERSION}/"'
linux-el6-x86_64:
extends: [".build"]
image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44
variables:
PLATFORM: "linux-el6-x86_64"
CONAN_ROOT: "conan-${CONAN_VERSION}-${PLATFORM}"
PYTHON_ROOT: "python-${PYTHON_VERSION}-${PLATFORM}"
test-el6-x86_64:
extends: [".test"]
image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44
variables:
PLATFORM: "linux-el6-x86_64"
CONAN_ROOT: "conan-${CONAN_VERSION}-${PLATFORM}"
PYTHON_ROOT: "python-${PYTHON_VERSION}-${PLATFORM}"
PATH: "${CI_PROJECT_DIR}/${PYTHON_ROOT}/bin:$PATH"
PYTHONPATH: ${CI_PROJECT_DIR}/${CONAN_ROOT}/lib/python3.6/site-packages
needs:
- linux-el6-x86_64
package-el6-x86_64:
extends: [".package"]
image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44
variables:
PLATFORM: "linux-el6-x86_64"
NAME: "conan-${CONAN_VERSION}-${PLATFORM}"
needs:
- linux-el6-x86_64
- test-el6-x86_64
# linux-el6-i686:
# extends: [".build"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44-x86
# variables:
# PLATFORM: "linux-el6-i686"
# NAME: "conan-${GIT_VERSION}-${PLATFORM}"
# test-el6-i686:
# extends: [".test"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44-x86
# variables:
# PLATFORM: "linux-el6-i686"
# NAME: "conan-${GIT_VERSION}-${PLATFORM}"
# needs:
# - linux-el6-i686
# package-el6-i686:
# extends: [".package"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44-x86
# variables:
# PLATFORM: "linux-el6-i686"
# NAME: "conan-${GIT_VERSION}-${PLATFORM}"
# needs:
# - linux-el6-i686
# - test-el6-i686
# linux-el7-x86_64:
# extends: [".build"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc48
# variables:
# PLATFORM: "linux-el6-i686"
# NAME: "conan-${GIT_VERSION}-${PLATFORM}"
# test-el7-x86_64:
# extends: [".test"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc48
# variables:
# PLATFORM: "linux-el6-i686"
# NAME: "conan-${GIT_VERSION}-${PLATFORM}"
# needs:
# - linux-el7-x86_64
# package-el7-x86_64:
# extends: [".package"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el6-gcc44-x86
# variables:
# PLATFORM: "linux-el6-i686"
# NAME: "conan-${GIT_VERSION}-${PLATFORM}"
# needs:
# - linux-el7-x86_64
# - test-el7-x86_64
# linux-el7-i686:
# extends: [".build"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc48-x86
# variables:
# PLATFORM: "linux-el6-i686"
# NAME: "conan-${GIT_VERSION}-${PLATFORM}"
# test-el7-i686:
# extends: [".test"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc48-x86
# variables:
# PLATFORM: "linux-el6-i686"
# NAME: "conan-${GIT_VERSION}-${PLATFORM}"
# needs:
# - linux-el7-i686
# package-el7-i686:
# extends: [".package"]
# image: gitlab-registry.synchrotron-soleil.fr/software-control-system/containers/dev-el7-gcc48-x86
# variables:
# PLATFORM: "linux-el6-i686"
# NAME: "conan-${GIT_VERSION}-${PLATFORM}"
# needs:
# - linux-el7-i686
# - test-el7-i686
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment