-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (41 loc) · 1.7 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
language: rust
rust:
- nightly
- stable
os:
- linux
- osx
cache:
cargo: true
yarn: true
addons:
apt:
packages:
- build-essential
- libudev-dev
before_install:
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then wget https://github.com/libusb/libusb/archive/v1.0.19.tar.gz -O libusb-1.0.19.tar.gz; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then tar -zxvf libusb-1.0.19.tar.gz; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then cd libusb-1.0.19 && ./autogen.sh && ./configure --prefix=$HOME/local && make && make install; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig pkg-config --list-all; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig pkg-config --libs libusb-1.0; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig pkg-config --modversion libusb-1.0; fi
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then cd ..; fi
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.21.1
- export PATH="$HOME/.yarn/bin:$PATH"
before_script:
- rustup target add thumbv6m-none-eabi
script:
- cd sw/cli
- if [[ $TRAVIS_OS_NAME == 'linux' ]]; then PKG_CONFIG_PATH=$HOME/local/lib/pkgconfig LD_LIBRARY_PATH=$HOME/local/lib:$LD_LIBRARY_PATH cargo build; fi
- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then cargo build; fi
- cd ../firmware/bin
- if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then cargo build --target thumbv6m-none-eabi --release --features nightly; fi
- if [[ "$TRAVIS_RUST_VERSION" == "stable" ]]; then cargo build --target thumbv6m-none-eabi --release; fi
- cargo test --package kroneum-api
notifications:
email:
on_success: never
branches:
only:
- master