2018-06-21 07:53:19 +00:00
|
|
|
version: 2.0
|
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
test:
|
|
|
|
jobs:
|
|
|
|
- bundle_dependencies-35
|
2018-07-06 18:26:27 +00:00
|
|
|
- bundle_dependencies-36
|
|
|
|
- bundle_dependencies-37
|
|
|
|
- run_tests-35:
|
|
|
|
requires:
|
|
|
|
- bundle_dependencies-35
|
2018-06-21 07:53:19 +00:00
|
|
|
- run_tests-36:
|
|
|
|
requires:
|
|
|
|
- bundle_dependencies-36
|
2018-07-06 18:26:27 +00:00
|
|
|
- run_tests-37:
|
2018-06-21 07:53:19 +00:00
|
|
|
requires:
|
2018-07-06 18:26:27 +00:00
|
|
|
- bundle_dependencies-37
|
2018-07-06 02:08:46 +00:00
|
|
|
- mypy_type_check-36:
|
2018-06-21 21:26:12 +00:00
|
|
|
requires:
|
|
|
|
- run_tests-35
|
|
|
|
- run_tests-36
|
2018-07-06 18:26:27 +00:00
|
|
|
- run_tests-37
|
2018-06-26 00:46:47 +00:00
|
|
|
- doctests-36:
|
|
|
|
requires:
|
|
|
|
- run_tests-35
|
|
|
|
- run_tests-36
|
2018-07-06 18:26:27 +00:00
|
|
|
- run_tests-37
|
2018-07-06 02:08:46 +00:00
|
|
|
- reencryption_memory_profile-36:
|
|
|
|
requires:
|
|
|
|
- run_tests-35
|
|
|
|
- run_tests-36
|
2018-07-06 18:26:27 +00:00
|
|
|
- run_tests-37
|
2018-07-06 02:08:46 +00:00
|
|
|
- reencryption_benchmark-36:
|
|
|
|
requires:
|
|
|
|
- run_tests-35
|
|
|
|
- run_tests-36
|
2018-07-06 18:26:27 +00:00
|
|
|
- run_tests-37
|
|
|
|
|
2018-06-26 00:46:47 +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-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
|
|
|
|
- restore_cache:
|
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py35
|
|
|
|
- run:
|
|
|
|
name: Check PEP 508 Requirements
|
|
|
|
command: pipenv check
|
|
|
|
- run:
|
|
|
|
name: Install Python dependencies with Pipenv
|
|
|
|
command: pipenv install --three --dev
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- "~/.local/share/virtualenvs/"
|
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py35
|
|
|
|
|
2018-06-28 21:03:39 +00:00
|
|
|
bundle_dependencies-36:
|
|
|
|
<<: *python_36_base
|
2018-06-21 07:53:19 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
2018-07-06 18:26:27 +00:00
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py36
|
|
|
|
- run:
|
|
|
|
name: Check PEP 508 Requirements
|
|
|
|
command: pipenv check
|
2018-06-21 07:53:19 +00:00
|
|
|
- run:
|
|
|
|
name: Install Python dependencies with Pipenv
|
|
|
|
command: pipenv install --three --dev
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- "~/.local/share/virtualenvs/"
|
2018-07-06 18:26:27 +00:00
|
|
|
key: v1-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
|
|
|
|
- restore_cache:
|
2018-07-06 18:26:27 +00:00
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py37
|
|
|
|
- run:
|
|
|
|
name: Check PEP 508 Requirements
|
|
|
|
command: pipenv check
|
2018-06-21 07:53:19 +00:00
|
|
|
- run:
|
|
|
|
name: Install Python dependencies with Pipenv
|
|
|
|
command: pipenv install --three --dev
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- "~/.local/share/virtualenvs/"
|
2018-07-06 18:26:27 +00:00
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py37
|
|
|
|
|
|
|
|
run_tests-35:
|
|
|
|
<<: *python_35_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py35
|
|
|
|
- run:
|
|
|
|
name: pyUmbral Tests (Python 3.5)
|
|
|
|
command: pipenv run pytest --cov=. --cov-report=html --junitxml=./reports/pytest/python35-results.xml
|
|
|
|
- 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
|
|
|
|
- restore_cache:
|
2018-07-06 18:26:27 +00:00
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py36
|
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
|
|
|
|
- restore_cache:
|
2018-07-06 18:26:27 +00:00
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py37
|
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-06-28 21:03:39 +00:00
|
|
|
mypy_type_check-36:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
2018-07-06 18:26:27 +00:00
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py36
|
2018-06-28 21:03:39 +00:00
|
|
|
- run:
|
|
|
|
name: Run Mypy Static Type Checks
|
2018-06-28 21:16:49 +00:00
|
|
|
command: |
|
|
|
|
pipenv install --dev --skip-lock lxml
|
2018-06-28 23:13:25 +00:00
|
|
|
pipenv run mypy --xslt-html-report ./mypy_report ./umbral --config-file=mypy.ini
|
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
|
|
|
|
- restore_cache:
|
2018-07-06 18:26:27 +00:00
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile.lock" }}-py36
|
2018-06-26 00:46:47 +00:00
|
|
|
- run:
|
|
|
|
name: Run Documentation Tests
|
|
|
|
command: |
|
|
|
|
pipenv install -e . --skip-lock
|
|
|
|
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-07-06 02:08:46 +00:00
|
|
|
reencryption_memory_profile-36:
|
|
|
|
<<: *python_36_base
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- restore_cache:
|
|
|
|
key: v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}-py36
|
|
|
|
- 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
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- v1-deps-{{ .Environment.CIRCLE_WORKFLOW_ID }}-{{ checksum "Pipfile" }}-py36
|
|
|
|
- v1-benchmarks-py36
|
|
|
|
- run:
|
2018-07-06 02:08:46 +00:00
|
|
|
name: Benchmark Key Splitting and Reencryption
|
2018-07-06 02:01:59 +00:00
|
|
|
command: |
|
|
|
|
pipenv install -e . --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 18:17:00 +00:00
|
|
|
key: v1-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
|