Travis: Update the travis file to use Pipenv and maturin.

master
Damir Jelić 2020-01-05 14:57:59 +01:00
parent df26c74aee
commit 6a7c6f9c81
1 changed files with 40 additions and 17 deletions

View File

@ -1,19 +1,51 @@
dist: bionic
language: python language: python
dist: xenial
services:
- docker
python: python:
- '3.6' - 3.7
- '3.7' - 3.8
stages: stages:
- test - test
- lint - lint
- wheels
cache:
pip: true
cargo: true
before_cache:
- rm -rfv target/debug/incremental/{tantivy,build_script_build,common}-*
- rm -rfv target/debug/.fingerprint/tantivy-*
- rm -rfv target/debug/build/tantivy-*
- rm -rfv target/debug/deps/libtantivy-*
- rm -rfv target/debug/deps/tantivy-*
- rm -rfv target/debug/{tantivy,libtantivy}.d
- cargo clean -p tantivy-py
env: env:
- PATH=$HOME/.cargo/bin:$PATH global:
- PIPENV_VERBOSITY=-1
- TRAVIS_RUST_VERSION=nightly
- RUST_BACKTRACE=1
install:
- pip install --upgrade pip
- pip install -U pipenv
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
- source "$HOME"/.cargo/env
- pipenv install --dev .
before_script:
- rustc --version
- python --version
matrix: matrix:
include: include:
- python: '3.7' - python: 3.7
name: 'rust linters' name: 'rust linters'
install: rustup component add clippy rustfmt install: rustup component add clippy rustfmt
script: script:
@ -21,14 +53,5 @@ matrix:
- cargo fmt -- --check - cargo fmt -- --check
stage: lint stage: lint
cache: script:
pip: true - pipenv run py.test -rws -v tests/
directories:
- $HOME/.cargo
- $TRAVIS_BUILD_DIR/target
before_install:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
install: pip install -U tox pyo3-pack tox-pyo3 tox-travis
script: tox