update drone-ci
This commit is contained in:
39
.drone.yml
39
.drone.yml
@ -1,51 +1,30 @@
|
|||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: build-check-deploy
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: "linux"
|
os: "linux"
|
||||||
arch: "arm"
|
arch: "arm"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "deps"
|
# Fetch deps and check the code
|
||||||
|
- name: "validate"
|
||||||
image: "rust:1.49"
|
image: "rust:1.49"
|
||||||
volumes:
|
volumes:
|
||||||
- name: "cache"
|
- name: "cache"
|
||||||
path: "/.target"
|
path: "/.target"
|
||||||
commands:
|
commands:
|
||||||
- "apt-get update"
|
- "apt-get update && apt-get install -yqq musl-tools"
|
||||||
- "apt-get install -yqq musl-tools make"
|
|
||||||
- "rustup target add armv7-unknown-linux-musleabihf"
|
- "rustup target add armv7-unknown-linux-musleabihf"
|
||||||
- "cargo check"
|
- "CC=musl-gcc cargo check --release --target=armv7-unknown-linux-musleabihf"
|
||||||
- "cargo test"
|
- "CC=musl-gcc cargo test --release --target=armv7-unknown-linux-musleabihf"
|
||||||
- "cargo build --release --target=armv7-unknown-linux-musleabihf"
|
- "CC=musl-gcc cargo build --release --target=armv7-unknown-linux-musleabihf"
|
||||||
|
# Deploy it somewhere.
|
||||||
- name: "check"
|
|
||||||
image: "rust:1.49"
|
|
||||||
depends_on:
|
|
||||||
- "deps"
|
|
||||||
volumes:
|
|
||||||
- name: "cache"
|
|
||||||
path: "/.target"
|
|
||||||
commands:
|
|
||||||
- "cargo check"
|
|
||||||
|
|
||||||
- name: "test"
|
|
||||||
image: "rust:1.49"
|
|
||||||
depends_on:
|
|
||||||
- "deps"
|
|
||||||
volumes:
|
|
||||||
- name: "cache"
|
|
||||||
path: "/.target"
|
|
||||||
commands:
|
|
||||||
- "cargo test"
|
|
||||||
|
|
||||||
- name: "deploy"
|
- name: "deploy"
|
||||||
image: "rust:1.49"
|
image: "rust:1.49"
|
||||||
depends_on:
|
depends_on:
|
||||||
- "check"
|
- "validate"
|
||||||
- "test"
|
|
||||||
environment:
|
environment:
|
||||||
SSH_PK:
|
SSH_PK:
|
||||||
from_secret: SSH_PRIVATE_KEY
|
from_secret: SSH_PRIVATE_KEY
|
||||||
|
|||||||
Reference in New Issue
Block a user