From f01c278a26e0f248d188c10bdb852b0859b98b3b Mon Sep 17 00:00:00 2001 From: Till Höppner Date: Tue, 23 Feb 2016 17:00:53 +0100 Subject: Test CI --- ci/before_deploy.sh | 15 +++++++++++++++ ci/install.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ ci/script.sh | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 ci/before_deploy.sh create mode 100644 ci/install.sh create mode 100644 ci/script.sh (limited to 'ci') diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh new file mode 100644 index 0000000..b8f67d4 --- /dev/null +++ b/ci/before_deploy.sh @@ -0,0 +1,15 @@ +# `before_deploy` phase: here we package the build artifacts + +set -ex + +# create a "staging" directory +mkdir staging + +# TODO update this part to copy the artifacts that make sense for your project +# NOTE All Cargo build artifacts will be under the 'target/$TARGET/{debug,release}' +cp target/$TARGET/release/ilc* staging + +cd staging + +# release tarball will look like 'rust-everywhere-v1.2.3-x86_64-unknown-linux-gnu.tar.gz' +tar czf ../${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.tar.gz * diff --git a/ci/install.sh b/ci/install.sh new file mode 100644 index 0000000..81ff38c --- /dev/null +++ b/ci/install.sh @@ -0,0 +1,43 @@ +# `install` phase: install stuff needed for the `script` phase + +set -ex + +case $TARGET in + # Install standard libraries needed for cross compilation + arm-unknown-linux-gnueabihf | \ + i686-apple-darwin | \ + i686-unknown-linux-gnu | \ + x86_64-unknown-linux-musl) + if [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]; then + # information about the cross compiler + arm-linux-gnueabihf-gcc -v + + # tell cargo which linker to use for cross compilation + mkdir -p .cargo + cat >.cargo/config <