-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
118 lines (118 loc) · 4.03 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
language: rust
matrix:
include:
- os: linux
dist: bionic
rust:
- 1.38.0
env:
- RUST_BACKTRACE=1
- USE_NA_BUCKET=1
before_script:
- sudo apt update -yqq
- sudo apt install -yqq curl libcurl4 git-core build-essential
- cargo install --force cbindgen
script:
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
for dir in qiniu-rust qiniu-rust-http qiniu-rust-with-libcurl qiniu-rust-test qiniu-rust-test-utils qiniu-c; do
make -C $dir test
done
fi
- os: linux
dist: bionic
rust:
- 1.38.0
env:
- RUST_BACKTRACE=1
- USE_NA_BUCKET=1
before_script:
- sudo apt update -yqq
- sudo apt install -yqq curl libcurl4 git-core build-essential pkg-config libssl-dev zlib1g-dev libreadline-dev openjdk-8-jdk rbenv
- cargo install --force cbindgen
- |
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
sudo apt-get update -yqq
sudo apt-get install -yqq clang-10
export PATH="$PATH:/usr/lib/llvm-10/bin"
- |
mkdir -p "$(rbenv root)"/plugins
git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
script:
- make -C qiniu-c build
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
eval "$(rbenv init -)"
(
rbenv install 2.4.0
rbenv shell 2.4.0
gem install bundler
make -C qiniu-ruby build
make -C qiniu-ruby test
)
(
rbenv install jruby-9.2.0.0
rbenv shell jruby-9.2.0.0
gem install bundler
make -C qiniu-ruby build
make -C qiniu-ruby test
)
fi
- os: osx
rust:
- 1.38.0
env:
- HOMEBREW_NO_AUTO_UPDATE=1
- RUST_BACKTRACE=1
- USE_NA_BUCKET=1
before_script:
- brew install curl
- cargo install --force cbindgen
script:
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
for dir in qiniu-rust qiniu-rust-http qiniu-rust-with-libcurl qiniu-rust-test qiniu-rust-test-utils qiniu-c; do
make -C $dir test
done
fi
- os: osx
rust:
- 1.38.0
env:
- HOMEBREW_NO_AUTO_UPDATE=1
- RUST_BACKTRACE=1
- USE_NA_BUCKET=1
before_script:
- brew install curl rbenv llvm
- export PATH="$(brew --prefix llvm)/bin:$PATH"
- cargo install --force cbindgen
script:
- make -C qiniu-c build
- |
eval "$(rbenv init -)"
rbenv install 2.4.0
rbenv shell 2.4.0
gem install bundler
make -C qiniu-ruby build test
- os: windows
rust:
- 1.38.0-x86_64-pc-windows-msvc
env:
- RUST_BACKTRACE=1
- USE_NA_BUCKET=1
before_script:
- choco install make --force
- choco install doxygen.install --force
- choco install curl --version=7.67.0 --force
- cargo install --force cbindgen
script:
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
cd qiniu-c
cp /c/ProgramData/chocolatey/lib/curl/tools/curl-7.67.0-win64-mingw/bin/*.dll .
cp -r /c/ProgramData/chocolatey/lib/curl/tools/curl-7.67.0-win64-mingw/include/curl .
echo '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64 && make build || exit 1' | cmd.exe
cp ../target/debug/qiniu_ng_c.dll* .
echo '"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat" amd64 && make test || exit 1' | cmd.exe
fi