From d775259ed9399037e1a1da0ff65dd377bc8b82d1 Mon Sep 17 00:00:00 2001 From: "Lilian A. Moraru" Date: Sun, 17 Dec 2017 15:41:51 +0200 Subject: Add armhf build to Travis CI Fixes #676 --- ci/before_deploy.sh | 13 +++++++++---- ci/install.sh | 9 ++++++--- ci/script.sh | 34 ++++++++++++++++------------------ ci/utils.sh | 14 +++++++++++--- 4 files changed, 42 insertions(+), 28 deletions(-) (limited to 'ci') diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh index ed5795c0..4890f96b 100644 --- a/ci/before_deploy.sh +++ b/ci/before_deploy.sh @@ -6,8 +6,12 @@ set -ex # Generate artifacts for release mk_artifacts() { - RUSTFLAGS="-C target-feature=+ssse3" \ - cargo build --target $TARGET --release --features simd-accel + if is_ssse3_target; then + RUSTFLAGS="-C target-feature=+ssse3" \ + cargo build --target $TARGET --release --features simd-accel + else + cargo build --target $TARGET --release + fi } mk_tarball() { @@ -15,11 +19,12 @@ mk_tarball() { local td=$(mktempd) local out_dir=$(pwd) local name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}" - mkdir "$td/$name" + local gcc_prefix="$(gcc_prefix)" + mkdir "${td:?}/${name}" mkdir "$td/$name/complete" cp target/$TARGET/release/rg "$td/$name/rg" - strip "$td/$name/rg" + ${gcc_prefix}strip "$td/$name/rg" cp {doc/rg.1,README.md,UNLICENSE,COPYING,LICENSE-MIT} "$td/$name/" cp \ target/$TARGET/release/build/ripgrep-*/out/{rg.bash-completion,rg.fish,_rg.ps1} \ diff --git a/ci/install.sh b/ci/install.sh index a4d8c7b4..ffddf866 100644 --- a/ci/install.sh +++ b/ci/install.sh @@ -31,16 +31,19 @@ install_standard_crates() { configure_cargo() { local prefix=$(gcc_prefix) + if [ -n "${prefix}" ]; then + local gcc_suffix= + test -n "${GCC_VERSION}" && gcc_suffix="-${GCC_VERSION}" || : + local gcc="${prefix}gcc${gcc_suffix}" - if [ ! -z $prefix ]; then # information about the cross compiler - ${prefix}gcc -v + ${gcc} -v # tell cargo which linker to use for cross compilation mkdir -p .cargo cat >>.cargo/config <