2018-04-30 21:15:07 +00:00
|
|
|
language: rust
|
|
|
|
rust:
|
2018-12-07 20:00:12 +00:00
|
|
|
- nightly-2018-12-06
|
2018-11-04 19:27:27 +00:00
|
|
|
cache:
|
|
|
|
cargo: true
|
|
|
|
directories:
|
|
|
|
- kcov-master
|
2018-11-01 21:23:38 +00:00
|
|
|
sudo: true
|
|
|
|
dist: trusty
|
2018-11-07 14:50:24 +00:00
|
|
|
services: postgres
|
2018-11-01 21:23:38 +00:00
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libcurl4-openssl-dev
|
|
|
|
- libelf-dev
|
|
|
|
- libdw-dev
|
|
|
|
- cmake
|
|
|
|
- gcc
|
|
|
|
- binutils-dev
|
|
|
|
- zlib1g-dev
|
|
|
|
- libiberty-dev
|
2018-11-04 19:27:27 +00:00
|
|
|
stages:
|
|
|
|
- build
|
2018-11-07 14:50:24 +00:00
|
|
|
- test and coverage
|
2018-11-01 21:23:38 +00:00
|
|
|
jobs:
|
|
|
|
include:
|
2018-12-25 10:51:40 +00:00
|
|
|
- stage: build
|
|
|
|
name: "Build front"
|
2019-03-19 13:37:56 +00:00
|
|
|
script: (cargo web -h || cargo install cargo-web) && cd plume-front && cargo clippy -- -D warnings && cargo web check
|
|
|
|
before_script: rustup component add clippy
|
|
|
|
|
2018-11-04 19:27:27 +00:00
|
|
|
- stage: build
|
|
|
|
name: "Build with postgresql"
|
2018-11-01 21:23:38 +00:00
|
|
|
env:
|
|
|
|
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume
|
2019-03-19 13:37:56 +00:00
|
|
|
script: cargo clippy --no-default-features --features="${FEATURES}" --release -- -D warnings
|
|
|
|
before_script: rustup component add clippy
|
|
|
|
|
|
|
|
- stage: build
|
|
|
|
name: "Build CLI with postgresql"
|
|
|
|
env:
|
|
|
|
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume
|
|
|
|
script: cd plume-cli && cargo clippy --no-default-features --features="${FEATURES}" --release -- -D warnings
|
|
|
|
before_script: rustup component add clippy
|
2018-11-04 19:27:27 +00:00
|
|
|
- stage: build
|
|
|
|
name: "Build with sqlite"
|
2018-11-01 21:23:38 +00:00
|
|
|
env:
|
|
|
|
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
|
2019-03-19 13:37:56 +00:00
|
|
|
script: cargo clippy --no-default-features --features="${FEATURES}" --release -- -D warnings
|
|
|
|
before_script: rustup component add clippy
|
|
|
|
|
|
|
|
- stage: build
|
|
|
|
name: "Build CLI with sqlite"
|
|
|
|
env:
|
|
|
|
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
|
|
|
|
script: cd plume-cli && cargo clippy --no-default-features --features="${FEATURES}" --release -- -D warnings
|
|
|
|
before_script: rustup component add clippy
|
|
|
|
|
2018-11-07 14:50:24 +00:00
|
|
|
- stage: test and coverage
|
|
|
|
name: "Test with potgresql backend"
|
2018-11-04 19:27:27 +00:00
|
|
|
env:
|
2018-11-07 14:50:24 +00:00
|
|
|
- MIGRATION_DIR=migrations/postgres FEATURES=postgres DATABASE_URL=postgres://postgres@localhost/plume_tests
|
2018-11-24 11:44:17 +00:00
|
|
|
- RUSTFLAGS='-C link-dead-code' RUST_TEST_THREADS=1
|
2018-11-07 14:50:24 +00:00
|
|
|
before_script: psql -c 'create database plume_tests;' -U postgres
|
2018-11-04 19:27:27 +00:00
|
|
|
script:
|
|
|
|
- |
|
2018-12-25 10:51:40 +00:00
|
|
|
cargo test --features "${FEATURES}" --no-default-features --all --exclude plume-front &&
|
2018-11-07 14:50:24 +00:00
|
|
|
./script/compute_coverage.sh
|
2019-03-19 13:37:56 +00:00
|
|
|
|
2018-11-07 14:50:24 +00:00
|
|
|
- stage: test and coverage
|
|
|
|
name: "Test with Sqlite backend"
|
|
|
|
env:
|
|
|
|
- MIGRATION_DIR=migrations/sqlite FEATURES=sqlite DATABASE_URL=plume.sqlite3
|
2018-11-24 11:44:17 +00:00
|
|
|
- RUSTFLAGS='-C link-dead-code' RUST_TEST_THREADS=1
|
2018-11-07 14:50:24 +00:00
|
|
|
script:
|
|
|
|
- |
|
2018-12-25 10:51:40 +00:00
|
|
|
cargo test --features "${FEATURES}" --no-default-features --all --exclude plume-front &&
|
2018-11-07 14:50:24 +00:00
|
|
|
./script/compute_coverage.sh
|