Commit 20f8e2b1 authored by Isaak Lim's avatar Isaak Lim
Browse files

use push-pull cache policy

parent c4e51cf2
Pipeline #6154 failed with stages
in 1 minute and 22 seconds
cache:
paths:
- ./venv3/
- ./venv2/
- ./dist3/
- ./dist2/
stages: stages:
- build - build
- test - test
build-3.5: build-3.5:
stage: build stage: build
cache:
key: wheel3
paths:
- ./venv3
- ./dist3
policy: push
tags: tags:
- Linux - Linux
variables: variables:
...@@ -19,9 +18,16 @@ build-3.5: ...@@ -19,9 +18,16 @@ build-3.5:
- virtualenv --clear -p python3.5 ./venv3 - virtualenv --clear -p python3.5 ./venv3
- source ./venv3/bin/activate - source ./venv3/bin/activate
- python setup.py bdist_wheel --dist-dir dist3 - python setup.py bdist_wheel --dist-dir dist3
- pip install dist3/*.whl
build-2.7: build-2.7:
stage: build stage: build
cache:
key: wheel2
paths:
- ./venv2
- ./dist2
policy: push
tags: tags:
- Linux - Linux
variables: variables:
...@@ -30,25 +36,36 @@ build-2.7: ...@@ -30,25 +36,36 @@ build-2.7:
- virtualenv --clear -p python2.7 ./venv2 - virtualenv --clear -p python2.7 ./venv2
- source ./venv2/bin/activate - source ./venv2/bin/activate
- python setup.py bdist_wheel --dist-dir dist2 - python setup.py bdist_wheel --dist-dir dist2
- pip install dist2/*.whl
test-3.5: test-3.5:
stage: test stage: test
cache:
key: wheel3
paths:
- ./venv3
- ./dist3
policy: pull
tags: tags:
- Linux - Linux
script: script:
- source ./venv3/bin/activate - source ./venv3/bin/activate
- pip install dist3/*.whl
- cd tests - cd tests
- python -m unittest discover - python -m unittest discover
test-2.7: test-2.7:
stage: test stage: test
cache:
key: wheel2
paths:
- ./venv2
- ./dist2
policy: pull
tags: tags:
- Linux - Linux
variables: variables:
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
script: script:
- source venv2/bin/activate - source ./venv2/bin/activate
- pip install dist2/*.whl
- cd tests - cd tests
- python -m unittest discover - python -m unittest discover
Supports Markdown
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