-
Notifications
You must be signed in to change notification settings - Fork 76
/
.travis.yml
95 lines (72 loc) · 2.25 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Based on the "trust" template v0.1.2
# https://github.com/japaric/trust/tree/v0.1.2
# Ubuntu versions:
# https://docs.travis-ci.com/user/reference/linux/
dist: xenial
sudo: false
language: rust
compiler: gcc
os:
- linux
- osx
rust:
- stable
- nightly
- 1.46.0
matrix:
include:
- os: osx
osx_image: xcode8
- os: osx
osx_image: xcode11
branches:
only:
- master
- travis
notifications:
email: change
cache: cargo
before_cache:
# Travis can't cache files that are not readable by "others"
- chmod -R a+r $HOME/.cargo
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libgtk-3-dev
- libgtk-3-0
- libstdc++-6-pic
before_install:
- set -e
- rustup self update
install:
- source ~/.cargo/env || true
- export SDK_URL=https://raw.githubusercontent.com/c-smile/sciter-sdk/master
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export SDK_DLL="$TRAVIS_BUILD_DIR/libsciter.dylib"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export SDK_DLL="$TRAVIS_BUILD_DIR/libsciter-gtk.so"; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then curl -so "$SDK_DLL" $SDK_URL/bin.osx/libsciter.dylib; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then curl -so "$SDK_DLL" $SDK_URL/bin.lnx/x64/libsciter-gtk.so; fi
before_script:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$TRAVIS_BUILD_DIR"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$TRAVIS_BUILD_DIR"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export RUSTFLAGS='-C link-arg=-Wl,--unresolved-symbols=ignore-in-shared-libs'; fi
- export PATH="$PATH:$TRAVIS_BUILD_DIR"
- export LIBRARY_PATH="$LIBRARY_PATH:$TRAVIS_BUILD_DIR"
- export RUST_BACKTRACE=full
- #ls /usr/lib/x86_64-linux-gnu/libstdc++*
- #strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBC
- #file $SDK_DLL
- gcc --version
- rustc --version
script:
- cargo update
- cargo run --example first
- cargo run --example first --features "dynamic"
- cargo run --example first --features "dynamic" -- "$SDK_DLL"
- cargo build --all
- cargo build --all --release
- cargo build --examples --release
- cargo test -p sciter-rs
- cargo test -p sciter-rs --release
after_script: set +e