Skip to content

Commit 871c12a

Browse files
authored
Merge pull request #87 from chansuke/update-rust-config
#75 Fix rust setup.
2 parents f7d9bda + 1532362 commit 871c12a

File tree

2 files changed

+12
-31
lines changed

2 files changed

+12
-31
lines changed

.travis.yml

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,21 @@
1-
# Travis only supports one language per project, so we need to put something
2-
# here. node_js is as good as any other I suppose.
3-
language: node_js
4-
node_js:
5-
- "0.10"
6-
7-
# TODO(issue #75): Fix rust travisCi config.
8-
## For rust, we need to install cargo, rustc. In order to do that, we'll use
9-
## apt-get, which requires sudo.
10-
#sudo: true
11-
#
12-
## The rust-nightly package is only built for 14.04 (Trusty) and 16.04 (Xenial),
13-
## so we cannot use the default Travis ubuntu image (Precise) for these tests.
14-
#dist: trusty
15-
16-
# Install package dependencies. See
17-
# http://docs.travis-ci.com/user/installing-dependencies/
18-
# gulp: required for JS testing
19-
before_install:
20-
- npm install -g gulp
21-
# TODO(issue #75): Fix rust travisCi config.
22-
# - yes | sudo add-apt-repository ppa:jonathonf/rustlang
23-
# - yes | sudo add-apt-repository ppa:jonathonf/llvm
24-
# - yes | sudo add-apt-repository ppa:jonathonf/gcc
25-
# - sudo apt-get update
26-
#
27-
#install:
28-
# sudo apt-get -y install libstd-rust-1.16 libstd-rust-dev rustc cargo
1+
matrix:
2+
include:
3+
- language: node_js
4+
node_js:
5+
- "0.10"
6+
- language: rust
7+
script:
8+
- cd rust/
9+
- cargo build --verbose --all
10+
- cargo test --verbose --all
2911

3012
# Define the list of directories to execute tests in.
3113
env:
3214
- TEST_DIR=js
3315
- TEST_DIR=go
3416
- TEST_DIR=ruby
3517
- TEST_DIR=python
36-
# TODO(issue #75): Fix rust travisCi config.
37-
# - TEST_DIR=rust
18+
- TEST_DIR=rust
3819

3920
# Test script to run. This is called once for each TEST_DIR value above.
4021
script: ./run_tests.sh

run_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ if [ "$TEST_DIR" == "python" ]; then
3636
python python/openlocationcode_test.py
3737
exit
3838
fi
39-
39+
# Rust?
4040
if [ "$TEST_DIR" == "rust" ]; then
4141
curl https://sh.rustup.rs -sSf | sh -s -- -y
4242
export PATH=$PATH:$HOME/.cargo/bin

0 commit comments

Comments
 (0)