This reverts commit d13ae3b023
.
This commit is contained in:
parent
7145964d08
commit
dd11d6bc41
85
.drone.yml
85
.drone.yml
@ -8,15 +8,14 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- &build-test
|
- name: build and 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 libclang-dev
|
- apt-get install -y libnftnl-dev libmnl-dev
|
||||||
- curl -o ${RUSTC_WRAPPER} https://assets.paulbsd.com/sccache_linux_${DRONE_STAGE_ARCH}
|
- curl -o /usr/bin/sccache https://assets.paulbsd.com/sccache_linux_amd64
|
||||||
- chmod +x ${RUSTC_WRAPPER}
|
- chmod +x /usr/bin/sccache
|
||||||
- cargo build --verbose --all
|
- cargo build --verbose --all
|
||||||
- cargo test --verbose --all
|
- cargo test --verbose --all
|
||||||
environment:
|
environment:
|
||||||
@ -32,15 +31,14 @@ steps:
|
|||||||
event:
|
event:
|
||||||
exclude:
|
exclude:
|
||||||
- tag
|
- tag
|
||||||
- &release
|
- name: 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 libclang-dev
|
- apt-get install -y libnftnl-dev libmnl-dev
|
||||||
- curl -o ${RUSTC_WRAPPER} https://assets.paulbsd.com/sccache_linux_${DRONE_STAGE_ARCH}
|
- curl -o /usr/bin/sccache https://assets.paulbsd.com/sccache_linux_amd64
|
||||||
- chmod +x ${RUSTC_WRAPPER}
|
- chmod +x /usr/bin/sccache
|
||||||
- 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
|
||||||
@ -56,8 +54,7 @@ steps:
|
|||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- tag
|
- tag
|
||||||
- &publish
|
- name: 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
|
||||||
@ -90,9 +87,67 @@ platform:
|
|||||||
arch: arm64
|
arch: arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- *build_test
|
- name: build and test
|
||||||
- *release
|
image: rust:1
|
||||||
- *publish
|
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 --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