stages: - test - deploy variables: PROJECT_NAME: "nabu" LOCAL_REPO_SHELL: "/dev/shm/gitlab_ci/nabu" VENV_DIR_SHELL: /dev/shm/gitlab_ci/nabu/venv LOCAL_REPO_DOCKER: "/root/gitlab_ci/nabu" VENV_DIR_DOCKER: "/root/gitlab_ci/nabu/venv" USE_CLEAN_VENV: "false" .linux_base: stage: test before_script: - unset HTTP_PROXY - unset HTTPS_PROXY - if [ ! -d $LOCAL_REPO ]; then mkdir -p $LOCAL_REPO; fi - if [ -d $VENV_DIR ]; then if [ "$USE_CLEAN_VENV" == "true" ]; then rm -rf $VENV_DIR; fi; fi - python3 -m venv $VENV_DIR - source $VENV_DIR/bin/activate - echo "Running $(python --version) from $(which python) on $(hostname) ($(arch))" - pip install --upgrade pip setuptools wheel - pip install --upgrade numpy - pip install silx --upgrade --pre silx - pip install scipy - if [[ $CI_RUNNER_TAGS == *"gpu"* ]]; then pip install pycuda scikit-cuda; fi script: - python -m pip install . - nabu-test # allow_failure: true linux_shell: extends: .linux_base variables: LOCAL_REPO: $LOCAL_REPO_SHELL VENV_DIR: ${VENV_DIR_SHELL} tags: - shell linux_docker: extends: .linux_base image: docker-registry.esrf.fr/dau/tomwer:python3.7_buster_pyqt5 variables: LOCAL_REPO: $LOCAL_REPO_DOCKER VENV_DIR: $VENV_DIR_DOCKER tags: - docker .pages_base: stage: deploy before_script: - source $VENV_DIR/bin/activate - pip install --upgrade pip - pip install sphinx cloud_sptheme nbsphinx recommonmark numpy - rm -rf public script: - python setup.py build build_sphinx -b html - mv build/sphinx/html public after_script: - ls -Rl public pages: extends: .pages_base variables: LOCAL_REPO: $LOCAL_REPO_SHELL VENV_DIR: $VENV_DIR_SHELL tags: - shell artifacts: paths: - public expire_in: 2h only: - master