add build commands
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2020-01-16 23:01:17 +01:00
parent 60d189001e
commit fdd7f41688
2 changed files with 39 additions and 2 deletions

View File

@ -12,9 +12,28 @@ local PipelineBuild(os='linux', arch='amd64') = {
{
name: 'binary',
image: 'clux/muslrust:nightly-2019-12-19',
environment: {
'DB': 'postgresql',
'DEBIAN_FRONTEND': 'noninteractive',
'LANG': 'C.UTF-8',
'TZ': 'UTC',
},
commands: [
'[ -z "${DRONE_TAG}" ] && BITWARDEN_VERSION=master || BITWARDEN_VERSION=${DRONE_TAG%-*}',
'curl -L https://github.com/dani-garcia/bitwarden_rs/archive/$BITWARDEN_VERSION.tar.gz | tar xz --strip-components=1',
'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'
],
},

View File

@ -11,7 +11,25 @@ steps:
image: clux/muslrust:nightly-2019-12-19
commands:
- "[ -z \"${DRONE_TAG}\" ] && BITWARDEN_VERSION=master || BITWARDEN_VERSION=${DRONE_TAG%-*}"
- curl -L https://github.com/dani-garcia/bitwarden_rs/archive/$BITWARDEN_VERSION.tar.gz | tar xz --strip-components=1
- 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
...