diff --git a/.circleci/config.yml b/.circleci/config.yml index 4f22a0d8..28a4cfcd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,9 +15,12 @@ jobs: - restore_cache: keys: - v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} + - run: + name: Build libsnark + command: ./scripts/install_libsnark_prerequisites.sh - run: name: Build - command: ZOKRATES_HOME=$(pwd)/stdlib/ WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" ./build.sh + command: ZOKRATES_HOME=$(pwd)/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./build.sh - save_cache: paths: - /usr/local/cargo/registry @@ -42,12 +45,15 @@ jobs: - run: name: Check format command: rustup component add rustfmt-preview; cargo fmt --all -- --check + - run: + name: Build libsnark + command: ./scripts/install_libsnark_prerequisites.sh - run: name: Build - command: ZOKRATES_HOME=$(pwd)/stdlib/ WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" ./build.sh + command: ZOKRATES_HOME=$(pwd)/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./build.sh - run: name: Run tests - command: ZOKRATES_HOME=$(pwd)/stdlib/ WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" cargo test --release -- --test-threads=1 + command: ZOKRATES_HOME=$(pwd)/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" cargo test --release -- --test-threads=1 - run: name: Generate code coverage report command: ./scripts/cov.sh @@ -85,9 +91,12 @@ jobs: - restore_cache: keys: - v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }} + - run: + name: Build libsnark + command: ./scripts/install_libsnark_prerequisites.sh - run: name: Run integration tests - command: ZOKRATES_HOME=$(pwd)/stdlib/ WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" cargo test --release -- --ignored + command: ZOKRATES_HOME=$(pwd)/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" cargo test --release -- --ignored deploy: docker: - image: circleci/python