pyo3/.travis.yml

49 lines
1.6 KiB
YAML
Raw Normal View History

2015-06-28 19:46:24 +00:00
language: python
python:
2017-06-12 05:23:49 +00:00
- "2.7"
2015-09-13 17:49:09 +00:00
- "3.5"
2017-01-18 20:28:04 +00:00
- "3.6"
2017-06-12 01:30:56 +00:00
2015-04-19 03:21:28 +00:00
env:
2017-05-14 19:55:52 +00:00
# - RUST_VERSION=1.17.0
- RUST_VERSION=nightly
2017-06-12 01:30:56 +00:00
2017-05-21 05:24:30 +00:00
sudo: required
dist: trusty
2017-06-15 16:11:19 +00:00
# Add clippy
before_script:
- |
if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
( ( cargo install clippy && export CLIPPY=true ) || export CLIPPY=false );
fi
- export PATH=$PATH:~/.cargo/bin
2015-06-28 19:46:24 +00:00
install:
- python -c "import sysconfig; print('\n'.join(map(repr,sorted(sysconfig.get_config_vars().items()))))"
2015-06-28 19:46:24 +00:00
- mkdir ~/rust-installer
- curl -sL https://static.rust-lang.org/rustup.sh -o ~/rust-installer/rustup.sh
2017-05-19 18:48:05 +00:00
- sh ~/rust-installer/rustup.sh --prefix=~/rust --spec=$RUST_VERSION -y
2015-06-28 19:46:24 +00:00
- export PATH="$HOME/rust/bin:$PATH"
- export PYTHON_LIB=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
- find $PYTHON_LIB
2015-06-28 19:46:24 +00:00
- export LIBRARY_PATH="$LIBRARY_PATH:$PYTHON_LIB"
- export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PYTHON_LIB:$HOME/rust/lib"
- rustc -V
2015-04-19 04:32:59 +00:00
script:
2017-05-13 06:01:54 +00:00
- make test
2017-06-15 16:11:19 +00:00
# - make clippy
# Upload docs
after_success:
2017-06-15 18:13:58 +00:00
- |
2017-06-15 22:33:06 +00:00
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "master" && "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
2017-06-15 18:13:58 +00:00
cargo doc --no-deps &&
echo "<meta http-equiv=refresh content=0;url=os_balloon/index.html>" > target/doc/index.html &&
cargo install mdbook &&
cd guide && mdbook build -d ../target/doc/guide && cd .. &&
2017-06-15 18:13:58 +00:00
git clone https://github.com/davisp/ghp-import.git &&
2017-06-15 18:20:40 +00:00
./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -r https://"$GH_TOKEN"@github.com/"$TRAVIS_REPO_SLUG.git" target/doc &&
2017-06-15 18:13:58 +00:00
echo "Uploaded documentation"
2017-06-15 16:11:19 +00:00
fi