From 914e435035c32edaa0b783ca2122eb3a3aaf329c Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Fri, 29 Mar 2019 03:31:06 -0700 Subject: [PATCH 1/4] Fix 32-bit holy-build-box builds Without this, `uname -m` could return x86_64 in a holy-build-box-32 image https://github.com/phusion/holy-build-box/blob/master/BUILDING-32-BIT-BINARIES.md --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ce196503..27f60c20 100644 --- a/Makefile +++ b/Makefile @@ -118,7 +118,7 @@ linux-build-box32-regular: luvi-src.tar.gz rm -rf build && mkdir -p build cp packaging/holy-build.sh luvi-src.tar.gz build docker run -t -i --rm \ - -v `pwd`/build:/io phusion/holy-build-box-32:latest bash /io/holy-build.sh regular-asm + -v `pwd`/build:/io phusion/holy-build-box-32:latest linux32 bash /io/holy-build.sh regular-asm mv build/luvi luvi-regular-Linux_i686 linux-build-box-tiny: luvi-src.tar.gz @@ -133,7 +133,7 @@ linux-build-box32-tiny: luvi-src.tar.gz rm -rf build && mkdir -p build cp packaging/holy-build.sh luvi-src.tar.gz build docker run -t -i --rm \ - -v `pwd`/build:/io phusion/holy-build-box-32:latest bash /io/holy-build.sh tiny + -v `pwd`/build:/io phusion/holy-build-box-32:latest linux32 bash /io/holy-build.sh tiny mv build/luvi luvi-tiny-Linux_i686 publish-src: reset luvi-src.tar.gz From 13636c13d85837229eeba5a87fe398a219a6fe96 Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Fri, 29 Mar 2019 03:33:20 -0700 Subject: [PATCH 2/4] Fix CMake errors in holy-build-box from using cmake at root --- packaging/holy-build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packaging/holy-build.sh b/packaging/holy-build.sh index 3be5ca16..bc37d435 100755 --- a/packaging/holy-build.sh +++ b/packaging/holy-build.sh @@ -13,7 +13,10 @@ source /hbb_exe/activate set -x # Extract and enter source -tar xzf /io/luvi-src.tar.gz +# Use /luvi dir to avoid CMake assertion failure in / +mkdir -p luvi +tar xzf /io/luvi-src.tar.gz --directory luvi +cd luvi make ${BUILD_TYPE} make -j${NPROCS} ldd build/luvi From d104cb7ef9b445175a30fb3df878a7c47d15c458 Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Fri, 29 Mar 2019 03:33:54 -0700 Subject: [PATCH 3/4] Strip holy-build-box binaries --- packaging/holy-build.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packaging/holy-build.sh b/packaging/holy-build.sh index bc37d435..63918177 100755 --- a/packaging/holy-build.sh +++ b/packaging/holy-build.sh @@ -21,4 +21,6 @@ make ${BUILD_TYPE} make -j${NPROCS} ldd build/luvi libcheck build/luvi +# holy-build-box adds -g to CFLAGS, so we need to strip +strip --strip-all build/luvi cp build/luvi /io From 4c5f075c6334104be2c1d3a0b628d6e53490f3f2 Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Fri, 29 Mar 2019 03:35:27 -0700 Subject: [PATCH 4/4] Use travis to build/release Linux binaries Only does the deploy phase for tagged commits Contributes towards #200 --- .travis.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0efacdac..9c0adc9a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,3 +34,28 @@ notifications: on_success: change # options: [always|never|change] default: always on_failure: always # options: [always|never|change] default: always on_start: false # default: false + +jobs: + include: + - stage: deploy + if: tag IS present + os: linux + env: [] + script: + # fetch tags so that git describe works + - git fetch --unshallow + - make linux-build + services: + - docker + deploy: + provider: releases + api_key: $GITHUB_OAUTH_TOKEN + file: + - "luvi-regular-Linux_x86_64" + - "luvi-tiny-Linux_x86_64" + - "luvi-regular-Linux_i686" + - "luvi-tiny-Linux_i686" + overwrite: true + skip_cleanup: true + on: + tags: true