version: 2.0 jobs: build: docker: - image: jimmycuadra/rust working_directory: ~/md-pdf steps: - checkout - restore_cache: keys: - cargo - run: which rustfmt || cargo install rustfmt - save_cache: key: cargo paths: - ~/.cargo - run: apt install -y wget - run: ./scripts/install-deps.sh - run: cargo fmt -- --write-mode=diff - run: cargo build - run: cargo build --release - run: cargo test - run: cargo test --release - run: cd test-files && cargo run --release -- build - run: cd test-files && cargo run -- build