version: 2.1
jobs:
build:
docker:
- image: circleci/rust:latest
steps:
- checkout
- restore_cache:
key: project-cache
- run:
name: Install Nightly Compiler
command: rustup install nightly
- run:
name: Check formatting
command: |
rustup component add rustfmt
rustfmt --version
cargo fmt -- --check
- run:
name: Nightly Build
command: |
rustup run nightly rustc --version --verbose
rustup run nightly cargo --version --verbose
rustup run nightly cargo build --release --all-features
rustup run nightly cargo build --all-features
- run:
name: Stable Build
command: |
rustup install stable
rustup run stable rustc --version --verbose
rustup run stable cargo --version --verbose
rustup run stable cargo build --release --all-features
rustup run stable cargo build --all-features
- run:
name: Test
command: rustup run stable cargo test --all-features
- run:
name: Integration Test
command: |
cd samples
perl test.pl
cd ..
- save_cache:
key: project-cache
paths:
- "/usr/local/cargo/registry"
- "~/.cargo"
- "./target"