version: 2.1 workflows: version: 2 test: jobs: - Run tests coverage: jobs: - Gen Coverage jobs: Run tests: docker: - image: circleci/rust:1.36.0 steps: - checkout - run: name: Version information command: rustc --version; cargo --version; rustup --version - run: name: Test (all features) command: cargo test --all --verbose - run: name: Test (only alloc) # use `--tests` to skip doctests for the `alloc` feature, since they # fail because of https://github.com/rust-lang/rust/issues/54010 command: cargo test --tests --features=alloc --no-default-features - run: name: Test (no std or alloc) command: cargo test --all --no-default-features - run: # TODO: collect benchmark output somehow? name: Build benchmarks command: cargo bench --no-run # TODO: make sure the fuzz tests build and run for like, at least a second # or so. Gen Coverage: machine: true steps: - checkout - run: name: Download rustup command: | wget https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init chmod +x rustup-init - run: name: Install Rust command: | ./rustup-init -y --no-modify-path rm rustup-init echo 'export PATH=$HOME/.cargo/bin:$PATH' >> $BASH_ENV - run: sudo apt-get update - run: sudo apt-get install libssl-dev pkg-config cmake zlib1g-dev - run: name: Install Tarpaulin command: cargo install cargo-tarpaulin environment: RUSTFLAGS: --cfg procmacro2_semver_exempt - run: name: Generate coverage report command: cargo tarpaulin --out Xml --all-features - run: name: Upload to codecov.io command: bash <(curl -s https://codecov.io/bash) -Z -f cobertura.xml