version 1.8.0 #15
85
.drone.yml
85
.drone.yml
@ -8,14 +8,15 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build and test
|
- &build-test
|
||||||
|
name: build and test
|
||||||
image: rust:1
|
image: rust:1
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- apt-get update -y
|
- apt-get update -y
|
||||||
- apt-get install -y libnftnl-dev libmnl-dev
|
- apt-get install -y libnftnl-dev libmnl-dev libclang-dev
|
||||||
- curl -o /usr/bin/sccache https://assets.paulbsd.com/sccache_linux_amd64
|
- curl -o ${RUSTC_WRAPPER} https://assets.paulbsd.com/sccache_linux_${DRONE_STAGE_ARCH}
|
||||||
- chmod +x /usr/bin/sccache
|
- chmod +x ${RUSTC_WRAPPER}
|
||||||
- cargo build --verbose --all
|
- cargo build --verbose --all
|
||||||
- cargo test --verbose --all
|
- cargo test --verbose --all
|
||||||
environment:
|
environment:
|
||||||
@ -31,14 +32,15 @@ steps:
|
|||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- tag
|
- tag
|
||||||
- name: release
|
- &release
|
||||||
|
name: release
|
||||||
image: rust:1
|
image: rust:1
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- apt-get update -y
|
- apt-get update -y
|
||||||
- apt-get install -y libnftnl-dev libmnl-dev
|
- apt-get install -y libnftnl-dev libmnl-dev libclang-dev
|
||||||
- curl -o /usr/bin/sccache https://assets.paulbsd.com/sccache_linux_amd64
|
- curl -o ${RUSTC_WRAPPER} https://assets.paulbsd.com/sccache_linux_${DRONE_STAGE_ARCH}
|
||||||
- chmod +x /usr/bin/sccache
|
- chmod +x ${RUSTC_WRAPPER}
|
||||||
- cargo build --release --verbose --all
|
- cargo build --release --verbose --all
|
||||||
- cd target/release
|
- cd target/release
|
||||||
- tar -czvf ipblc-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz ipblc
|
- tar -czvf ipblc-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz ipblc
|
||||||
@ -54,7 +56,8 @@ steps:
|
|||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
- name: publish
|
- &publish
|
||||||
|
name: publish
|
||||||
image: plugins/gitea-release
|
image: plugins/gitea-release
|
||||||
settings:
|
settings:
|
||||||
base_url: https://git.paulbsd.com
|
base_url: https://git.paulbsd.com
|
||||||
@ -87,67 +90,9 @@ platform:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build and test
|
- *build_test
|
||||||
image: rust:1
|
- *release
|
||||||
pull: always
|
- *publish
|
||||||
commands:
|
|
||||||
- apt-get update -y
|
|
||||||
- apt-get install -y libnftnl-dev libmnl-dev
|
|
||||||
- curl -o /usr/bin/sccache https://assets.paulbsd.com/sccache_linux_arm64
|
|
||||||
- chmod +x /usr/bin/sccache
|
|
||||||
- cargo build --verbose --all
|
|
||||||
- cargo test --verbose --all
|
|
||||||
environment:
|
|
||||||
RUSTC_WRAPPER: /usr/bin/sccache
|
|
||||||
SCCACHE_WEBDAV_ENDPOINT: https://sccache.paulbsd.com
|
|
||||||
SCCACHE_WEBDAV_KEY_PREFIX: sccache
|
|
||||||
volumes:
|
|
||||||
- name: cargo
|
|
||||||
path: /usr/local/cargo/registry
|
|
||||||
- name: apt
|
|
||||||
path: /var/cache/apt
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
exclude:
|
|
||||||
- tag
|
|
||||||
- name: release
|
|
||||||
image: rust:1
|
|
||||||
pull: always
|
|
||||||
commands:
|
|
||||||
- apt-get update -y
|
|
||||||
- apt-get install -y libnftnl-dev libmnl-dev
|
|
||||||
- curl -o /usr/bin/sccache https://assets.paulbsd.com/sccache_linux_arm64
|
|
||||||
- chmod +x /usr/bin/sccache
|
|
||||||
- cargo build --release --verbose --all
|
|
||||||
- cd target/release
|
|
||||||
- tar -czvf ipblc-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz ipblc
|
|
||||||
environment:
|
|
||||||
RUSTC_WRAPPER: /usr/bin/sccache
|
|
||||||
SCCACHE_WEBDAV_ENDPOINT: https://sccache.paulbsd.com
|
|
||||||
SCCACHE_WEBDAV_KEY_PREFIX: sccache
|
|
||||||
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:
|
volumes:
|
||||||
- name: cargo
|
- name: cargo
|
||||||
host:
|
host:
|
||||||
|
Loading…
Reference in New Issue
Block a user