summaryrefslogtreecommitdiffstats
path: root/ci/before_deploy.sh
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-09-05 20:08:46 -0400
committerAndrew Gallant <jamslam@gmail.com>2016-09-05 20:08:46 -0400
commit1a3e7c0bb2b7f4269856f3e1f0377a6a64f4339c (patch)
treef8bd31de2e47df9ae4d4f2deda09a824e0a6fff5 /ci/before_deploy.sh
parent02ac331529e2570b48ffcd4a735ad8bccb0cb72c (diff)
Trying CI.
Diffstat (limited to 'ci/before_deploy.sh')
-rw-r--r--ci/before_deploy.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh
new file mode 100644
index 00000000..b18c9b61
--- /dev/null
+++ b/ci/before_deploy.sh
@@ -0,0 +1,35 @@
+# `before_deploy` phase: here we package the build artifacts
+
+set -ex
+
+. $(dirname $0)/utils.sh
+
+# Generate artifacts for release
+mk_artifacts() {
+ RUSTFLAGS="-C target-feature=+ssse3" cargo build --target $TARGET --release --features simd-accel
+}
+
+mk_tarball() {
+ # create a "staging" directory
+ local td=$(mktempd)
+ local out_dir=$(pwd)
+
+ # 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/xrep $td
+
+ pushd $td
+
+ # release tarball will look like 'rust-everywhere-v1.2.3-x86_64-unknown-linux-gnu.tar.gz'
+ tar czf $out_dir/${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.tar.gz *
+
+ popd
+ rm -r $td
+}
+
+main() {
+ mk_artifacts
+ mk_tarball
+}
+
+main