update ci images
This commit is contained in:
parent
079b5cfa95
commit
010998d791
3 changed files with 64 additions and 22 deletions
|
@ -3,7 +3,7 @@ version: 2
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
docker:
|
docker:
|
||||||
- image: rustlang/rust:nightly-slim
|
- image: dark64/zokrates-env:latest
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
|
@ -15,9 +15,6 @@ jobs:
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
||||||
- run:
|
|
||||||
name: Install libsnark prerequisites
|
|
||||||
command: ./scripts/install_libsnark_prerequisites.sh
|
|
||||||
- run:
|
- run:
|
||||||
name: Build
|
name: Build
|
||||||
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./build.sh
|
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./build.sh
|
||||||
|
@ -30,7 +27,7 @@ jobs:
|
||||||
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
key: v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
||||||
test:
|
test:
|
||||||
docker:
|
docker:
|
||||||
- image: rustlang/rust:nightly-slim
|
- image: dark64/zokrates-env:latest
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
|
@ -45,9 +42,6 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: Check format if rustfmt is available
|
name: Check format if rustfmt is available
|
||||||
command: "! rustup component add rustfmt || cargo fmt --all -- --check"
|
command: "! rustup component add rustfmt || cargo fmt --all -- --check"
|
||||||
- run:
|
|
||||||
name: Install libsnark prerequisites
|
|
||||||
command: ./scripts/install_libsnark_prerequisites.sh
|
|
||||||
- run:
|
- run:
|
||||||
name: Build
|
name: Build
|
||||||
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./build.sh
|
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./build.sh
|
||||||
|
@ -59,7 +53,7 @@ jobs:
|
||||||
# command: ./scripts/cov.sh
|
# command: ./scripts/cov.sh
|
||||||
cpp_format:
|
cpp_format:
|
||||||
docker:
|
docker:
|
||||||
- image: dark64/clang-format-checker:env
|
- image: dark64/zokrates-env:latest
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
|
@ -67,7 +61,7 @@ jobs:
|
||||||
command: run-clang-format.py -r $(pwd)/zokrates_core/lib
|
command: run-clang-format.py -r $(pwd)/zokrates_core/lib
|
||||||
wasm_test:
|
wasm_test:
|
||||||
docker:
|
docker:
|
||||||
- image: rustlang/rust:nightly-slim
|
- image: dark64/zokrates-env:latest
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
|
@ -79,15 +73,12 @@ jobs:
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
||||||
- run:
|
|
||||||
name: Install wasm testing env
|
|
||||||
command: ./scripts/install_wasm_testing.sh
|
|
||||||
- run:
|
- run:
|
||||||
name: Test on firefox
|
name: Test on firefox
|
||||||
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ cd zokrates_core && wasm-pack test --firefox --headless -- --features wasm
|
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ cd zokrates_core && wasm-pack test --firefox --headless -- --features wasm
|
||||||
integration_test:
|
integration_test:
|
||||||
docker:
|
docker:
|
||||||
- image: rustlang/rust:nightly-slim
|
- image: dark64/zokrates-env:latest
|
||||||
- image: trufflesuite/ganache-cli:next
|
- image: trufflesuite/ganache-cli:next
|
||||||
port: 8545:8545
|
port: 8545:8545
|
||||||
steps:
|
steps:
|
||||||
|
@ -101,12 +92,6 @@ jobs:
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
keys:
|
keys:
|
||||||
- v4-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
|
- 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:
|
- run:
|
||||||
name: Run integration tests
|
name: Run integration tests
|
||||||
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./full_test.sh
|
command: ZOKRATES_HOME=$(pwd)/zokrates_stdlib/stdlib/ WITH_LIBSNARK=1 RUSTFLAGS="-D warnings" ./full_test.sh
|
||||||
|
@ -122,7 +107,7 @@ jobs:
|
||||||
command: ./scripts/release.sh
|
command: ./scripts/release.sh
|
||||||
zokrates_js_build:
|
zokrates_js_build:
|
||||||
docker:
|
docker:
|
||||||
- image: dark64/rust-wasm-env:latest
|
- image: dark64/zokrates-env:latest
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
|
@ -130,7 +115,7 @@ jobs:
|
||||||
command: cd zokrates_js && npm run build
|
command: cd zokrates_js && npm run build
|
||||||
zokrates_js_test:
|
zokrates_js_test:
|
||||||
docker:
|
docker:
|
||||||
- image: dark64/rust-wasm-env:latest
|
- image: dark64/zokrates-env:latest
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run:
|
- run:
|
||||||
|
|
11
.clang-format
Normal file
11
.clang-format
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
Language: Cpp
|
||||||
|
BasedOnStyle: WebKit
|
||||||
|
|
||||||
|
AllowShortCaseLabelsOnASingleLine: true
|
||||||
|
AllowShortFunctionsOnASingleLine: true
|
||||||
|
AlwaysBreakTemplateDeclarations: true
|
||||||
|
BinPackArguments: false
|
||||||
|
BinPackParameters: false
|
||||||
|
# make adding new members at the end less noisy in diffs
|
||||||
|
BreakConstructorInitializersBeforeComma: true
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: true
|
46
Dockerfile.env
Normal file
46
Dockerfile.env
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
FROM ubuntu:18.04
|
||||||
|
SHELL ["/bin/bash", "-c"]
|
||||||
|
|
||||||
|
ARG RUST_TOOLCHAIN=nightly-2020-08-05
|
||||||
|
|
||||||
|
ENV RUSTUP_HOME=/usr/local/rustup \
|
||||||
|
CARGO_HOME=/usr/local/cargo \
|
||||||
|
PATH=/usr/local/cargo/bin:$PATH
|
||||||
|
|
||||||
|
# Install prerequisites
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
build-essential \
|
||||||
|
software-properties-common \
|
||||||
|
cmake \
|
||||||
|
gnupg \
|
||||||
|
libboost-dev \
|
||||||
|
libboost-program-options-dev \
|
||||||
|
libgmp3-dev \
|
||||||
|
libprocps-dev \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config \
|
||||||
|
clang-format \
|
||||||
|
python3 \
|
||||||
|
python-markdown \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN add-apt-repository ppa:jonathonf/firefox-esr; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y firefox-esr
|
||||||
|
|
||||||
|
RUN curl -sL https://raw.githubusercontent.com/Sarcasm/run-clang-format/master/run-clang-format.py > /opt/run-clang-format.py \
|
||||||
|
&& ln -s /opt/run-clang-format.py /usr/bin
|
||||||
|
|
||||||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain $RUST_TOOLCHAIN -y; \
|
||||||
|
rustup --version; \
|
||||||
|
cargo --version; \
|
||||||
|
rustc --version;
|
||||||
|
|
||||||
|
RUN cargo install --git https://github.com/rustwasm/wasm-pack; \
|
||||||
|
wasm-pack --version;
|
||||||
|
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_lts.x | bash -; \
|
||||||
|
apt-get install -y nodejs; echo nodejs $(node -v); \
|
||||||
|
npm i -g solc;
|
Loading…
Reference in a new issue