2020-01-25 09:42:39 +00:00
|
|
|
os: linux
|
2020-01-25 09:24:09 +00:00
|
|
|
language: rust
|
2020-01-05 13:57:59 +00:00
|
|
|
|
2019-08-08 12:22:35 +00:00
|
|
|
stages:
|
|
|
|
- lint
|
2020-01-25 09:42:39 +00:00
|
|
|
- test
|
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
|
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:
|
2021-02-23 01:02:16 +00:00
|
|
|
- TRAVIS_RUST_VERSION=stable
|
2020-01-05 13:57:59 +00:00
|
|
|
- RUST_BACKTRACE=1
|
2020-01-25 09:11:27 +00:00
|
|
|
- secure: ZR/4EeOZBCa63aYIuSo36c2DsJoRpOUTQo3zcPzOJoxFxvCTYUJnyX8P38hktdcTcpgEm1ALDbsQDZNboJIP80OkLtWbaQNHgP6jFLqbENryyXYmPunbU9QQWOZaFhEJ+kgUun3kBLYoTW0iZFcJ0AHzjogOEenxKan4lFsZG9Wgku8Q0HX0zK8PPk6ZpMASUrmDAUbW/K6fVuxpix+VF6iPeK1IOxnDSn9CMBI6F1Tq46J/kWzMOWthVthjA0G0OiXi4eQN3ysP/o4bYpr1mifiHCssVKpfwmpqoDR3Nka9H39RN8xcn4X+0h5XA+jAVsD4qUfOcg2otkuZST/h0r1Q30/NrxWmxS6PtIImVlOAxotEkrRwt/DT0sXSRbApmyLApPDPKJ16mjm1miAZvXeJOwB1pT9SKqyxlh4+pPOnXUMYVH44XVCTF7C3zsgxMmv3frRbKfcedJAon4UIIZdE3guA83aadTk6HEXXefmAsxEyJDsA3NJJ8Wm5GkGvrFJZnI9X88eYLX0+H+NW/RHi0CCi6JfnsFjmDpXLRkdAxN8fRIaaDBmleir2AFFXYHAPdcM7z/B1HnTTJBbjeezFwb8JvFPZzxIOijxVfIVeoGcOwgpFzm2wHEi0AH4z2KtAzDQnhdhmle3Q4TrCt78e0iFJb1dANbdmhYpe/xI=
|
2020-01-05 13:57:59 +00:00
|
|
|
|
|
|
|
install:
|
2020-01-06 17:03:28 +00:00
|
|
|
- cargo build
|
2020-01-05 13:57:59 +00:00
|
|
|
|
2020-01-25 09:24:09 +00:00
|
|
|
script:
|
|
|
|
- python -m pytest -v
|
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-25 09:24:09 +00:00
|
|
|
- os: linux
|
|
|
|
dist: bionic
|
|
|
|
language: python
|
2020-01-25 09:42:39 +00:00
|
|
|
python: 3.8
|
2020-01-25 09:24:09 +00:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
before_install:
|
|
|
|
- pip install --upgrade pip
|
|
|
|
- pip install -U pytest
|
2021-02-23 01:02:16 +00:00
|
|
|
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
2020-01-25 09:24:09 +00:00
|
|
|
- source "$HOME"/.cargo/env
|
|
|
|
before_script:
|
|
|
|
- cp target/debug/libtantivy.so tantivy/tantivy.so
|
|
|
|
|
2020-01-05 22:04:58 +00:00
|
|
|
- os: osx
|
|
|
|
osx_image: xcode11.3
|
2020-01-25 09:24:09 +00:00
|
|
|
before_install:
|
2020-01-06 16:12:41 +00:00
|
|
|
- pyenv install --list
|
2020-01-06 16:18:32 +00:00
|
|
|
- pyenv install 3.8.0
|
2020-01-06 16:36:45 +00:00
|
|
|
- ls /Users/travis/.pyenv/versions/3.8.0/bin
|
2020-01-05 22:04:58 +00:00
|
|
|
- pip3 install -U maturin pytest
|
|
|
|
- maturin list-python
|
2020-01-25 09:24:09 +00:00
|
|
|
before_script:
|
2020-01-05 22:04:58 +00:00
|
|
|
- cp target/debug/libtantivy.dylib tantivy/tantivy.so
|
|
|
|
script:
|
|
|
|
- python3 -m pytest -v
|
2020-01-25 09:24:09 +00:00
|
|
|
env: PATH=/Users/travis/.pyenv/versions/3.8.0/bin:$PATH
|
|
|
|
|
2020-01-06 17:37:43 +00:00
|
|
|
- os: windows
|
2020-01-25 09:24:09 +00:00
|
|
|
before_install:
|
2020-01-06 17:37:43 +00:00
|
|
|
- choco install python --version 3.8.0
|
|
|
|
- choco install python --version 3.7.5 --side-by-side
|
|
|
|
- python -m pip install --upgrade pip
|
|
|
|
- pip3 install -U maturin pytest
|
|
|
|
- maturin list-python
|
2020-01-25 09:24:09 +00:00
|
|
|
before_script:
|
2020-01-06 17:37:43 +00:00
|
|
|
- dir target/debug
|
|
|
|
- cp target/debug/tantivy.dll tantivy/tantivy.pyd
|
|
|
|
env: PATH=/c/Python38:/c/Python37:/c/Python38/Scripts:/c/Python37/Scripts:$PATH
|
2020-01-25 09:24:09 +00:00
|
|
|
|
2021-02-23 01:02:16 +00:00
|
|
|
- os: linux
|
|
|
|
dist: bionic
|
|
|
|
python: 3.8
|
|
|
|
name: 'rust linters'
|
2020-01-05 14:33:24 +00:00
|
|
|
install: rustup component add clippy rustfmt
|
|
|
|
script:
|
2021-02-23 01:02:16 +00:00
|
|
|
- python3 --version
|
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 15:48:49 +00:00
|
|
|
deploy:
|
2020-01-05 22:04:58 +00:00
|
|
|
# Deploy for linux using the manylinux docker image.
|
2020-01-06 15:25:35 +00:00
|
|
|
- provider: script
|
|
|
|
script: "ci/deploy.sh"
|
|
|
|
on:
|
2020-01-05 22:04:58 +00:00
|
|
|
tags: true
|
2020-01-25 10:34:02 +00:00
|
|
|
python: 3.8
|
2020-01-05 22:04:58 +00:00
|
|
|
condition: $TRAVIS_OS_NAME = linux
|
|
|
|
repo: tantivy-search/tantivy-py
|
|
|
|
|
|
|
|
# Deploy for macos using maturin directly
|
2020-01-06 15:25:35 +00:00
|
|
|
- provider: script
|
|
|
|
script: "ci/deploy_mac.sh"
|
|
|
|
on:
|
2020-01-05 22:04:58 +00:00
|
|
|
tags: true
|
|
|
|
condition: $TRAVIS_OS_NAME = osx
|
|
|
|
repo: tantivy-search/tantivy-py
|
2020-01-06 17:37:43 +00:00
|
|
|
|
|
|
|
# Deploy for windows using maturin directly
|
|
|
|
- provider: script
|
|
|
|
script: maturin publish --username __token__ --password $MATURIN_PASSWORD --no-sdist
|
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
condition: $TRAVIS_OS_NAME = windows
|
|
|
|
repo: tantivy-search/tantivy-py
|