Skip to content

Commit 42e499c

Browse files
committed
ci: add rust bindings
1 parent 08623b4 commit 42e499c

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

circle.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,50 @@ jobs:
512512
- spectest
513513
- collect_coverage_data
514514

515+
bindings-rust:
516+
docker:
517+
- image: rust:1
518+
steps:
519+
- checkout
520+
- run:
521+
name: Update environment
522+
command: |
523+
apt update
524+
apt -y install libclang-dev clang
525+
rustup component add rustfmt
526+
rustup update
527+
- run:
528+
name: Check formatting
529+
command: |
530+
rustfmt --version
531+
cargo fmt --all -- --check
532+
- run:
533+
name: Build
534+
command: cargo build
535+
- run:
536+
name: Test
537+
command: cargo test
538+
539+
bindings-rust-asan-combined:
540+
docker:
541+
- image: rust:1-buster
542+
steps:
543+
- checkout
544+
- run:
545+
name: Update environment
546+
command: |
547+
echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list
548+
apt -qq update
549+
apt -yq install llvm-8-dev clang-8 --no-install-recommends
550+
rustup toolchain install nightly-x86_64-unknown-linux-gnu
551+
rustup update
552+
- run:
553+
name: Build
554+
command: RUSTFLAGS="-Z sanitizer=address" ASAN_OPTIONS=detect_leaks=1 cargo +nightly build --target x86_64-unknown-linux-gnu
555+
- run:
556+
name: Test
557+
command: RUSTFLAGS="-Z sanitizer=address -C opt-level=0" ASAN_OPTIONS=detect_leaks=1 cargo +nightly test --target x86_64-unknown-linux-gnu
558+
515559
workflows:
516560
version: 2
517561

@@ -537,6 +581,12 @@ workflows:
537581
- spectest:
538582
requires:
539583
- coverage-clang
584+
- bindings-rust:
585+
requires:
586+
- sanitizers
587+
- bindings-rust-asan-combined:
588+
requires:
589+
- bindings-rust
540590

541591
benchmarking:
542592
when: <<pipeline.parameters.benchmark>>

0 commit comments

Comments
 (0)