152 lines
3.6 KiB
YAML
152 lines
3.6 KiB
YAML
|
---
|
||
|
kind: pipeline
|
||
|
type: docker
|
||
|
name: default-amd64
|
||
|
|
||
|
platform:
|
||
|
os: linux
|
||
|
arch: amd64
|
||
|
|
||
|
steps:
|
||
|
- name: build and test
|
||
|
image: rust:1
|
||
|
pull: always
|
||
|
commands:
|
||
|
- apt-get update -y
|
||
|
- apt-get install -y figlet
|
||
|
- curl -o /usr/bin/sccache https://assets.paulbsd.com/sccache_linux_amd64
|
||
|
- 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 figlet
|
||
|
- curl -o /usr/bin/sccache https://assets.paulbsd.com/sccache_linux_amd64
|
||
|
- chmod +x /usr/bin/sccache
|
||
|
- cargo build --release --verbose --all
|
||
|
- cd target/release
|
||
|
- tar -czvf superchat-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz superchat
|
||
|
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"
|
||
|
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: build and test
|
||
|
image: rust:1
|
||
|
pull: always
|
||
|
commands:
|
||
|
- apt-get update -y
|
||
|
- apt-get install -y figlet
|
||
|
- 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 figlet
|
||
|
- 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 superchat-${DRONE_TAG}-${DRONE_STAGE_OS}-${DRONE_STAGE_ARCH}.tar.gz superchat
|
||
|
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"
|
||
|
environment:
|
||
|
PLUGIN_TITLE: ""
|
||
|
when:
|
||
|
event:
|
||
|
- tag
|
||
|
volumes:
|
||
|
- name: cargo
|
||
|
host:
|
||
|
path: /home/drone/cache/cargo
|
||
|
- name: apt
|
||
|
host:
|
||
|
path: /home/drone/cache/apt
|