2021-07-27 09:51:49 +00:00
---
kind : pipeline
name : epp-client
platform :
os : linux
arch : amd64
steps :
2021-11-02 21:49:00 +00:00
- name : check
image : ayravat/rust:1.53.0-ci
volumes :
- name : ssh
path : /root/.ssh
- name : target
path : /tmp/cargo-target
- name : cache
path : /tmp/cargo
- name : config
path : /root/.config/epp-client
commands :
2021-11-11 16:55:59 +00:00
- export CARGO_HOME=/tmp/cargo/$DRONE_BRANCH
- export CARGO_TARGET_DIR=/tmp/cargo-target/$DRONE_BRANCH
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-11-02 21:49:00 +00:00
- cargo check --all-targets
- name : fmt
image : ayravat/rust:1.53.0-ci
volumes :
- name : ssh
path : /root/.ssh
- name : target
path : /tmp/cargo-target
- name : cache
path : /tmp/cargo
- name : config
path : /root/.config/epp-client
commands :
2021-11-11 16:55:59 +00:00
- export CARGO_HOME=/tmp/cargo/$DRONE_BRANCH
- export CARGO_TARGET_DIR=/tmp/cargo-target/$DRONE_BRANCH
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-11-02 21:49:00 +00:00
- cargo fmt --all -- --check
- name : clippy
image : ayravat/rust:1.53.0-ci
volumes :
- name : ssh
path : /root/.ssh
- name : target
path : /tmp/cargo-target
- name : cache
path : /tmp/cargo
- name : config
path : /root/.config/epp-client
commands :
2021-11-11 16:55:59 +00:00
- export CARGO_HOME=/tmp/cargo/$DRONE_BRANCH
- export CARGO_TARGET_DIR=/tmp/cargo-target/$DRONE_BRANCH
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-11-02 21:49:00 +00:00
- cargo clippy --workspace --all-targets -- -D warnings
2021-07-27 09:51:49 +00:00
- name : test
image : ayravat/rust:1.53.0-ci
volumes :
- name : ssh
path : /root/.ssh
- name : target
path : /tmp/cargo-target
- name : cache
path : /tmp/cargo
- name : config
path : /root/.config/epp-client
commands :
2021-11-11 16:55:59 +00:00
- export CARGO_HOME=/tmp/cargo/$DRONE_BRANCH
- export CARGO_TARGET_DIR=/tmp/cargo-target/$DRONE_BRANCH
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-11-05 23:26:58 +00:00
- cargo test -- --nocapture
2021-07-27 09:51:49 +00:00
- name : crates.io
image : ayravat/rust:1.53.0-docker
volumes :
- name : ssh
path : /root/.ssh
- name : target
path : /tmp/cargo-target
- name : cache
path : /tmp/cargo
- name : config
path : /root/.config/epp-client
- name : crates
path : /root/.cargo
commands :
2021-11-11 16:55:59 +00:00
- export CARGO_HOME=/tmp/cargo/$DRONE_BRANCH
- export CARGO_TARGET_DIR=/tmp/cargo-target/$DRONE_BRANCH
- mkdir -p $CARGO_HOME $CARGO_TARGET_DIR
2021-07-27 09:51:49 +00:00
- export EPP_CLIENT_VERSION_CHANGE=$(git diff HEAD^ HEAD -- epp-client/Cargo.toml | grep -E "([+\-]){1}version" | wc -l)
- if [ $EPP_CLIENT_VERSION_CHANGE -eq 2 ]; then echo "epp-client version updated. publishing to crates.io" && cd epp-client && cargo publish && cd .. ; else echo "epp-client version unchanged"; fi
- export EPP_CLIENT_MACROS_VERSION_CHANGE=$(git diff HEAD^ HEAD -- epp-client-macros/Cargo.toml | grep -E "([+\-]){1}version" | wc -l)
- if [ $EPP_CLIENT_MACROS_VERSION_CHANGE -eq 2 ]; then echo "epp-client-macros version updated. publishing to crates.io" && cd epp-client-macros && cargo publish && cd .. ; else echo "epp-client-macros version unchanged"; fi
when :
branch : master
2021-10-29 02:47:21 +00:00
event : push
2021-07-27 09:51:49 +00:00
volumes :
- name : ssh
host :
path : /root/.ssh
- name : config
host :
path : /root/.config/epp-client
- name : crates
host :
path : /root/.cargo
- name : target
host :
path : /var/drone/cache/epp-client-target
- name : cache
host :
path : /var/drone/cache/epp-client-cache
...