.gitlab-ci.yml 1.3 KB
Newer Older
1 2 3 4 5 6
stages:
  - build
  - test

build-3.5:
  stage: build
Isaak Lim's avatar
Isaak Lim committed
7 8 9 10 11
  cache:
    key: wheel3
    paths:
      - ./venv3
      - ./dist3
Isaak Lim's avatar
Isaak Lim committed
12 13
      - ./venv2
      - ./dist2
Isaak Lim's avatar
Isaak Lim committed
14
    policy: push
Janis Born's avatar
Janis Born committed
15 16
  tags:
    - Linux
17 18
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
Isaak Lim's avatar
Isaak Lim committed
19
  script:
20
  - virtualenv --clear -p python3.5 ./venv3
Isaak Lim's avatar
Isaak Lim committed
21
  - source ./venv3/bin/activate
22
  - python setup.py bdist_wheel --dist-dir dist3
Isaak Lim's avatar
Isaak Lim committed
23
  - pip install dist3/*.whl
24 25 26

build-2.7:
  stage: build
Isaak Lim's avatar
Isaak Lim committed
27 28 29
  cache:
    key: wheel2
    paths:
Isaak Lim's avatar
Isaak Lim committed
30 31
      - ./venv3
      - ./dist3
Isaak Lim's avatar
Isaak Lim committed
32 33 34
      - ./venv2
      - ./dist2
    policy: push  
35 36 37 38 39 40
  tags:
    - Linux
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
  script:
  - virtualenv --clear -p python2.7 ./venv2
Isaak Lim's avatar
Isaak Lim committed
41
  - source ./venv2/bin/activate
42
  - python setup.py bdist_wheel --dist-dir dist2
Isaak Lim's avatar
Isaak Lim committed
43
  - pip install dist2/*.whl
44 45 46

test-3.5:
  stage: test
Isaak Lim's avatar
Isaak Lim committed
47 48 49 50 51
  cache:
    key: wheel3
    paths:
      - ./venv3
      - ./dist3
Isaak Lim's avatar
Isaak Lim committed
52 53
      - ./venv2
      - ./dist2
Isaak Lim's avatar
Isaak Lim committed
54
    policy: pull  
55 56 57
  tags:
    - Linux
  script:
Isaak Lim's avatar
Isaak Lim committed
58
  - source ./venv3/bin/activate
Isaak Lim's avatar
Isaak Lim committed
59 60 61 62
  - cd tests
  - python -m unittest discover

test-2.7:
63
  stage: test
Isaak Lim's avatar
Isaak Lim committed
64 65 66
  cache:
    key: wheel2
    paths:
Isaak Lim's avatar
Isaak Lim committed
67 68
      - ./venv3
      - ./dist3
Isaak Lim's avatar
Isaak Lim committed
69 70 71
      - ./venv2
      - ./dist2
    policy: pull
Janis Born's avatar
Janis Born committed
72 73
  tags:
    - Linux
74 75
  variables:
    GIT_SUBMODULE_STRATEGY: recursive
Isaak Lim's avatar
Isaak Lim committed
76
  script:
Isaak Lim's avatar
Isaak Lim committed
77
  - source ./venv2/bin/activate
Isaak Lim's avatar
Isaak Lim committed
78 79
  - cd tests
  - python -m unittest discover