2018-06-21 07:53:19 +00:00
|
|
|
version: 2.0
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
2018-08-20 23:38:38 +00:00
|
|
|
build_test_deploy:
|
2018-06-21 07:53:19 +00:00
|
|
|
jobs:
|
2018-08-29 13:42:42 +00:00
|
|
|
- bundle_dependencies-35:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
- bundle_dependencies-36:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
- bundle_dependencies-37:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-08-21 20:20:48 +00:00
|
|
|
- run_tests-35:
|
2018-08-29 13:42:42 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-08-21 20:20:48 +00:00
|
|
|
requires:
|
|
|
|
- bundle_dependencies-35
|
|
|
|
- run_tests-36:
|
2018-08-29 13:42:42 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-08-21 20:20:48 +00:00
|
|
|
requires:
|
|
|
|
- bundle_dependencies-36
|
|
|
|
- run_tests-37:
|
2018-08-29 13:42:42 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-08-21 20:20:48 +00:00
|
|
|
requires:
|
|
|
|
- bundle_dependencies-37
|
|
|
|
- mypy_type_check-36:
|
2018-08-29 13:42:42 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-08-21 20:20:48 +00:00
|
|
|
requires:
|
|
|
|
- run_tests-35
|
|
|
|
- run_tests-36
|
|
|
|
- run_tests-37
|
|
|
|
- doctests-36:
|
2018-08-29 13:42:42 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-08-21 20:20:48 +00:00
|
|
|
requires:
|
|
|
|
- run_tests-35
|
|
|
|
- run_tests-36
|
|
|
|
- run_tests-37
|
2018-10-06 16:58:50 +00:00
|
|
|
- notebook_tests-36:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
|
|
|
requires:
|
2018-10-10 21:14:33 +00:00
|
|
|
- run_tests-35
|
|
|
|
- run_tests-36
|
|
|
|
- run_tests-37
|
2018-08-21 20:20:48 +00:00
|
|
|
- reencryption_memory_profile-36:
|
2018-08-29 13:42:42 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-08-21 20:20:48 +00:00
|
|
|
requires:
|
|
|
|
- run_tests-35
|
|
|
|
- run_tests-36
|
|
|
|
- run_tests-37
|
|
|
|
- reencryption_benchmark-36:
|
2018-08-29 13:42:42 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /.*/
|
2018-08-21 20:20:48 +00:00
|
|
|
requires:
|
|
|
|
- run_tests-35
|
|
|
|
- run_tests-36
|
|
|
|
- run_tests-37
|
2018-10-10 21:14:33 +00:00
|
|
|
- test_deploy:
|
|
|
|
context: "NuCypher PyPI"
|
2018-08-20 02:16:36 +00:00
|
|
|
requires:
|
2018-08-21 21:32:26 +00:00
|
|
|
- mypy_type_check-36
|
|
|
|
- doctests-36
|
2018-08-20 02:16:36 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
2018-08-21 20:20:48 +00:00
|
|
|
only: /v[0-9]+.*/
|
2018-08-20 02:16:36 +00:00
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
2018-10-18 23:04:14 +00:00
|
|
|
- request_publication_approval:
|
2018-10-10 21:14:33 +00:00
|
|
|
type: approval
|
|
|
|
requires:
|
|
|
|
- test_deploy
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+.*/
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
2018-10-18 23:04:14 +00:00
|
|
|
- deploy:
|
|
|
|
context: "NuCypher PyPI"
|
|
|
|
requires:
|
|
|
|
- request_publication_approval
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: /v[0-9]+.*/
|
|
|
|
branches:
|
|
|
|
ignore: /.*/
|
2018-07-06 18:26:27 +00:00
|
|
|
|
2018-06-28 21:03:39 +00:00
|
|
|
python_35_base: &python_35_base
|
|
|
|
working_directory: ~/pyUmbral-35
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.5
|
|
|
|
|
|
|
|
python_36_base: &python_36_base
|
2018-06-21 07:53:19 +00:00
|
|
|
working_directory: ~/pyUmbral-36
|
2018-06-28 21:03:39 +00:00
|
|
|
docker:
|
2018-06-21 07:53:19 +00:00
|
|
|
- image: circleci/python:3.6
|
2018-08-29 13:42:42 +00:00
|
|
|
|
2018-07-06 18:26:27 +00:00
|
|
|
python_37_base: &python_37_base
|
|
|
|
working_directory: ~/pyUmbral-37
|
|
|
|
docker:
|
|
|
|
- image: circleci/python:3.7
|
2018-06-28 21:03:39 +00:00
|
|
|
|
|
|
|
jobs:
|
2018-07-06 18:26:27 +00:00
|
|
|
bundle_dependencies-35:
|
|
|
|
<<: *python_35_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install Python dependencies with Pipenv
|
2018-07-06 19:21:53 +00:00
|
|
|
command: pipenv sync --three --dev
|
2018-07-06 19:47:45 +00:00
|
|
|
- run:
|
|
|
|
name: Check PEP 508 Requirements
|
|
|
|
command: pipenv check
|
2018-07-06 18:26:27 +00:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- "~/.local/share/virtualenvs/"
|
2018-07-06 19:21:53 +00:00
|
|
|
key: v2-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py35
|
2018-08-29 13:42:42 +00:00
|
|
|
|
2018-06-28 21:03:39 +00:00
|
|
|
bundle_dependencies-36:
|
|
|
|
<<: *python_36_base
|
2018-06-21 07:53:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install Python dependencies with Pipenv
|
2018-07-06 19:21:53 +00:00
|
|
|
command: pipenv sync --three --dev
|
2018-07-06 19:47:45 +00:00
|
|
|
- run:
|
|
|
|
name: Check PEP 508 Requirements
|
|
|
|
command: pipenv check
|
2018-06-21 07:53:19 +00:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- "~/.local/share/virtualenvs/"
|
2018-07-06 19:21:53 +00:00
|
|
|
key: v2-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py36
|
2018-06-21 07:53:19 +00:00
|
|
|
|
2018-07-06 18:26:27 +00:00
|
|
|
bundle_dependencies-37:
|
|
|
|
<<: *python_37_base
|
2018-06-21 07:53:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install Python dependencies with Pipenv
|
2018-07-06 19:21:53 +00:00
|
|
|
command: pipenv sync --three --dev
|
2018-07-06 19:47:45 +00:00
|
|
|
- run:
|
|
|
|
name: Check PEP 508 Requirements
|
|
|
|
command: pipenv check
|
2018-06-21 07:53:19 +00:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- "~/.local/share/virtualenvs/"
|
2018-07-06 19:21:53 +00:00
|
|
|
key: v2-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py37
|
2018-08-29 13:42:42 +00:00
|
|
|
|
2018-07-06 18:26:27 +00:00
|
|
|
run_tests-35:
|
|
|
|
<<: *python_35_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-18 23:40:22 +00:00
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
2018-08-19 00:22:16 +00:00
|
|
|
command: |
|
|
|
|
pipenv sync --three --dev
|
|
|
|
pipenv install --dev pytest
|
2018-07-06 18:26:27 +00:00
|
|
|
- run:
|
|
|
|
name: pyUmbral Tests (Python 3.5)
|
2018-10-10 21:14:33 +00:00
|
|
|
command: pipenv run pytest --junitxml=./reports/pytest/python35-results.xml
|
2018-07-06 18:26:27 +00:00
|
|
|
- store_test_results:
|
|
|
|
path: /reports/pytest
|
|
|
|
- store_artifacts:
|
|
|
|
path: ./htmlcov
|
2018-06-21 07:53:19 +00:00
|
|
|
|
|
|
|
run_tests-36:
|
2018-06-28 21:03:39 +00:00
|
|
|
<<: *python_36_base
|
2018-06-21 07:53:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-18 23:40:22 +00:00
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: pipenv sync --three --dev
|
2018-06-21 07:53:19 +00:00
|
|
|
- run:
|
|
|
|
name: pyUmbral Tests (Python 3.6)
|
2018-06-25 19:28:36 +00:00
|
|
|
command: pipenv run pytest --cov=. --cov-report=html --junitxml=./reports/pytest/python36-results.xml
|
2018-06-21 07:53:19 +00:00
|
|
|
- store_test_results:
|
2018-06-25 19:28:36 +00:00
|
|
|
path: /reports/pytest
|
|
|
|
- store_artifacts:
|
|
|
|
path: ./htmlcov
|
2018-06-21 07:53:19 +00:00
|
|
|
|
2018-07-06 18:26:27 +00:00
|
|
|
run_tests-37:
|
|
|
|
<<: *python_37_base
|
2018-06-21 07:53:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-18 23:40:22 +00:00
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: pipenv sync --three --dev
|
2018-06-21 07:53:19 +00:00
|
|
|
- run:
|
2018-07-06 18:26:27 +00:00
|
|
|
name: pyUmbral Tests (Python 3.7)
|
|
|
|
command: pipenv run pytest --cov=. --cov-report=html --junitxml=./reports/pytest/python37-results.xml
|
2018-06-21 07:53:19 +00:00
|
|
|
- store_test_results:
|
2018-06-25 19:28:36 +00:00
|
|
|
path: /reports/pytest
|
|
|
|
- store_artifacts:
|
|
|
|
path: ./htmlcov
|
2018-06-21 21:26:12 +00:00
|
|
|
|
2018-07-06 19:21:53 +00:00
|
|
|
|
2018-06-28 21:03:39 +00:00
|
|
|
mypy_type_check-36:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-18 23:40:22 +00:00
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: pipenv sync --three --dev
|
2018-06-28 21:03:39 +00:00
|
|
|
- run:
|
2018-07-09 01:02:32 +00:00
|
|
|
name: Run Mypy Static Type Checks (Always Succeed)
|
2018-06-28 21:16:49 +00:00
|
|
|
command: |
|
|
|
|
pipenv install --dev --skip-lock lxml
|
2018-07-20 21:20:46 +00:00
|
|
|
pipenv run mypy --xslt-html-report ./mypy_report ./umbral --config-file=mypy.ini || true
|
2018-06-28 21:03:39 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: ./mypy_report
|
2018-06-26 00:46:47 +00:00
|
|
|
|
|
|
|
doctests-36:
|
2018-07-06 18:17:00 +00:00
|
|
|
<<: *python_36_base
|
2018-06-26 00:46:47 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-18 23:40:22 +00:00
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: pipenv sync --three --dev
|
2018-06-26 00:46:47 +00:00
|
|
|
- run:
|
|
|
|
name: Run Documentation Tests
|
|
|
|
command: |
|
2018-07-06 19:21:53 +00:00
|
|
|
pipenv install -e . --dev --skip-lock
|
2018-06-26 00:46:47 +00:00
|
|
|
cd docs
|
|
|
|
pipenv run make doctest
|
2018-06-26 16:11:48 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: ./docs/build/doctest/output.txt
|
2018-07-06 02:01:59 +00:00
|
|
|
|
2018-10-06 16:58:50 +00:00
|
|
|
notebook_tests-36:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: pipenv sync --three --dev
|
|
|
|
- run:
|
|
|
|
name: Run py.test on Jupyter Notebook stored output
|
|
|
|
command: |
|
|
|
|
pipenv install -e . --dev --skip-lock
|
|
|
|
pipenv run pytest --nbval docs/notebooks/pyUmbral\ Simple\ API.ipynb --junitxml=./reports/pytest/nbval-results.xml
|
|
|
|
- store_test_results:
|
|
|
|
path: /reports/pytest
|
|
|
|
|
2018-07-06 02:08:46 +00:00
|
|
|
reencryption_memory_profile-36:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-18 23:40:22 +00:00
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: pipenv sync --three --dev
|
2018-07-06 02:08:46 +00:00
|
|
|
- run:
|
|
|
|
name: Install Profiling Tools
|
|
|
|
command: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt install -y valgrind
|
|
|
|
sudo apt install -y massif-visualizer
|
|
|
|
- run:
|
|
|
|
name: Profile Re-Encryption Memory Usage
|
|
|
|
command: |
|
|
|
|
pipenv run valgrind --tool=massif --massif-out-file=./reencryption_memory_profile.massif.out python3 ./tests/metrics/reencryption_firehose.py
|
|
|
|
- store_artifacts:
|
|
|
|
path: ./reencryption_memory_profile.massif.out
|
|
|
|
|
2018-07-06 02:01:59 +00:00
|
|
|
reencryption_benchmark-36:
|
2018-07-06 02:08:46 +00:00
|
|
|
<<: *python_36_base
|
2018-07-06 02:01:59 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2018-08-18 23:40:22 +00:00
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: pipenv sync --three --dev
|
2018-07-06 02:01:59 +00:00
|
|
|
- run:
|
2018-07-06 02:08:46 +00:00
|
|
|
name: Benchmark Key Splitting and Reencryption
|
2018-07-06 02:01:59 +00:00
|
|
|
command: |
|
2018-07-06 20:21:28 +00:00
|
|
|
pipenv install -e . --dev --skip-lock
|
2018-07-06 02:08:46 +00:00
|
|
|
pipenv run pytest -v ./tests/metrics/reencryption_benchmark.py --junitxml=./reports/pytest/python36-results.xml --benchmark-verbose --benchmark-autosave --benchmark-histogram=./histograms/histogram
|
2018-07-06 02:01:59 +00:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
2018-07-06 02:08:46 +00:00
|
|
|
- "./.benchmarks"
|
2018-07-06 19:21:53 +00:00
|
|
|
key: v2-benchmarks-py36-{{ checksum "benchmarks" }}
|
2018-07-06 02:01:59 +00:00
|
|
|
- store_artifacts:
|
2018-07-06 18:17:00 +00:00
|
|
|
path: ./histograms
|
2018-07-06 02:01:59 +00:00
|
|
|
- store_test_results:
|
2018-07-06 18:17:00 +00:00
|
|
|
path: ./reports/pytest
|
2018-08-20 02:16:36 +00:00
|
|
|
|
2018-10-10 21:14:33 +00:00
|
|
|
test_deploy:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install Dependencies (Test Deploy)
|
|
|
|
command: |
|
|
|
|
pipenv sync --three --dev
|
|
|
|
pipenv install --dev --skip-lock twine
|
|
|
|
- run:
|
|
|
|
name: Verify git tag == __version__ (Test Deploy)
|
|
|
|
command: pipenv run python setup.py verify
|
|
|
|
- run:
|
|
|
|
name: Initialize .pypirc (Test Deploy)
|
|
|
|
command: |
|
2018-10-18 20:51:41 +00:00
|
|
|
echo -e "[distutils]" >> ~/.pypirc
|
|
|
|
echo -e "index-servers = " >> ~/.pypirc
|
|
|
|
echo -e " pypi" >> ~/.pypirc
|
|
|
|
echo -e " testpypi" >> ~/.pypirc
|
|
|
|
echo -e "" >> ~/.pypirc
|
|
|
|
echo -e "[testpypi]" >> ~/.pypirc
|
|
|
|
echo -e "repository: https://test.pypi.org/legacy/" >> ~/.pypirc
|
|
|
|
echo -e "username: $TEST_PYPI_USERNAME" >> ~/.pypirc
|
|
|
|
echo -e "password: $TEST_PYPI_PASSWORD" >> ~/.pypirc
|
2018-10-10 21:14:33 +00:00
|
|
|
- run:
|
|
|
|
name: Build Python Wheel (Test Deploy)
|
|
|
|
command: |
|
|
|
|
pipenv run python setup.py sdist
|
|
|
|
pipenv run python setup.py bdist_wheel
|
|
|
|
- run:
|
|
|
|
name: upload to TestPyPI
|
2018-10-18 22:31:44 +00:00
|
|
|
command: pipenv run twine upload --repository testpypi dist/* --verbose
|
2018-10-10 21:14:33 +00:00
|
|
|
- run:
|
|
|
|
name: pip install from TestPyPI
|
|
|
|
command: |
|
2018-10-18 22:31:44 +00:00
|
|
|
pip install --user --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple umbral --verbose
|
2018-10-10 21:14:33 +00:00
|
|
|
python -c "import umbral; print(umbral.__version__)"
|
|
|
|
|
2018-08-20 02:16:36 +00:00
|
|
|
deploy:
|
2018-08-21 21:32:26 +00:00
|
|
|
<<: *python_36_base
|
2018-08-20 02:16:36 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: pipenv sync --three --dev
|
|
|
|
- run:
|
2018-10-10 21:14:33 +00:00
|
|
|
name: Verify git tag == __version__
|
2018-08-20 02:16:36 +00:00
|
|
|
command: pipenv run python setup.py verify
|
|
|
|
- run:
|
2018-10-10 21:14:33 +00:00
|
|
|
name: Initialize .pypirc
|
2018-08-20 02:16:36 +00:00
|
|
|
command: |
|
|
|
|
echo -e "[pypi]" >> ~/.pypirc
|
|
|
|
echo -e "username = $PYPI_USERNAME" >> ~/.pypirc
|
|
|
|
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
|
|
|
|
- run:
|
2018-10-10 21:14:33 +00:00
|
|
|
name: Build Python Wheel
|
2018-08-20 02:16:36 +00:00
|
|
|
command: |
|
|
|
|
pipenv run python setup.py sdist
|
|
|
|
pipenv run python setup.py bdist_wheel
|
|
|
|
- run:
|
2018-10-10 21:14:33 +00:00
|
|
|
name: upload to PyPI
|
|
|
|
command: pipenv run twine upload dist/* --verbose
|
|
|
|
- run:
|
|
|
|
name: pip install from PyPI
|
|
|
|
command: |
|
2018-10-18 22:31:44 +00:00
|
|
|
pip install --user umbral --verbose
|
2018-10-10 21:14:33 +00:00
|
|
|
python -c "import umbral; print(umbral.__version__)"
|