30 lines
1 KiB
YAML
30 lines
1 KiB
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 unzip sudo libgtk-3-dev
|
|
- run: make lib
|
|
- run: ./.circleci/wkhtmltopdf.sh
|
|
- run: cargo fmt -- --write-mode=diff
|
|
- run: make build
|
|
- run: make release
|
|
- save_cache:
|
|
key: cargo-{{ checksum "Cargo.lock" }}
|
|
paths:
|
|
- ~/.cargo
|
|
- run: make test
|
|
- run:
|
|
command: ../.circleci/xserver.sh cargo run -- build
|
|
working_directory: ~/md-pdf/test-files
|
|
- run:
|
|
command: ../.circleci/xserver.sh cargo run --release -- build
|
|
working_directory: ~/md-pdf/test-files
|