Commit 08bea8b5 authored by Thomas Vincent's avatar Thomas Vincent

Restore previous .gitlab-ci.yml

parent ba745edc
Pipeline #12208 passed with stages
in 7 minutes and 23 seconds
include:
- remote: 'https://gitlab.esrf.fr/silx/bob/main/raw/master/job-templates.yml'
stages:
- build_source
- build
- test
- deploy
variables:
PROJECT: xsocs
source:
extends: .local_source_build
variables: # Global variables
VENV_DIR: xsocs_venv
http_proxy: http://proxy.esrf.fr:3128
https_proxy: http://proxy.esrf.fr:3128
no_proxy: .esrf.fr,localhost
manylinux1_wheels:
extends: .manylinux1_wheels
### Linux ###
# Target definitions
.linux_build_template: &linux_build_definition
stage: build
tags:
- linux
image: ${IMAGE}
before_script:
- rm -rf ${VENV_DIR}
- pip install --upgrade virtualenv # Make sure virtualenv is installed
- virtualenv --python=${PYTHON} ${VENV_DIR}
- source ${VENV_DIR}/bin/activate
- pip install --upgrade pip setuptools
- pip install --upgrade --pre -r requirements-dev.txt
- which python
- python ./ci/info_platform.py
script:
- python setup.py bdist_wheel
- ls dist/
after_script:
- rm -rf ${VENV_DIR}
artifacts:
paths:
- dist/
when: on_success
expire_in: 2h
# Test
.test_template: &test_template_defintion
.linux_test_template: &linux_test_definition
stage: test
script:
# numpy is needed to build xrayutilities
tags:
- linux
image: ${IMAGE}
before_script:
- rm -rf ${VENV_DIR}
- pip install --upgrade virtualenv # Make sure virtualenv is installed
- virtualenv --python=${PYTHON} ${VENV_DIR}
- source ${VENV_DIR}/bin/activate
- pip install --upgrade pip setuptools
# TODO use requirements file - pip install -r requirements.txt
# Install numpy first as it is needed to build xrayutilities
- pip install --pre numpy --only-binary numpy
- pip install --pre --find-links artifacts/ --only-binary xsocs xsocs
- pip install --pre h5py fabio scipy silx xrayutilities --only-binary scipy,h5py,silx,fabio
- which python
- python ./ci/info_platform.py
script:
- pip install --pre --find-links dist/ --no-cache-dir --no-index xsocs
- python run_tests.py --installed -v
after_script:
- rm -rf ${VENV_DIR}
# Python2 tasks
.linux_python2_variables:
variables: &linux_python2_definition
IMAGE: python:2.7-jessie
PYTHON: python2
linux_build_python2:
<<: *linux_build_definition
variables: *linux_python2_definition
linux_test_python2:
<<: *linux_test_definition
dependencies:
- linux_build_python2
variables: *linux_python2_definition
manylinux1_test_cp27:
<<: *test_template_defintion
image: python:2.7
# Python3 tasks
.linux_python3_variables:
variables: &linux_python3_definition
IMAGE: python:3.5-stretch
PYTHON: python3
linux_build_python3:
<<: *linux_build_definition
variables: *linux_python3_definition
linux_test_python3:
<<: *linux_test_definition
dependencies:
- linux_build_python3
variables: *linux_python3_definition
### Documentation ###
# Deploy documentation in gitlab (only for master branch)
pages:
stage: deploy
tags:
- linux
before_script:
- ls -l artifacts
image: python:2.7-jessie
dependencies:
- manylinux1_wheels
- windows_build_python3
script:
- rm -rf public
- mv build/sphinx/html public
artifacts:
paths:
- public
only:
- master
### Windows ###
manylinux1_test_cp37:
<<: *test_template_defintion
image: python:3.7
.windows_template: &windows_definition
tags:
- linux
- win
before_script:
- ls -l artifacts
- SET "PATH=C:\\miniconda3;C:\\miniconda3\\Scripts;%PATH%"
- python -m venv --clear %VENV_DIR%
- call "%VENV_DIR%\\Scripts\\activate.bat"
- python -m pip install --upgrade pip
- python ci\info_platform.py
script:
after_script:
- rmdir %VENV_DIR% /s /q
windows_build_python3:
<<: *windows_definition
stage: build
script:
- pip install --upgrade --pre -r requirements-dev.txt
- python ci\info_platform.py
# Build the wheel
- python setup.py bdist_wheel
# Build the doc (dependencies are needed)
- pip install --upgrade --pre -r requirements.txt
- python setup.py build build_doc
- dir dist
artifacts:
paths:
- dist
- build/sphinx/html/
when: on_success
expire_in: 2h
windows_test_python3:
<<: *windows_definition
stage: test
dependencies:
- manylinux1_wheels
- windows_build_python3
script:
# Install numpy first as it is needed to build xrayutilities
- pip install --pre numpy --only-binary numpy
- pip install --pre h5py fabio scipy silx xrayutilities --only-binary scipy,h5py,silx,fabio
- python ci\info_platform.py
# Install wheel and run the tests
- pip install --pre --find-links dist/ --no-cache-dir --no-index xsocs
- python run_tests.py --installed -v
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment