Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Synapse into dev requirements #3172

Merged
merged 8 commits into from
Jan 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 18 additions & 66 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ templates:
description: "resource type for underlying VM"
default: "medium"
type: enum
enum: ["small", "medium", "large", "xlarge"]
enum: ["small", "medium", "medium+", "large", "xlarge"]
ulope marked this conversation as resolved.
Show resolved Hide resolved
transport-layer:
description: "transmission protocol used, udp or matrix"
default: "udp"
Expand All @@ -36,7 +36,7 @@ executors:
description: "resource type for underlying VM"
default: "medium"
type: enum
enum: ["small", "medium", "large", "xlarge"]
enum: ["small", "medium", "medium+", "large", "xlarge"]
working_directory: ~/raiden
docker:
- image: circleci/python:<< parameters.py-version >>
Expand Down Expand Up @@ -121,28 +121,6 @@ jobs:
- .local
- raiden

build-synapse:
executor:
name: base-executor
py-version: "2.7"
steps:
- attach_workspace:
at: '~'
- restore_cache:
key: synapse-cache-{{ checksum "~/raiden/tools/install_synapse.sh" }}
- run:
name: installing synapse
command: |
tools/install_synapse.sh
- save_cache:
key: synapse-cache-{{ checksum "~/raiden/tools/install_synapse.sh" }}
paths:
- ~/raiden/.synapse
- persist_to_workspace:
root: '~'
paths:
- raiden/.synapse/

prepare-python:
parameters:
py-version:
Expand Down Expand Up @@ -283,6 +261,8 @@ jobs:
BLOCKCHAIN_TYPE_ARG: "--blockchain-type=<< parameters.blockchain-type >>"
TRANSPORT_OPTION: << parameters.transport-layer >>
TRANSPORT_OPTION_ARG: "--transport=<< parameters.transport-layer >>"
RAIDEN_TESTS_SYNAPSE_BASE_DIR: /home/circleci/.cache/synapse
RAIDEN_TESTS_SYNAPSE_LOGS_DIR: /tmp/synapse-logs

parallelism: << parameters.parallelism >>

Expand All @@ -292,6 +272,10 @@ jobs:
- config-path
- restore_cache:
key: ethash-{{ checksum "~/.local/bin/geth" }}
- restore_cache:
keys:
- synapse-keys-v1
- synapse-keys-
- run:
name: Running tests
#coverage run -m pytest \
Expand All @@ -313,11 +297,21 @@ jobs:
paths:
- "~/.ethash"

- save_cache:
key: synapse-keys-v1
paths:
- "~/.cache/synapse"

- store_test_results:
path: test-reports

- store_artifacts:
path: test-reports
destination: test-reports

- store_artifacts:
path: /tmp/synapse-logs
destination: synapse-logs

finalize:
executor:
Expand Down Expand Up @@ -415,10 +409,6 @@ workflows:
jobs:
- prepare-system

- build-synapse:
requires:
- prepare-system

- prepare-python:
name: prepare-python-3.6
py-version: '3.6'
Expand All @@ -442,11 +432,6 @@ workflows:
py-version: "3.6"
requires:
- prepare-python-3.6
filters:
tags:
only: /^v\d+\.\d+\.\d+$/
branches:
only: /.*/

- smoketest:
name: smoketest-udp-3.6
Expand All @@ -459,10 +444,8 @@ workflows:
name: smoketest-matrix-3.6
py-version: "3.6"
transport-layer: "matrix"
additional-args: "--local-matrix='~/raiden/.synapse/run_synapse.sh'"
requires:
- prepare-python-3.6
- build-synapse

- test:
name: test-unit-3.6
Expand All @@ -471,7 +454,6 @@ workflows:
blockchain-type: "geth"
requires:
- prepare-python-3.6
- build-synapse

- finalize:
requires:
Expand All @@ -489,7 +471,6 @@ workflows:
- test:
name: test-integration-udp-3.6
py-version: "3.6"
resource: "large"
test-type: "integration"
blockchain-type: "geth"
transport-layer: "udp"
Expand All @@ -500,11 +481,9 @@ workflows:
- test:
name: test-integration-matrix-3.6
py-version: "3.6"
resource: "large"
test-type: "integration"
blockchain-type: "geth"
transport-layer: "matrix"
additional-args: "--local-matrix='~/raiden/.synapse/run_synapse.sh'"
parallelism: 16
requires:
- smoketest-matrix-3.6
Expand All @@ -520,11 +499,6 @@ workflows:
py-version: "3.7"
requires:
- prepare-python-3.7
filters:
tags:
only: /^v\d+\.\d+\.\d+$/
branches:
only: /.*/

- smoketest:
name: smoketest-udp-3.7
Expand All @@ -537,10 +511,8 @@ workflows:
name: smoketest-matrix-3.7
py-version: "3.7"
transport-layer: "matrix"
additional-args: "--local-matrix='~/raiden/.synapse/run_synapse.sh'"
requires:
- prepare-python-3.7
- build-synapse

- test:
name: test-unit-3.7
Expand All @@ -549,11 +521,9 @@ workflows:
blockchain-type: "geth"
requires:
- prepare-python-3.7
- build-synapse

- test:
name: test-integration-udp-3.7
resource: "large"
py-version: "3.7"
test-type: "integration"
blockchain-type: "geth"
Expand All @@ -565,11 +535,9 @@ workflows:
- test:
name: test-integration-matrix-3.7
py-version: "3.7"
resource: "large"
test-type: "integration"
blockchain-type: "geth"
transport-layer: "matrix"
additional-args: "--local-matrix='~/raiden/.synapse/run_synapse.sh'"
parallelism: 16
requires:
- smoketest-matrix-3.7
Expand Down Expand Up @@ -621,10 +589,6 @@ workflows:
jobs:
- prepare-system

- build-synapse:
requires:
- prepare-system

- prepare-python:
name: prepare-python-3.6
py-version: '3.6'
Expand Down Expand Up @@ -660,10 +624,8 @@ workflows:
name: smoketest-matrix-3.6
py-version: "3.6"
transport-layer: "matrix"
additional-args: "--local-matrix='~/raiden/.synapse/run_synapse.sh'"
requires:
- prepare-python-3.6
- build-synapse

- test:
name: test-unit-3.6
Expand All @@ -672,7 +634,6 @@ workflows:
blockchain-type: "geth"
requires:
- prepare-python-3.6
- build-synapse

- finalize:
requires:
Expand All @@ -690,7 +651,6 @@ workflows:
- test:
name: test-integration-udp-3.6
py-version: "3.6"
resource: "large"
test-type: "integration"
blockchain-type: "geth"
transport-layer: "udp"
Expand All @@ -701,11 +661,9 @@ workflows:
- test:
name: test-integration-matrix-3.6
py-version: "3.6"
resource: "large"
test-type: "integration"
blockchain-type: "geth"
transport-layer: "matrix"
additional-args: "--local-matrix='~/raiden/.synapse/run_synapse.sh'"
parallelism: 16
requires:
- smoketest-matrix-3.6
Expand Down Expand Up @@ -733,10 +691,8 @@ workflows:
name: smoketest-matrix-3.7
py-version: "3.7"
transport-layer: "matrix"
additional-args: "--local-matrix='~/raiden/.synapse/run_synapse.sh'"
requires:
- prepare-python-3.7
- build-synapse

- test:
name: test-unit-3.7
Expand All @@ -745,12 +701,10 @@ workflows:
blockchain-type: "geth"
requires:
- prepare-python-3.7
- build-synapse

- test:
name: test-integration-udp-3.7
py-version: "3.7"
resource: "large"
test-type: "integration"
blockchain-type: "geth"
transport-layer: "udp"
Expand All @@ -761,11 +715,9 @@ workflows:
- test:
name: test-integration-matrix-3.7
py-version: "3.7"
resource: "large"
test-type: "integration"
blockchain-type: "geth"
transport-layer: "matrix"
additional-args: "--local-matrix='~/raiden/.synapse/run_synapse.sh'"
parallelism: 16
requires:
- smoketest-matrix-3.7
Expand Down
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ jobs:
if: (type = cron OR NOT commit_message =~ /\[ci / OR commit_message =~ /\[ci integration-general\]/)
env:
- TEST='raiden/tests/integration --ignore=raiden/tests/integration/transfer --ignore=raiden/tests/integration/long_running --ignore=raiden/tests/integration/api --ignore=raiden/tests/integration/contracts --ignore=raiden/tests/integration/cli'
- TRANSPORT_OPTIONS='--transport=matrix --local-matrix=${HOME}/.bin/run_synapse.sh'
- TRANSPORT_OPTIONS='--transport=matrix'
- RUN_SYNAPSE=1

- stage: integration
Expand All @@ -117,7 +117,7 @@ jobs:
if: (type = cron OR NOT commit_message =~ /\[ci / OR commit_message =~ /\[ci integration-transfer\]/)
env:
- TEST='raiden/tests/integration/transfer'
- TRANSPORT_OPTIONS='--transport=matrix --local-matrix=${HOME}/.bin/run_synapse.sh'
- TRANSPORT_OPTIONS='--transport=matrix'
- RUN_SYNAPSE=1

- stage: integration
Expand All @@ -133,7 +133,7 @@ jobs:
if: (type = cron OR NOT commit_message =~ /\[ci / OR commit_message =~ /\[ci integration-long-running\]/)
env:
- TEST='raiden/tests/integration/long_running'
- TRANSPORT_OPTIONS='--transport=matrix --local-matrix=${HOME}/.bin/run_synapse.sh'
- TRANSPORT_OPTIONS='--transport=matrix'
- RUN_SYNAPSE=1
- RUN_COVERAGE=no_coverage

Expand All @@ -155,15 +155,15 @@ jobs:
if: (type = cron OR NOT commit_message =~ /\[ci / OR commit_message =~ /\[ci integration-api\]/)
env:
- TEST='raiden/tests/integration/api'
- TRANSPORT_OPTIONS='--transport=matrix --local-matrix=${HOME}/.bin/run_synapse.sh'
- TRANSPORT_OPTIONS='--transport=matrix'
- RUN_SYNAPSE=1

- stage: integration
<<: *job-template-integration
if: (type = cron OR NOT commit_message =~ /\[ci / OR commit_message =~ /\[ci integration-cli\]/)
env:
- TEST='raiden/tests/integration/cli'
- TRANSPORT_OPTIONS='--transport=matrix --local-matrix=${HOME}/.bin/run_synapse.sh'
- TRANSPORT_OPTIONS='--transport=matrix'
- RUN_SYNAPSE=1

- stage: deploy
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
# pdbpp interferes with pyinstaller, uninstall it
- pip uninstall -y pdbpp
before_script:
- python setup.py build
- python setup.py build
script:
- source .travis/set_tag.sh
- mkdir -p dist/archive
Expand Down
4 changes: 0 additions & 4 deletions .travis/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ set -x

.travis/download_solc.sh
.travis/download_geth.sh

if [ "$RUN_SYNAPSE" ]; then
tools/install_synapse.sh
fi
2 changes: 1 addition & 1 deletion .travis/run_smoketest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ set -x
if [[ -z ${RUN_SYNAPSE} ]]; then
raiden --transport=udp smoketest
else
raiden --transport=matrix smoketest --local-matrix="${HOME}/.bin/run_synapse.sh"
raiden --transport=matrix smoketest
fi
Loading