From c01613df402c256270b1f0532590558e40c59290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Mon, 17 Dec 2018 15:52:49 +0100 Subject: [PATCH] chore: Add travis-ci to check the codebase --- .travis.yml | 22 ++++++++++++++++++++++ Cargo.toml | 1 + ci/meilidb.sh | 15 +++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 .travis.yml create mode 100755 ci/meilidb.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..bbb375b5d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: rust + +cache: cargo + +branches: + only: + - master + +matrix: + fast_finish: true + include: + + # Test crates on their minimum Rust versions. + - rust: 1.31.0 + name: "meilidb on 1.31.0" + script: ./ci/meilidb.sh + + # Test crates on nightly Rust. + - rust: nightly + name: "meilidb on nightly" + script: ./ci/meilidb.sh + diff --git a/Cargo.toml b/Cargo.toml index 94d864ad3..a4618b279 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,7 @@ default = ["simd"] i128 = ["bincode/i128", "byteorder/i128"] simd = ["rocksdb/sse"] portable = ["rocksdb/portable"] +nightly = [] [dev-dependencies] csv = "1.0" diff --git a/ci/meilidb.sh b/ci/meilidb.sh new file mode 100755 index 000000000..35bf88fef --- /dev/null +++ b/ci/meilidb.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +cd "$(dirname "$0")"/.. +set -ex + +export RUSTFLAGS="-D warnings" + +cargo check --no-default-features +cargo check --bins --examples --tests +cargo test + +if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then + cargo check --no-default-features --features nightly + cargo test --features nightly +fi