2019-08-08 12:22:35 +00:00
|
|
|
language: python
|
2020-01-05 22:04:58 +00:00
|
|
|
dist: bionic
|
2020-01-05 13:57:59 +00:00
|
|
|
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2019-08-08 12:22:35 +00:00
|
|
|
python:
|
2020-01-05 13:57:59 +00:00
|
|
|
- 3.7
|
|
|
|
- 3.8
|
|
|
|
|
2019-08-08 12:22:35 +00:00
|
|
|
stages:
|
|
|
|
- test
|
|
|
|
- lint
|
2020-01-05 13:57:59 +00:00
|
|
|
|
|
|
|
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
|
2019-08-08 12:22:35 +00:00
|
|
|
|
2019-08-08 13:14:45 +00:00
|
|
|
env:
|
2020-01-05 13:57:59 +00:00
|
|
|
global:
|
|
|
|
- PIPENV_VERBOSITY=-1
|
|
|
|
- TRAVIS_RUST_VERSION=nightly
|
|
|
|
- RUST_BACKTRACE=1
|
2020-01-05 15:23:56 +00:00
|
|
|
- secure: NsP9l1lbkaY2jRuxWtCl/k+abdpkZ8faeUu/EMtUQwK3ro110/P4IWaMoZ/KuQkouB6n+RNi9abM7RaOmV30QPE7Gpyn6ePKt8AANqX75J/iLjGaxmyKhvRoRtAOU+HcujRXAKEs9xPu56ZlvGVwlZECaqjQExn1ND07Sd5TvwjlEExvgjAemYeHUG4Hwcw2GCRfOQicVjbZxFHSLCQHUCSO3amKnB2Xwk1oa/CT4xaSuWEZRN1UW0qPWLrfmB3SrIgAIn+VlRQau9VW4D6tFqnREAq0ZZ4zr19OC3PiOm4VTiMJBFTHCKlGQcKAoE7qWyhQME8K3fxcxeNlj1k88RZUz4LLh6rTEaltnx3bB26dRohG3EngGjtITN/BtaH1oewPnSPyXWq08rQt7kt1w6bjWhLwaYGmL7f6H1ZA4lPCik/6Jf5kDGjD2lWIhzoyHYIU7Xk56KSgbqfexafnQHNv2irExW2nXJ8Iqke8iKWa8gm8Qy0lP8ODjWQi6GkW95N9umT7TSeLuiQKs241tMEetuYau64cqomy3KuucUtbjIA4N4R3ljDp4kSfi9T4RtnSMh/QAD6uKqMwcg1YEzIMsq7YkC1JwPaAsyUoDmd5xj54WJTko7MgTBk52V6yt05SNpx6jkXt8ZDnjwzeXn2COwpQE3NHY9/19bRcq7w=
|
2020-01-05 13:57:59 +00:00
|
|
|
|
|
|
|
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
|
2019-08-08 13:14:45 +00:00
|
|
|
|
2020-01-05 14:33:24 +00:00
|
|
|
jobs:
|
2019-08-08 12:22:35 +00:00
|
|
|
include:
|
2020-01-05 22:04:58 +00:00
|
|
|
- os: osx
|
|
|
|
osx_image: xcode11.3
|
|
|
|
language: rust
|
|
|
|
install:
|
|
|
|
- pip3 install -U maturin pytest
|
|
|
|
- maturin list-python
|
|
|
|
- cargo build
|
|
|
|
- cp target/debug/libtantivy.dylib tantivy/tantivy.so
|
|
|
|
script:
|
|
|
|
- python3 -m pytest -v
|
2020-01-05 14:33:24 +00:00
|
|
|
- language: rust
|
|
|
|
name: 'rust linters'
|
|
|
|
install: rustup component add clippy rustfmt
|
|
|
|
script:
|
2020-01-05 22:04:58 +00:00
|
|
|
- cargo clippy
|
|
|
|
- cargo fmt -- --check
|
2020-01-05 14:33:24 +00:00
|
|
|
stage: lint
|
2019-08-08 12:22:35 +00:00
|
|
|
|
2020-01-05 13:57:59 +00:00
|
|
|
script:
|
|
|
|
- pipenv run py.test -rws -v tests/
|
2020-01-05 15:48:49 +00:00
|
|
|
|
|
|
|
deploy:
|
2020-01-05 22:04:58 +00:00
|
|
|
# Deploy for linux using the manylinux docker image.
|
|
|
|
provider: script
|
|
|
|
script: "ci/deploy.sh"
|
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
condition: $TRAVIS_OS_NAME = linux
|
|
|
|
repo: tantivy-search/tantivy-py
|
2020-01-06 14:53:16 +00:00
|
|
|
python: 3.8
|
2020-01-05 22:04:58 +00:00
|
|
|
|
|
|
|
# Deploy for macos using maturin directly
|
|
|
|
provider: script
|
2020-01-06 14:53:16 +00:00
|
|
|
script: "ci/deploy_mac.sh"
|
2020-01-05 22:04:58 +00:00
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
condition: $TRAVIS_OS_NAME = osx
|
|
|
|
repo: tantivy-search/tantivy-py
|