Update drone config to build the release for armhf
This commit is contained in:
parent
2dce7a0fdd
commit
2986476548
1 changed files with 76 additions and 16 deletions
90
.drone.yml
90
.drone.yml
|
|
@ -1,23 +1,83 @@
|
|||
kind: pipeline
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: preview
|
||||
image: rust:1.50-slim
|
||||
commands:
|
||||
- env
|
||||
- pwd
|
||||
- ls
|
||||
- ls -a /
|
||||
# - name: build
|
||||
# image: rust:1.50-slim
|
||||
# commands:
|
||||
# - cargo build
|
||||
volumes:
|
||||
- name: target
|
||||
temp: {}
|
||||
|
||||
# - name: test
|
||||
# image: rust:1.50-slim
|
||||
steps:
|
||||
# - name: preview
|
||||
# image: rust:1.50-musl
|
||||
# volumes:
|
||||
# - name: target
|
||||
# path: /drone/src/target
|
||||
# commands:
|
||||
# - cargo test
|
||||
# - env
|
||||
# - pwd
|
||||
# - ls
|
||||
# - ls target
|
||||
|
||||
- name: build_test
|
||||
image: rust:1.50-musl
|
||||
volumes:
|
||||
- name: target
|
||||
path: /drone/src/target
|
||||
commands:
|
||||
- cargo build --release
|
||||
|
||||
- name: run_test
|
||||
image: rust:1.50-musl
|
||||
volumes:
|
||||
- name: target
|
||||
path: /drone/src/target
|
||||
commands:
|
||||
- cargo test --release --no-fail-fast -- --test-threads 1
|
||||
|
||||
- name: build_release
|
||||
image: drone_rust:1.50-musl
|
||||
volumes:
|
||||
- name: target
|
||||
path: /drone/src/target
|
||||
commands:
|
||||
- cargo build --release --target armv7-unknown-linux-musleabihf --features "rppal"
|
||||
- grep '^version = ' Cargo.toml | cut -f2 -d\" > target/VERSION
|
||||
- cp target/armv7-unknown-linux-musleabihf/release/s0_meter target/s0_meter-armhf-$(cat target/VERSION)
|
||||
when:
|
||||
event: tag
|
||||
|
||||
- name: show_version
|
||||
image: alpine
|
||||
volumes:
|
||||
- name: target
|
||||
path: /drone/src/target
|
||||
commands:
|
||||
# - grep '^version = ' Cargo.toml | cut -f2 -d\" > target/VERSION
|
||||
- cat target/VERSION
|
||||
|
||||
- name: show_results
|
||||
image: alpine
|
||||
volumes:
|
||||
- name: target
|
||||
path: /drone/src/target
|
||||
commands:
|
||||
- ls -l target
|
||||
- ls -l target/release
|
||||
- ls -l target/armv7-unknown-linux-musleabihf
|
||||
- ls -l target/armv7-unknown-linux-musleabihf/release
|
||||
- ls -l target
|
||||
|
||||
- name: release
|
||||
image: plugins/gitea-release
|
||||
volumes:
|
||||
- name: target
|
||||
path: /drone/src/target
|
||||
settings:
|
||||
api_key:
|
||||
from_secret: GITEA_TOKEN
|
||||
baseurl: https://gitea.kube-it.default
|
||||
files: /drone/src/target/s0_meter-armhf-$(cat target/VERSION)
|
||||
when:
|
||||
event: tag
|
||||
|
||||
# kind: pipeline
|
||||
# type: exec
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue