forked from quickwit-oss/tantivy-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
109 lines (96 loc) · 3.59 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
os: linux
language: rust
stages:
- lint
- test
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
env:
global:
- TRAVIS_RUST_VERSION=stable
- RUST_BACKTRACE=1
- secure: ZR/4EeOZBCa63aYIuSo36c2DsJoRpOUTQo3zcPzOJoxFxvCTYUJnyX8P38hktdcTcpgEm1ALDbsQDZNboJIP80OkLtWbaQNHgP6jFLqbENryyXYmPunbU9QQWOZaFhEJ+kgUun3kBLYoTW0iZFcJ0AHzjogOEenxKan4lFsZG9Wgku8Q0HX0zK8PPk6ZpMASUrmDAUbW/K6fVuxpix+VF6iPeK1IOxnDSn9CMBI6F1Tq46J/kWzMOWthVthjA0G0OiXi4eQN3ysP/o4bYpr1mifiHCssVKpfwmpqoDR3Nka9H39RN8xcn4X+0h5XA+jAVsD4qUfOcg2otkuZST/h0r1Q30/NrxWmxS6PtIImVlOAxotEkrRwt/DT0sXSRbApmyLApPDPKJ16mjm1miAZvXeJOwB1pT9SKqyxlh4+pPOnXUMYVH44XVCTF7C3zsgxMmv3frRbKfcedJAon4UIIZdE3guA83aadTk6HEXXefmAsxEyJDsA3NJJ8Wm5GkGvrFJZnI9X88eYLX0+H+NW/RHi0CCi6JfnsFjmDpXLRkdAxN8fRIaaDBmleir2AFFXYHAPdcM7z/B1HnTTJBbjeezFwb8JvFPZzxIOijxVfIVeoGcOwgpFzm2wHEi0AH4z2KtAzDQnhdhmle3Q4TrCt78e0iFJb1dANbdmhYpe/xI=
install:
- cargo build
script:
- python -m pytest -v
jobs:
include:
- os: linux
dist: bionic
language: python
python: 3.8
services:
- docker
before_install:
- pip install --upgrade pip
- pip install -U pytest
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
- source "$HOME"/.cargo/env
before_script:
- cp target/debug/libtantivy.so tantivy/tantivy.so
- os: osx
osx_image: xcode11.3
before_install:
- pyenv install --list
- pyenv install 3.8.0
- ls /Users/travis/.pyenv/versions/3.8.0/bin
- pip3 install -U maturin pytest
- maturin list-python
before_script:
- cp target/debug/libtantivy.dylib tantivy/tantivy.so
script:
- python3 -m pytest -v
env: PATH=/Users/travis/.pyenv/versions/3.8.0/bin:$PATH
- os: windows
before_install:
- 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
before_script:
- dir target/debug
- cp target/debug/tantivy.dll tantivy/tantivy.pyd
env: PATH=/c/Python38:/c/Python37:/c/Python38/Scripts:/c/Python37/Scripts:$PATH
- os: linux
dist: bionic
python: 3.8
name: 'rust linters'
install: rustup component add clippy rustfmt
script:
- python3 --version
- cargo clippy
- cargo fmt -- --check
stage: lint
deploy:
# Deploy for linux using the manylinux docker image.
- provider: script
script: "ci/deploy.sh"
on:
tags: true
python: 3.8
condition: $TRAVIS_OS_NAME = linux
repo: quickwit-inc/tantivy-py
# Deploy for macos using maturin directly
- provider: script
script: "ci/deploy_mac.sh"
on:
tags: true
condition: $TRAVIS_OS_NAME = osx
repo: quickwit-inc/tantivy-py
# 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: quickwit-inc/tantivy-py