Skip to content

Commit

Permalink
Merge branch 'dev' into rescue_playground
Browse files Browse the repository at this point in the history
  • Loading branch information
dvush committed Apr 23, 2020
2 parents 896a117 + cd4d2b7 commit 76ec556
Show file tree
Hide file tree
Showing 68 changed files with 2,321 additions and 529 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*
!target/x86_64-unknown-linux-musl/release/server
!target/x86_64-unknown-linux-musl/release/server_supervisor
!target/x86_64-unknown-linux-musl/release/plonk_step_by_step_prover
!docker/prover/prover-entry.sh
!keys/packed
Expand Down
108 changes: 71 additions & 37 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ steps:
image: drillster/drone-volume-cache
settings:
mount:
- ./target/cargo
- ./target/rust-ci-cache
- ./keys/setup
restore: true
volumes:
Expand All @@ -27,7 +27,6 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- ci-prepare-env.sh
- zksync dummy-prover ensure-disabled
- zksync env ci
Expand All @@ -36,36 +35,63 @@ steps:
- zksync db-setup
- zksync plonk-setup check || zksync plonk-setup download
- zksync verify-keys unpack
- zksync dummy-prover ensure-disabled
depends_on:
- restore-cache

- name: rust-checks
image: matterlabs/ci
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- cargo fmt -- --check
- f cargo clippy --tests --benches -- -D warnings
depends_on:
- init

- name: rust-build
image: matterlabs/ci
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- f cargo build --release --all-targets
- f cargo test --release --all-targets --no-run
- f cargo test --release -p prover --no-run
- f cargo test --release -p circuit --no-run
- pushd core/storage
- f cargo test --release -p storage --features "db_test" --no-run
- popd
- sccache --show-stats
depends_on:
- init

- name: run-genesis
image: matterlabs/ci
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- zksync genesis
depends_on:
- init
- rust-build


- name: rust-tests-and-checks
- name: circuit-rust-tests
image: matterlabs/ci
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- cargo fmt -- --check
- f cargo clippy --tests --benches -- -D warnings
- zksync circuit-tests
depends_on:
- run-genesis

- name: non-circuit-rust-tests
image: matterlabs/ci
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- zksync prover-tests
- zksync db-test
- f cargo test --release
- pushd js/zksync-crypto
- f cargo test --release
- cargo fmt -- --check
- f cargo clippy --tests --benches -- -D warnings
- popd
depends_on:
- run-genesis

Expand All @@ -74,7 +100,6 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- zksync build-contracts
depends_on:
- init
Expand All @@ -84,7 +109,6 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- zksync redeploy
- zksync integration-testkit
depends_on:
Expand All @@ -96,7 +120,6 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- zksync test-contracts
depends_on:
- build-contracts
Expand All @@ -105,15 +128,16 @@ steps:
image: drillster/drone-volume-cache
settings:
mount:
- ./target/cargo
- ./target/rust-ci-cache
- ./keys/setup
rebuild: true
volumes:
- name: cache
path: /cache
depends_on:
- redeploy-and-integration-testkit
- rust-tests-and-checks
- circuit-rust-tests
- non-circuit-rust-tests

services:
- name: geth
Expand Down Expand Up @@ -148,7 +172,7 @@ steps:
image: drillster/drone-volume-cache
settings:
mount:
- ./target/cargo
- ./target/rust-ci-cache
- ./keys/setup
restore: true
volumes:
Expand All @@ -160,20 +184,16 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- ci-prepare-env.sh
- zksync env ci
- zksync yarn
- zksync db-wait
- zksync db-setup
- zksync verify-keys unpack
- ssed -E "s/(.*constant DUMMY_VERIFIER)(.*)\;/\1 = true\;/" -i $ZKSYNC_HOME/contracts/contracts/Verifier.sol
- zksync build-contracts
- zksync db-reset
- zksync genesis
- zksync redeploy
- zksync dummy-prover enable
- f cargo build --release --bin server
- f cargo build --bin dummy_prover
- f cargo build --release --bin dummy_prover
depends_on:
- restore-cache

Expand All @@ -183,7 +203,6 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- zksync server
depends_on:
- preparations-for-integration-simple
Expand All @@ -194,7 +213,6 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- zksync dummy-prover
depends_on:
- preparations-for-integration-simple
Expand All @@ -204,7 +222,6 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- sleep 15
- zksync integration-simple
- zksync integration-full-exit
Expand Down Expand Up @@ -245,7 +262,7 @@ steps:
image: drillster/drone-volume-cache
settings:
mount:
- ./target/cargo
- ./target/rust-ci-cache
- ./keys/setup
restore: true
volumes:
Expand All @@ -258,7 +275,6 @@ steps:
- git checkout ${DRONE_COMMIT_SHA}
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- echo -n $STAGE_ENV_BASE64| base64 --decode > $ZKSYNC_HOME/etc/env/stage.env
- zksync env stage
- zksync yarn
Expand All @@ -276,7 +292,6 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- export CARGO_HOME=$ZKSYNC_HOME/target/cargo
- zksync env stage
- zksync yarn
- zksync dist-client > /dev/null
Expand Down Expand Up @@ -320,6 +335,25 @@ steps:
depends_on:
- init

- name: server-supervisor-image-publish
image: docker
commands:
- docker login -u $USERNAME -p $PASSWORD
- docker build -t $REPO:${DRONE_COMMIT_SHA:0:8} -f $DOCKERFILE .
- docker push $REPO:${DRONE_COMMIT_SHA:0:8}
environment:
DOCKERFILE: ./docker/server_supervisor/Dockerfile
PASSWORD:
from_secret: docker_password
REPO: matterlabs/server_supervisor
USERNAME:
from_secret: docker_username
volumes:
- name: docker-sock
path: /var/run/docker.sock
depends_on:
- build-rust

- name: server-image-publish
image: docker
commands:
Expand Down Expand Up @@ -423,7 +457,7 @@ steps:
- docker pull matterlabs/nginx:${DRONE_COMMIT_SHA:0:8}
environment:
ENV_BASE64:
from_secret: testnet_env_base64
from_secret: ${ZKSYNC_ENV}_env_base64
PASSWORD:
from_secret: docker_password
USERNAME:
Expand All @@ -437,18 +471,18 @@ steps:
commands:
- export ZKSYNC_HOME=`pwd`
- export PATH=$ZKSYNC_HOME/bin:$PATH
- echo -n $ENV_BASE64 | base64 --decode > $ZKSYNC_HOME/etc/env/testnet.env
- zksync env testnet
- echo -n $ENV_BASE64 | base64 --decode > $ZKSYNC_HOME/etc/env/${ZKSYNC_ENV}.env
- zksync env ${ZKSYNC_ENV}
- echo -n $KUBECONFIG_BASE64 | base64 --decode > `pwd`/kubeconfig.yaml
- python3 $ZKSYNC_HOME/bin/replace-env-variable.py $ZKSYNC_HOME/etc/env/testnet.env KUBECONFIG=`pwd`/kubeconfig.yaml
- python3 $ZKSYNC_HOME/bin/replace-env-variable.py $ZKSYNC_HOME/etc/env/${ZKSYNC_ENV}.env KUBECONFIG=`pwd`/kubeconfig.yaml
- zksync db-migrate
- zksync apply-kubeconfig
- zksync restart
environment:
ENV_BASE64:
from_secret: testnet_env_base64
from_secret: ${ZKSYNC_ENV}_env_base64
KUBECONFIG_BASE64:
from_secret: testnet_kubeconfig_base64
from_secret: ${ZKSYNC_ENV}_kubeconfig_base64

volumes:
- name: docker-sock
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# notify about any circuit, prover and server changes
/core/circuit/ @alexander-movchan @gluk64
/core/prover/ @furkhat
/core @dvush
/core @dvush @popzxc

# dev tools
/bin @dvush
Expand Down
Loading

0 comments on commit 76ec556

Please sign in to comment.