Skip to content

Commit

Permalink
Travis: Remove unused cache (prone to intermittent failures) (#442)
Browse files Browse the repository at this point in the history
* Travis: Remove unused cache (prone to intermittent failures)

* fix missing cargo config
  • Loading branch information
JohanLorenzo authored and fabricedesre committed Apr 28, 2016
1 parent 1869692 commit e42e681
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@ matrix:
rust: nightly-2016-04-10
env: BUILD_ENV=-arm_cross_compile

cache:
directories:
- $HOME/.cargo
- node_modules
- $TRAVIS_BUILD_DIR/target

addons:
firefox: latest
apt:
Expand Down
16 changes: 11 additions & 5 deletions tools/travis-linux-arm_cross_compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,18 @@ EOF
libudev-dev:armhf libavahi-client-dev:armhf libsqlite3-dev:armhf
}

_set_up_cargo_config() {
mkdir -p "$HOME/.cargo"
touch "$HOME/.cargo/config"
tee -a "$HOME/.cargo/config" << EOF
[target.$RUST_TARGET]
linker = "$BUILD_TARGET-gcc"
EOF
}

_set_up_environment() {
_set_up_cargo_config

# open-zwave wants -cc and -c++ but no package seems to provid them.
sudo cp "/usr/bin/$BUILD_TARGET-gcc" "/usr/bin/$BUILD_TARGET-cc"
sudo cp "/usr/bin/$BUILD_TARGET-g++" "/usr/bin/$BUILD_TARGET-c++"
Expand All @@ -39,11 +50,6 @@ _set_up_environment() {
# For open-zwave
export CROSS_COMPILE="$BUILD_TARGET-"

tee -a $HOME/.cargo/config << EOF
[target.$RUST_TARGET]
linker = "$BUILD_TARGET-gcc"
EOF

export PKG_CONFIG_LIBDIR="/usr/lib/$BUILD_TARGET/pkgconfig"
export PKG_CONFIG_ALLOW_CROSS=1
}
Expand Down

0 comments on commit e42e681

Please sign in to comment.