diff --git a/circle.yml b/circle.yml index d22512498..45705d164 100644 --- a/circle.yml +++ b/circle.yml @@ -512,6 +512,50 @@ jobs: - spectest - collect_coverage_data + bindings-rust: + docker: + - image: rust:1 + steps: + - checkout + - run: + name: Update environment + command: | + apt update + apt -y install libclang-dev clang + rustup component add rustfmt + rustup update + - run: + name: Check formatting + command: | + rustfmt --version + cargo fmt --all -- --check + - run: + name: Build + command: cargo build + - run: + name: Test + command: cargo test + + bindings-rust-asan-combined: + docker: + - image: rust:1-buster + steps: + - checkout + - run: + name: Update environment + command: | + echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list + apt -qq update + apt -yq install llvm-8-dev clang-8 --no-install-recommends + rustup toolchain install nightly-x86_64-unknown-linux-gnu + rustup update + - run: + name: Build + command: RUSTFLAGS="-Z sanitizer=address" ASAN_OPTIONS=detect_leaks=1 cargo +nightly build --target x86_64-unknown-linux-gnu + - run: + name: Test + command: RUSTFLAGS="-Z sanitizer=address -C opt-level=0" ASAN_OPTIONS=detect_leaks=1 cargo +nightly test --target x86_64-unknown-linux-gnu + workflows: version: 2 @@ -537,6 +581,12 @@ workflows: - spectest: requires: - coverage-clang + - bindings-rust: + requires: + - sanitizers + - bindings-rust-asan-combined: + requires: + - bindings-rust benchmarking: when: <>