forked from secti6n/porus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
72 lines (71 loc) · 2.17 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
os: linux
language: python
python:
- 3.5
- 3.6
- 3.7-dev
matrix:
include:
- name: Lint
language: rust
rust: nightly
install:
- rustup component add rustfmt
- rustup component add clippy
script:
- cargo fmt --all -- --check
- find solutions -name '*.rs' | xargs -I {} rustfmt --check {}
- find examples -name '*.rs' | xargs -I {} rustfmt --check {}
- cargo clippy --all-features
- cd porus_macros
- cargo clippy
- cd ..
after_success:
cache:
directories:
- $HOME/.cargo
- $TRAVIS_BUILD_DIR/target
- os: osx
language: generic
python: 3.6
before_install:
- curl -Lo python.pkg https://www.python.org/ftp/python/3.6.6/python-3.6.6-macosx10.6.pkg
- sudo installer -pkg python.pkg -target /
- /Applications/Python\ 3.6/Install\ Certificates.command
allow_failures:
- python: "3.7-dev"
env:
global:
- PATH=${PATH}:${HOME}/.cargo/bin
matrix:
- TRAVIS_RUST_VERSION=nightly
install:
- cd /tmp
- curl -sSf https://sh.rustup.rs/ | sh -s -- --default-toolchain=$TRAVIS_RUST_VERSION -y
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rustup target add x86_64-unknown-linux-gnu; fi
- CARGO_TARGET_DIR="${HOME}/.cargo/target" cargo install cargo-update || echo "cargo-update already installed"
- CARGO_TARGET_DIR="${HOME}/.cargo/target" cargo install --git git://github.com/bhuztez/cov cargo-cov || echo "cargo-cov already installed"
- CARGO_TARGET_DIR="${HOME}/.cargo/target" cargo install-update -ag
- cd "$TRAVIS_BUILD_DIR"
- pip3 install -r requirements.txt
script:
- cargo test --verbose
- cargo test --release --verbose
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then find solutions -name '*.rs' | xargs -I {} python3 -mix -v generate {}.c; fi
- python3 -mix -v test
- python3 -mix -v clean
- find solutions -name '*.rs' | xargs -I {} python3 -mix -v generate {}
- find examples -name '*.rs' | xargs -I {} python3 -mix -v generate {}
- python3 -mix -v clean
- python3 -mix -v clean examples
after_success:
- cargo cov clean
- COVERAGE=1 python3 -mix -v test
- cargo cov test -v
- cargo cov report --coveralls
cache:
pip: true
directories:
- $HOME/.cargo
- $TRAVIS_BUILD_DIR/target
- $TRAVIS_BUILD_DIR/testcases