ipblc/.drone.yml
Paul Lecuq 46d38fe318
Some checks reported errors
continuous-integration/drone/push Build was killed
updated .drone.yml
2022-06-04 15:09:55 +02:00

127 lines
2.6 KiB
YAML

---
kind: pipeline
type: docker
name: default-amd64
platform:
os: linux
arch: amd64
steps:
- name: test and build
image: rust:1
commands:
- apt-get update -y
- apt-get install -y libzmq3-dev libnftnl-dev libmnl-dev
- cargo build --verbose --all
- cargo test --verbose --all
volumes:
- name: cargo
path: /usr/local/cargo/registry
- name: apt
path: /var/cache/apt
when:
event:
- push
- name: release
image: rust:1
commands:
- apt-get update -y
- apt-get install -y libzmq3-dev libnftnl-dev libmnl-dev
- cargo build --release --verbose --all
- cd target/release
- tar -czvf ipblc-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz ipblc
volumes:
- name: cargo
path: /usr/local/cargo/registry
- name: apt
path: /var/cache/apt
when:
event:
- tag
- name: publish
image: plugins/gitea-release
settings:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
files: "target/release/*.tar.gz"
checksum:
- sha256
- sha512
environment:
PLUGIN_TITLE: ""
when:
event:
- tag
volumes:
- name: cargo
host:
path: /home/drone/cache/cargo
- name: apt
host:
path: /home/drone/cache/apt
---
kind: pipeline
type: docker
name: default-arm64
platform:
os: linux
arch: arm64
steps:
- name: test and build
image: rust:1
commands:
- apt-get update -y
- apt-get install -y libzmq3-dev libnftnl-dev libmnl-dev
- cargo build --verbose --all
- cargo test --verbose --all
volumes:
- name: cargo
path: /usr/local/cargo/registry
- name: apt
path: /var/cache/apt
when:
event:
- push
- name: release
image: rust:1
commands:
- apt-get update -y
- apt-get install -y libzmq3-dev libnftnl-dev libmnl-dev
- cargo build --release --verbose --all
- cd target/release
- tar -czvf ipblc-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz ipblc
volumes:
- name: cargo
path: /usr/local/cargo/registry
- name: apt
path: /var/cache/apt
when:
event:
- tag
- name: publish
image: plugins/gitea-release
settings:
base_url: https://git.paulbsd.com
api_key:
from_secret: gitea_token
files: "target/release/*.tar.gz"
checksum:
- sha256
- sha512
environment:
PLUGIN_TITLE: ""
when:
event:
- tag
volumes:
- name: cargo
host:
path: /home/drone/cache/cargo
- name: apt
host:
path: /home/drone/cache/apt