2022-05-27 13:59:17 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
2022-06-04 11:47:42 +02:00
|
|
|
name: default-amd64
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
2022-05-27 13:59:17 +02:00
|
|
|
|
|
|
|
steps:
|
2023-11-03 10:03:15 +01:00
|
|
|
- name: build and test
|
2022-05-27 13:59:17 +02:00
|
|
|
image: rust:1
|
2023-11-02 11:29:49 +01:00
|
|
|
pull: always
|
2022-05-27 13:59:17 +02:00
|
|
|
commands:
|
|
|
|
- apt-get update -y
|
2024-12-23 19:17:12 +01:00
|
|
|
- apt-get install -y libnftnl-dev libmnl-dev libclang-dev
|
|
|
|
- curl -o $${RUSTC_WRAPPER} https://assets.paulbsd.com/sccache_linux_${DRONE_STAGE_ARCH}
|
|
|
|
- chmod +x $${RUSTC_WRAPPER}
|
|
|
|
- cargo b -v
|
|
|
|
- cargo t -v
|
2023-11-03 10:26:10 +01:00
|
|
|
environment:
|
|
|
|
RUSTC_WRAPPER: /usr/bin/sccache
|
2023-11-07 19:04:01 +01:00
|
|
|
SCCACHE_WEBDAV_ENDPOINT: https://sccache.paulbsd.com
|
|
|
|
SCCACHE_WEBDAV_KEY_PREFIX: sccache
|
2022-06-04 15:09:55 +02:00
|
|
|
volumes:
|
2022-08-28 17:32:16 +02:00
|
|
|
- name: cargo
|
|
|
|
path: /usr/local/cargo/registry
|
|
|
|
- name: apt
|
|
|
|
path: /var/cache/apt
|
2022-05-27 13:59:17 +02:00
|
|
|
when:
|
2022-06-04 15:09:55 +02:00
|
|
|
event:
|
2022-08-28 18:38:46 +02:00
|
|
|
exclude:
|
|
|
|
- tag
|
2022-05-27 13:59:17 +02:00
|
|
|
- name: release
|
|
|
|
image: rust:1
|
2023-11-02 11:29:49 +01:00
|
|
|
pull: always
|
2022-05-27 13:59:17 +02:00
|
|
|
commands:
|
|
|
|
- apt-get update -y
|
2024-12-23 19:17:12 +01:00
|
|
|
- apt-get install -y libnftnl-dev libmnl-dev libclang-dev
|
|
|
|
- curl -o $${RUSTC_WRAPPER} https://assets.paulbsd.com/sccache_linux_${DRONE_STAGE_ARCH}
|
|
|
|
- chmod +x $${RUSTC_WRAPPER}
|
|
|
|
- cargo b -r -v
|
2022-05-27 13:59:17 +02:00
|
|
|
- cd target/release
|
2022-06-04 11:55:20 +02:00
|
|
|
- tar -czvf ipblc-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz ipblc
|
2023-11-03 10:26:10 +01:00
|
|
|
environment:
|
|
|
|
RUSTC_WRAPPER: /usr/bin/sccache
|
2023-11-07 19:04:01 +01:00
|
|
|
SCCACHE_WEBDAV_ENDPOINT: https://sccache.paulbsd.com
|
|
|
|
SCCACHE_WEBDAV_KEY_PREFIX: sccache
|
2022-06-04 15:09:55 +02:00
|
|
|
volumes:
|
2022-08-28 17:32:16 +02:00
|
|
|
- name: cargo
|
|
|
|
path: /usr/local/cargo/registry
|
|
|
|
- name: apt
|
|
|
|
path: /var/cache/apt
|
2022-05-27 13:59:17 +02:00
|
|
|
when:
|
2022-06-04 15:09:55 +02:00
|
|
|
event:
|
|
|
|
- tag
|
2022-05-27 13:59:17 +02:00
|
|
|
- name: publish
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
base_url: https://git.paulbsd.com
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea_token
|
|
|
|
files: "target/release/*.tar.gz"
|
|
|
|
environment:
|
|
|
|
PLUGIN_TITLE: ""
|
|
|
|
when:
|
2022-06-04 15:09:55 +02:00
|
|
|
event:
|
|
|
|
- tag
|
|
|
|
volumes:
|
2022-08-28 17:32:16 +02:00
|
|
|
- name: cargo
|
|
|
|
host:
|
|
|
|
path: /home/drone/cache/cargo
|
|
|
|
- name: apt
|
|
|
|
host:
|
|
|
|
path: /home/drone/cache/apt
|
2022-06-04 11:47:42 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default-arm64
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: arm64
|
|
|
|
|
|
|
|
steps:
|
2023-11-03 10:03:15 +01:00
|
|
|
- name: build and test
|
2022-06-04 11:47:42 +02:00
|
|
|
image: rust:1
|
2023-11-02 11:29:49 +01:00
|
|
|
pull: always
|
2022-06-04 11:47:42 +02:00
|
|
|
commands:
|
|
|
|
- apt-get update -y
|
2024-12-23 19:17:12 +01:00
|
|
|
- apt-get install -y libnftnl-dev libmnl-dev libclang-dev
|
|
|
|
- curl -o $${RUSTC_WRAPPER} https://assets.paulbsd.com/sccache_linux_${DRONE_STAGE_ARCH}
|
|
|
|
- chmod +x $${RUSTC_WRAPPER}
|
|
|
|
- cargo b -v
|
|
|
|
- cargo t -v
|
2023-11-03 10:26:10 +01:00
|
|
|
environment:
|
|
|
|
RUSTC_WRAPPER: /usr/bin/sccache
|
2023-11-07 19:04:01 +01:00
|
|
|
SCCACHE_WEBDAV_ENDPOINT: https://sccache.paulbsd.com
|
|
|
|
SCCACHE_WEBDAV_KEY_PREFIX: sccache
|
2022-06-04 14:40:35 +02:00
|
|
|
volumes:
|
2022-08-28 17:32:16 +02:00
|
|
|
- name: cargo
|
|
|
|
path: /usr/local/cargo/registry
|
|
|
|
- name: apt
|
|
|
|
path: /var/cache/apt
|
2022-06-04 11:47:42 +02:00
|
|
|
when:
|
2022-06-04 15:09:55 +02:00
|
|
|
event:
|
2022-08-28 18:38:46 +02:00
|
|
|
exclude:
|
|
|
|
- tag
|
2022-06-04 11:47:42 +02:00
|
|
|
- name: release
|
|
|
|
image: rust:1
|
2023-11-02 11:29:49 +01:00
|
|
|
pull: always
|
2022-06-04 11:47:42 +02:00
|
|
|
commands:
|
|
|
|
- apt-get update -y
|
2024-12-23 19:17:12 +01:00
|
|
|
- apt-get install -y libnftnl-dev libmnl-dev libclang-dev
|
|
|
|
- curl -o $${RUSTC_WRAPPER} https://assets.paulbsd.com/sccache_linux_${DRONE_STAGE_ARCH}
|
|
|
|
- chmod +x $${RUSTC_WRAPPER}
|
|
|
|
- cargo b -r -v
|
2022-06-04 11:47:42 +02:00
|
|
|
- cd target/release
|
2022-06-04 11:55:20 +02:00
|
|
|
- tar -czvf ipblc-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz ipblc
|
2023-11-03 10:26:10 +01:00
|
|
|
environment:
|
|
|
|
RUSTC_WRAPPER: /usr/bin/sccache
|
2023-11-07 19:04:01 +01:00
|
|
|
SCCACHE_WEBDAV_ENDPOINT: https://sccache.paulbsd.com
|
|
|
|
SCCACHE_WEBDAV_KEY_PREFIX: sccache
|
2022-06-04 15:09:55 +02:00
|
|
|
volumes:
|
2022-08-28 17:32:16 +02:00
|
|
|
- name: cargo
|
|
|
|
path: /usr/local/cargo/registry
|
|
|
|
- name: apt
|
|
|
|
path: /var/cache/apt
|
2022-06-04 11:47:42 +02:00
|
|
|
when:
|
2022-06-04 15:09:55 +02:00
|
|
|
event:
|
|
|
|
- tag
|
2022-06-04 11:47:42 +02:00
|
|
|
- name: publish
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
base_url: https://git.paulbsd.com
|
|
|
|
api_key:
|
|
|
|
from_secret: gitea_token
|
|
|
|
files: "target/release/*.tar.gz"
|
|
|
|
environment:
|
|
|
|
PLUGIN_TITLE: ""
|
|
|
|
when:
|
2022-06-04 15:09:55 +02:00
|
|
|
event:
|
|
|
|
- tag
|
2022-06-04 14:40:35 +02:00
|
|
|
volumes:
|
2022-08-28 17:32:16 +02:00
|
|
|
- name: cargo
|
|
|
|
host:
|
|
|
|
path: /home/drone/cache/cargo
|
|
|
|
- name: apt
|
|
|
|
host:
|
|
|
|
path: /home/drone/cache/apt
|