Travis cleanup

This commit is contained in:
konstin 2019-02-13 12:28:41 +01:00
parent a1f13c124a
commit 7a4cb50c96
5 changed files with 22 additions and 74 deletions

View File

@ -8,23 +8,32 @@ cache:
matrix:
include:
- python: "2.7"
- name: Python 2.7
python: "2.7"
env: FEATURES=python2
- python: "3.5"
- name: Python 3.5
python: "3.5"
env: FEATURES=python3
- python: "3.6"
- name: Python 3.6
python: "3.6"
env: FEATURES=python3
- python: "3.7"
- name: Python 3.7
python: "3.7"
env: FEATURES=python3
- python: "3.8-dev"
- name: Python 3.8-dev
python: "3.8-dev"
env: FEATURES=python3
- name: Minimum nightly
python: "3.7"
# Keep this synced up with build.rs
env: FEATURES=python3 TRAVIS_RUST_VERSION=nightly-2019-02-07
allow_failures:
- python: "3.8-dev"
env: FEATURES=python3
env:
global:
- TRAVIS_RUST_VERSION=nightly-2019-02-07
- TRAVIS_RUST_VERSION=nightly
- RUST_BACKTRACE=1
addons:
@ -48,13 +57,6 @@ script:
- ./ci/travis/test.sh
deploy:
# FIXME: kcov seems to be broken
# - provider: script
# skip_cleanup: true
# script: ./ci/travis/cover.sh
# on:
# branch: master
# condition: $TRAVIS_EVENT_TYPE != "cron"
- provider: script
skip_cleanup: true
script: ./ci/travis/guide.sh

View File

@ -1,6 +1,3 @@
extern crate regex;
extern crate version_check;
use regex::Regex;
use std::collections::HashMap;
use std::convert::AsRef;
@ -13,10 +10,11 @@ use std::process::Command;
use std::process::Stdio;
use version_check::{is_min_date, is_min_version, supports_features};
// Specifies the minimum nightly version needed to compile pyo3.
// This requirement is due to https://github.com/rust-lang/rust/issues/55380
const MIN_DATE: &'static str = "2018-11-02";
const MIN_VERSION: &'static str = "1.32.0-nightly";
/// Specifies the minimum nightly version needed to compile pyo3.
/// Keep this synced up with the travis ci config,
/// But note that this is the rustc version which can be lower than the nightly version
const MIN_DATE: &'static str = "2019-02-06";
const MIN_VERSION: &'static str = "1.34.0-nightly";
#[derive(Debug)]
struct PythonVersion {

View File

@ -1,23 +0,0 @@
#!/bin/sh
set -ex
### Run kcov in parallel #######################################################
rm -f target/debug/pyo3-*.d
rm -f target/debug/test_*.d
rm -f target/debug/test_doc-*
# echo $FILES
FILES=$(find . -path ./target/debug/pyo3-\* -or -path ./target/debug/test_\*)
echo $FILES | xargs -n1 -P $(nproc) sh -c '
dir="target/cov/$(basename $@)"
mkdir -p $dir
echo "Collecting coverage data of $(basename $@)"
kcov --exclude-pattern=/.cargo,/usr/lib --verify $dir "$@" 2>&1 >/dev/null
' _
### Upload coverage ############################################################
echo "Uploading code coverage"
curl -SsL https://codecov.io/bash | bash

View File

@ -1,42 +1,14 @@
#!/bin/sh
set -e
# Find the installed version of a binary, if any
_installed() {
VERSION=$($@ --version 2>/dev/null || echo "$@ none")
echo $VERSION | rev | cut -d' ' -f1 | rev
}
# Find the latest available version of a binary on `crates.io`
_latest() {
VERSION=$(cargo search -q "$@" | grep "$@" | cut -f2 -d"\"")
echo $VERSION
}
set -ex
### Setup Rust toolchain #######################################################
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=$TRAVIS_RUST_VERSION
export PATH=$PATH:$HOME/.cargo/bin
rustup component add clippy || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
rustup component add clippy || cargo install --git https://github.com/rust-lang/rust-clippy --force clippy
rustup component add rustfmt
### Setup kcov #################################################################
if [ ! -f "$HOME/.cargo/bin/kcov" ]; then
if [ ! -d "$HOME/kcov/.git" ]; then
git clone --depth=1 https://github.com/SimonKagstrom/kcov "$HOME/kcov"
fi
cd $HOME/kcov
git pull
cmake .
make
install src/kcov $HOME/.cargo/bin/kcov
cd $TRAVIS_BUILD_DIR
fi
### Setup python linker flags ##################################################
PYTHON_LIB=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")

View File

@ -1 +0,0 @@
nightly