2018-04-30 23:15:07 +02:00
|
|
|
language: rust
|
|
|
|
rust:
|
2018-11-01 22:23:38 +01:00
|
|
|
- nightly-2018-07-17
|
2018-11-04 20:27:27 +01:00
|
|
|
cache:
|
|
|
|
cargo: true
|
|
|
|
directories:
|
|
|
|
- kcov-master
|
2018-11-01 22:23:38 +01:00
|
|
|
sudo: true
|
|
|
|
dist: trusty
|
2018-11-07 15:50:24 +01:00
|
|
|
services: postgres
|
2018-11-01 22:23:38 +01:00
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libcurl4-openssl-dev
|
|
|
|
- libelf-dev
|
|
|
|
- libdw-dev
|
|
|
|
- cmake
|
|
|
|
- gcc
|
|
|
|
- binutils-dev
|
|
|
|
- zlib1g-dev
|
|
|
|
- libiberty-dev
|
2018-11-04 20:27:27 +01:00
|
|
|
stages:
|
|
|
|
- build
|
2018-11-07 15:50:24 +01:00
|
|
|
- test and coverage
|
2018-11-01 22:23:38 +01:00
|
|
|
jobs:
|
|
|
|
include:
|
2018-11-04 20:27:27 +01:00
|
|
|
- stage: build
|
|
|
|
name: "Build with postgresql"
|
2018-11-01 22:23:38 +01:00
|
|
|
env:
|
|
|
|
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume
|
|
|
|
script: cargo build --no-default-features --features="${FEATURES}"
|
2018-11-04 20:27:27 +01:00
|
|
|
- stage: build
|
|
|
|
name: "Build with sqlite"
|
2018-11-01 22:23:38 +01:00
|
|
|
env:
|
|
|
|
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
|
|
|
|
script: cargo build --no-default-features --features="${FEATURES}"
|
2018-11-07 15:50:24 +01:00
|
|
|
- stage: test and coverage
|
|
|
|
name: "Test with potgresql backend"
|
2018-11-04 20:27:27 +01:00
|
|
|
env:
|
2018-11-07 15:50:24 +01:00
|
|
|
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume_tests
|
2018-11-04 20:27:27 +01:00
|
|
|
- RUSTFLAGS='-C link-dead-code'
|
2018-11-07 15:50:24 +01:00
|
|
|
before_script: psql -c 'create database plume_tests;' -U postgres
|
2018-11-04 20:27:27 +01:00
|
|
|
script:
|
|
|
|
- |
|
2018-11-07 15:50:24 +01:00
|
|
|
cargo test --features "${FEATURES}" --no-default-features --all &&
|
|
|
|
./script/compute_coverage.sh
|
|
|
|
- stage: test and coverage
|
|
|
|
name: "Test with Sqlite backend"
|
|
|
|
env:
|
|
|
|
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
|
|
|
|
- RUSTFLAGS='-C link-dead-code'
|
|
|
|
script:
|
|
|
|
- |
|
|
|
|
cargo test --features "${FEATURES}" --no-default-features --all &&
|
|
|
|
./script/compute_coverage.sh
|