.gitlab-ci.yml 1.32 KB
Newer Older
Laanait, Nouamane's avatar
Laanait, Nouamane committed
1 2 3
# This file is a template, and might need editing before it works on your project.
# Official language image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/python/tags/
4
image: nvcr.io/nvidia/tensorflow:19.10-py3
Laanait, Nouamane's avatar
Laanait, Nouamane committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
  paths:
    - .cache/pip
    - venv/

Laanait, Nouamane's avatar
Laanait, Nouamane committed
21 22
stages:
  - build
Laanait, Nouamane's avatar
Laanait, Nouamane committed
23
  - test
Laanait, Nouamane's avatar
Laanait, Nouamane committed
24 25
  - pages

Laanait, Nouamane's avatar
Laanait, Nouamane committed
26 27 28 29 30
# before_script:
#   - python -V # Print out python version for debugging
#   - pip install virtualenv
#   - virtualenv venv
#   - source venv/bin/activate
Laanait, Nouamane's avatar
Laanait, Nouamane committed
31 32 33 34 35 36 37

test:
  script:
  - python setup.py test
  - pip install tox flake8 # you can also use tox
  - tox -e py36,flake8

Laanait, Nouamane's avatar
Laanait, Nouamane committed
38
build:
Laanait, Nouamane's avatar
Laanait, Nouamane committed
39 40 41 42 43 44 45 46 47 48 49 50
  script:
  - python setup.py bdist_wheel
  # an alternative approach is to install and run:
  - pip install dist/*
  # run the command here
  artifacts:
    paths:
    - dist/*.whl

pages:
  script:
  - pip install sphinx sphinx-rtd-theme
Laanait, Nouamane's avatar
Laanait, Nouamane committed
51
  - cd docs ; make html
Laanait, Nouamane's avatar
Laanait, Nouamane committed
52
  - mv _build/html/ ../public/
Laanait, Nouamane's avatar
Laanait, Nouamane committed
53 54 55 56 57
  artifacts:
    paths:
    - public
  only:
  - master