31 lines
1,008 B
YAML
31 lines
1,008 B
YAML
version: 2.0
|
|
|
|
jobs:
|
|
build:
|
|
docker:
|
|
- image: jimmycuadra/rust
|
|
working_directory: ~/md-pdf
|
|
steps:
|
|
- checkout
|
|
- restore_cache:
|
|
keys:
|
|
- cargo-{{ checksum "Cargo.lock" }}
|
|
- run: which rustfmt || cargo install rustfmt
|
|
- run: apt update && apt install -y wget
|
|
- run: make lib
|
|
- run: cargo fmt -- --write-mode=diff
|
|
- run: cargo build
|
|
- run: cargo build --release
|
|
- save_cache:
|
|
key: cargo-{{ checksum "Cargo.lock" }}
|
|
paths:
|
|
- ~/.cargo
|
|
- target/
|
|
- run: cargo test
|
|
- run: cargo test --release
|
|
- run:
|
|
command: cargo run -- build
|
|
working_directory: ~/md-pdf/test-files
|
|
- run:
|
|
command: cargo run --release -- build
|
|
working_directory: ~/md-pdf/test-files
|