epp-client/.drone.yml

124 lines
3.0 KiB
YAML
Raw Permalink Normal View History

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
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-ci
2021-11-02 21:49:00 +00:00
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:
- 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
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-ci
2021-11-02 21:49:00 +00:00
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:
- 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
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-ci
2021-11-02 21:49:00 +00:00
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:
- 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
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-ci
2021-07-27 09:51:49 +00:00
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:
- 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
2021-11-12 08:05:03 +00:00
image: ayravat/rust:1.56.1-docker
2021-07-27 09:51:49 +00:00
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:
- 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-12 09:41:09 +00:00
- export CARGO_TOKEN=$(cat $HOME/.cargo/credentials-token)
2021-11-12 08:05:03 +00:00
- cd epp-client
2021-11-12 09:30:32 +00:00
- cargo publish --token $CARGO_TOKEN
2021-11-12 08:05:03 +00:00
- cd ..
- cd epp-client-macros
2021-11-12 09:30:32 +00:00
- cargo publish --token $CARGO_TOKEN
2021-07-27 09:51:49 +00:00
when:
2021-11-12 08:05:03 +00:00
branch:
- 0.2
- 0.3
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
...