Skip to content

Commit

Permalink
Fix build on Travis CI [ECR-1658] (#292):
Browse files Browse the repository at this point in the history
* Build the dependencies instead of using installed in the system
 to prevent illegal instructions appearing in our artefacts (the actual cause
 is still unknown).
* Disable caching of rust/target for it takes at least 2.5G, 
which is too much for Travis to archive and upload.
  • Loading branch information
alexander-irbis authored and dmitry-timofeev committed Jun 14, 2018
1 parent b38cbd2 commit ba9c8ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ sudo: false

addons:
apt:
sources:
- sourceline: 'ppa:chris-lea/libsodium'
packages:
- libsnappy-dev
- build-essential
- libsodium-dev
- libssl-dev
- pkg-config

Expand All @@ -21,12 +17,10 @@ env:
- RUST_NIGHTLY_VERSION=nightly-2018-05-26
- RUST_CLIPPY_VERSION=0.0.205
- EJB_RUST_BUILD_DIR="$TRAVIS_BUILD_DIR/exonum-java-binding-core/rust/"
- SNAPPY_LIB_DIR=/usr/lib/x86_64-linux-gnu

cache:
directories:
- "$HOME/.cargo"
- "${EJB_RUST_BUILD_DIR}/target"
- "$HOME/.m2"

before_install:
Expand All @@ -48,6 +42,10 @@ before_install:
- cargo install --list
# libjava_bindings.so and native application both need to load common Rust libs (eg libstd.so).
- export LD_LIBRARY_PATH=$RUST_LIB_DIR:$LD_LIBRARY_PATH
# force building instead of using from apt.
- export SODIUM_BUILD=1
- export ROCKSDB_BUILD=1
- export SNAPPY_BUILD=1

install: true # Skip the installation step, as Maven requires
# several extra properties when run on a CI server (see below).
Expand Down
5 changes: 4 additions & 1 deletion exonum-java-binding-core/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ resource-manager = []
invocation = ["jni/invocation"]

[patch.crates-io]
exonum_sodiumoxide = { git = "https://github.com/alexander-irbis/exonum_sodiumoxide.git", branch = "exclude-1604-ECR-846" }
# FIXME Remove with exonum 0.8+.
exonum_rocksdb = { git = "https://github.com/alexander-irbis/exonum_rocksdb.git", branch = "fix-build" }
# FIXME Remove with exonum 0.8+.
exonum_sodiumoxide = { git = "https://github.com/alexander-irbis/exonum_sodiumoxide.git", branch = "fix-build-old" }

[dependencies]
# ¡Please keep README.md in sync with the Exonum version,
Expand Down

0 comments on commit ba9c8ef

Please sign in to comment.