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 Oct 1, 2020
1 parent 2298b26 commit 5603591
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,53 @@ jobs:
- spectest
- collect_coverage_data

bindings-rust:
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 -t buster-backports install cmake --no-install-recommends
apt -yq install libclang-dev clang cmake --no-install-recommends
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:
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 -t buster-backports install cmake --no-install-recommends
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 +584,10 @@ workflows:
- spectest:
requires:
- coverage-clang
- bindings-rust
- bindings-rust-asan:
requires:
- bindings-rust

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

0 comments on commit 5603591

Please sign in to comment.