Skip to content
Snippets Groups Projects
.gitlab-ci.yml 3.35 KiB
# CI Config for ltaftpy / gitlab

default:
  cache:                      # Pip's cache doesn't store the python packages
    paths:                    # https://pip.pypa.io/en/stable/topics/caching/
      - .cache/pip
  before_script:
    - apt-get update
    - apt-get install -y --no-install-recommends cmake
    - apt-get install -y --no-install-recommends gcc
    - apt-get install -y --no-install-recommends g++
    - apt-get install -y --no-install-recommends make
    - apt-get install -y --no-install-recommends libfftw3-dev
    - apt-get install -y --no-install-recommends liblapack-dev
    - apt-get install -y --no-install-recommends python3
    - apt-get install -y --no-install-recommends python3-dev
    - apt-get install -y --no-install-recommends python3-setuptools
    - apt-get install -y --no-install-recommends python3-pytest
    - apt-get install -y --no-install-recommends python3-pytest-cov
    - apt-get install -y --no-install-recommends python3-coverage
    - apt-get install -y --no-install-recommends libjs-jquery-hotkeys
    - apt-get install -y --no-install-recommends libjs-jquery-isonscreen
    - apt-get install -y --no-install-recommends libjs-jquery-tablesorter
    - apt-get install -y --no-install-recommends python3-pip
    - apt-get install -y --no-install-recommends python3-wheel
    - apt-get install -y --no-install-recommends python3-tk
    - apt-get install -y --no-install-recommends python3-matplotlib
    - apt-get install -y --no-install-recommends python3-scipy
    - apt-get install -y --no-install-recommends texlive-latex-extra
    - apt-get install -y --no-install-recommends dvipng
    - apt-get clean
    - pip install virtualenv
    - virtualenv venv
    - source venv/bin/activate
    - pip install --upgrade pip
    - pip install matplotlib numpy scipy six coverage pytest pytest-cov

stages:
  - test
# 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"

install_and_test_39:
  image: python:3.9
  stage: test
  script:
    - dpkg -L python3-pytest | xargs file | grep executable
    - pip3 install -e . --no-deps
    - python3 -m pytest
  artifacts:
    when: always
    untracked: true
    paths:
      - build
    expire_in: 8d

# Tests on X86_64 ubuntu
ubuntu:X86_64:
  image: registry.gitlab.lis-lab.fr:5005/dev/ltfatpy/ubuntu:X86_64
  tags:
    - docker
  script:
    - conda create -n py39 Python=3.9
    - conda activate py39
    - pip3 install -e . --no-deps
    - python3 -m pytest
    # - py.test-3
  artifacts: