
* add firefox testing. wip * fix config * use crates bellman * install curl * move wasm install test install script to sh * make sh executable * remove firefox as its suppose to be there already * confirm install.. * seems like firefox isnt there after all * firefox-esr * use fixed bellman * revert backend api change, only touch env outside wasm * fix typo in cfg flag
160 lines
4.9 KiB
YAML
160 lines
4.9 KiB
YAML
version: 2
|
|
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: rustlang/rust:nightly-slim
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Version information
|
|
command: rustc --version; cargo --version; rustup --version
|
|
- run:
|
|
name: Calculate dependencies
|
|
command: cargo generate-lockfile
|
|
- restore_cache:
|
|
keys:
|
|
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
|
- run:
|
|
name: Install libsnark prerequisites
|
|
command: ./scripts/install_libsnark_prerequisites.sh
|
|
- run:
|
|
name: Build
|
|
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./build.sh
|
|
- save_cache:
|
|
paths:
|
|
- /usr/local/cargo/registry
|
|
- target/debug/.fingerprint
|
|
- target/debug/build
|
|
- target/debug/deps
|
|
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
|
test:
|
|
docker:
|
|
- image: rustlang/rust:nightly-slim
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Version information
|
|
command: rustc --version; cargo --version; rustup --version
|
|
- run:
|
|
name: Calculate dependencies
|
|
command: cargo generate-lockfile
|
|
- restore_cache:
|
|
keys:
|
|
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
|
- run:
|
|
name: Check format
|
|
command: rustup component add rustfmt; cargo fmt --all -- --check
|
|
- run:
|
|
name: Install libsnark prerequisites
|
|
command: ./scripts/install_libsnark_prerequisites.sh
|
|
- run:
|
|
name: Build
|
|
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./build.sh
|
|
- run:
|
|
name: Run tests
|
|
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./test.sh
|
|
# - run:
|
|
# name: Generate code coverage report
|
|
# command: ./scripts/cov.sh
|
|
wasm_test:
|
|
docker:
|
|
- image: rustlang/rust:nightly-slim
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Version information
|
|
command: rustc --version; cargo --version; rustup --version
|
|
- run:
|
|
name: Calculate dependencies
|
|
command: cargo generate-lockfile
|
|
- restore_cache:
|
|
keys:
|
|
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
|
- run:
|
|
name: Install wasm testing env
|
|
command: ./scripts/install_wasm_testing.sh
|
|
- run:
|
|
name: Test on firefox
|
|
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ cd zokrates_core && wasm-pack test --firefox --headless -- --features wasm
|
|
wasm_solvers_test:
|
|
docker:
|
|
- image: rustlang/rust:nightly-slim
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Version information
|
|
command: rustc --version; cargo --version; rustup --version
|
|
- run:
|
|
name: Calculate dependencies
|
|
command: cargo generate-lockfile
|
|
- restore_cache:
|
|
keys:
|
|
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
|
- run:
|
|
name: Download wasm32 target
|
|
command: rustup target add wasm32-unknown-unknown
|
|
- run:
|
|
name: Install libsnark prerequisites
|
|
command: ./scripts/install_libsnark_prerequisites.sh
|
|
- run:
|
|
name: Run tests with WASM enabled
|
|
command: cd zokrates_core && cargo test --release --features wasm_solvers -- --test-threads=1
|
|
integration_test:
|
|
docker:
|
|
- image: rustlang/rust:nightly-slim
|
|
- image: trufflesuite/ganache-cli:next
|
|
port: 8545:8545
|
|
steps:
|
|
- checkout
|
|
- run:
|
|
name: Version information
|
|
command: rustc --version; cargo --version; rustup --version
|
|
- run:
|
|
name: Calculate dependencies
|
|
command: cargo generate-lockfile
|
|
- restore_cache:
|
|
keys:
|
|
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
|
- run:
|
|
name: Install libsnark prerequisites
|
|
command: ./scripts/install_libsnark_prerequisites.sh
|
|
- run:
|
|
name: Install solcjs
|
|
command: ./scripts/install_solcjs_deb.sh
|
|
- run:
|
|
name: Run integration tests
|
|
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./full_test.sh
|
|
deploy:
|
|
docker:
|
|
- image: circleci/python
|
|
steps:
|
|
- checkout
|
|
- setup_remote_docker:
|
|
docker_layer_caching: true
|
|
- run:
|
|
name: Release
|
|
command: ./scripts/release.sh
|
|
|
|
workflows:
|
|
version: 2
|
|
build-test-and-deploy:
|
|
jobs:
|
|
- build
|
|
- test
|
|
- wasm_solvers_test
|
|
- wasm_test
|
|
- integration_test
|
|
- deploy:
|
|
filters:
|
|
branches:
|
|
only:
|
|
- master
|
|
requires:
|
|
- build
|
|
- test
|
|
- wasm_solvers_test
|
|
- wasm_test
|
|
- integration_test
|
|
|
|
|