Skip to content

Commit

Permalink
ci: add rust bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Sep 30, 2020
1 parent 08623b4 commit 42e499c
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -537,6 +581,12 @@ workflows:
- spectest:
requires:
- coverage-clang
- bindings-rust:
requires:
- sanitizers
- bindings-rust-asan-combined:
requires:
- bindings-rust

benchmarking:
when: <<pipeline.parameters.benchmark>>
Expand Down

0 comments on commit 42e499c

Please sign in to comment.