fido2luks/.drone.yml
shimun 048e432a9e
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
separate pipelines
2020-06-24 18:23:22 +02:00

39 lines
1.3 KiB
YAML

kind: pipeline
name: build
steps:
- name: test
image: rust:1.43.0
commands:
- apt update && apt install -y libkeyutils-dev libclang-dev clang pkg-config
- echo 'deb http://http.us.debian.org/debian unstable main non-free contrib' >> /etc/apt/sources.list.d/unstable.list && apt update && apt install -y libcryptsetup-dev
- cargo test
- name: publish
image: rust:1.43.0
environment:
CARGO_REGISTRY_TOKEN:
from_secret: cargo_tkn
commands:
- grep -E 'version ?= ?"${DRONE_TAG}"' -i Cargo.toml || (printf "incorrect crate/tag version" && exit 1)
- apt update && apt install -y libkeyutils-dev libclang-dev clang pkg-config
- echo 'deb http://http.us.debian.org/debian unstable main non-free contrib' >> /etc/apt/sources.list.d/unstable.list && apt update && apt install -y libcryptsetup-dev
- cargo package --all-features
- cargo publish --all-features
when:
event: tag
---
kind: pipeline
name: style
steps:
- name: fmt
image: rust:1.43.0
commands:
- rustup component add rustfmt
- cargo fmt --all -- --check
- name: readme
image: msrd0/cargo-readme@sha256:2b916451e576cda54f1e02703fa092b9d5af95bcf48426a1ef42872a19467fd3
commands:
- cargo readme > ~README.md
- cmp -s README.md ~README.md || (printf "README.md need to be updated:\n"; cat ~README.md; exit 1)