From ba9c8ef50a1ca2ad296ea6511863e5be9e75f206 Mon Sep 17 00:00:00 2001 From: Alexander Irbis Date: Thu, 14 Jun 2018 12:47:17 +0300 Subject: [PATCH] Fix build on Travis CI [ECR-1658] (#292): * 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. --- .travis.yml | 10 ++++------ exonum-java-binding-core/rust/Cargo.toml | 5 ++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3b34336f94..aeeb4abc34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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: @@ -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). diff --git a/exonum-java-binding-core/rust/Cargo.toml b/exonum-java-binding-core/rust/Cargo.toml index b17e2401ee..a6fd9c8f89 100644 --- a/exonum-java-binding-core/rust/Cargo.toml +++ b/exonum-java-binding-core/rust/Cargo.toml @@ -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,