diff --git a/.drone.yml b/.drone.yml index 92aff47..f377665 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,51 +1,30 @@ --- kind: pipeline type: docker -name: default +name: build-check-deploy platform: os: "linux" arch: "arm" steps: -- name: "deps" + # Fetch deps and check the code +- name: "validate" image: "rust:1.49" volumes: - name: "cache" path: "/.target" commands: - - "apt-get update" - - "apt-get install -yqq musl-tools make" + - "apt-get update && apt-get install -yqq musl-tools" - "rustup target add armv7-unknown-linux-musleabihf" - - "cargo check" - - "cargo test" - - "cargo build --release --target=armv7-unknown-linux-musleabihf" - -- 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" - + - "CC=musl-gcc cargo check --release --target=armv7-unknown-linux-musleabihf" + - "CC=musl-gcc cargo test --release --target=armv7-unknown-linux-musleabihf" + - "CC=musl-gcc cargo build --release --target=armv7-unknown-linux-musleabihf" + # Deploy it somewhere. - name: "deploy" image: "rust:1.49" depends_on: - - "check" - - "test" + - "validate" environment: SSH_PK: from_secret: SSH_PRIVATE_KEY