36 lines
937 B
YAML
36 lines
937 B
YAML
---
|
|
kind: pipeline
|
|
name: linux-amd64
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
steps:
|
|
- name: binary
|
|
image: clux/muslrust:nightly-2019-12-19
|
|
commands:
|
|
- "[ -z \"${DRONE_TAG}\" ] && BITWARDEN_VERSION=master || BITWARDEN_VERSION=${DRONE_TAG%-*}"
|
|
- mkdir -p source/
|
|
- apt-get update && apt-get install -y --no-install-recommends libpq-dev
|
|
- rustup set profile minimal
|
|
- curl -L https://github.com/dani-garcia/bitwarden_rs/archive/$BITWARDEN_VERSION.tar.gz | tar xz -C source/ --strip-components=1
|
|
- ls -lah source && id
|
|
- cargo new --bin app/ && cd app/
|
|
- cp ../source/Cargo.* .
|
|
- cp ../source/rust-toolchain .
|
|
- cp ../source/build.rs .
|
|
- rustup target add x86_64-unknown-linux-musl
|
|
- cargo build --features $DB --release
|
|
- find . -not -path "./target*" -delete
|
|
- ls -lah
|
|
- cp -rT ../source .
|
|
- ls -lah
|
|
environment:
|
|
DB: postgresql
|
|
DEBIAN_FRONTEND: noninteractive
|
|
LANG: C.UTF-8
|
|
TZ: UTC
|
|
|
|
...
|