forked from a1ien/rusb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (56 loc) · 1.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
language: rust
rust: stable
cache: cargo
matrix:
include:
- name: Linux with packaged libusb-1.0 library
os: linux
addons:
apt:
packages:
- libusb-1.0-0-dev
env:
- PKGCONFIG: libusb-1.0
- name: Linux building libusb-1.0 from source
os: linux
addons:
apt:
packages:
- libudev-dev
env:
- PKGCONFIG: libudev
- name: OS X building libusb-1.0 from source
os: osx
- name: Windows 64-bit using vcpkg
os: windows
env:
- VCPKG_ROOT: $TRAVIS_BUILD_DIR/vcp
- VCPKG_PLATFORM: x64-windows-static
- TARGET: stable-x86_64-pc-windows-msvc
- name: Windows 32-bit using vcpkg
os: windows
env:
- VCPKG_ROOT: $TRAVIS_BUILD_DIR/vcp
- VCPKG_PLATFORM: x86-windows-static
- TARGET: stable-i686-pc-windows-msvc
os: windows
before_script:
- |
if [ "$TARGET" != "" ]; then
echo "Rust extra toolchain"
rustup toolchain install ${TARGET}
rustup default ${TARGET}
fi
for pkg in $PKGCONFIG; do
echo "pkgconfig information:"
echo " $pkg version: $(pkg-config --modversion $pkg) libs: $(pkg-config --libs $pkg)"
done
if [ "$VCPKG_PLATFORM" != "" ]; then
echo "Handle vcpkg support"
git clone https://github.com/Microsoft/vcpkg.git vcp
[ $TRAVIS_OS_NAME == "windows" ] && vcp/bootstrap-vcpkg.bat || vcp/bootstrap-vcpkg.sh
./vcp/vcpkg install libusb:$VCPKG_PLATFORM
fi
script:
- cargo test --verbose --all
- cargo build --verbose --examples