Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use travis to build/release Linux binaries #202

Merged
merged 4 commits into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 6 additions & 1 deletion packaging/holy-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ 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
libcheck build/luvi
# holy-build-box adds -g to CFLAGS, so we need to strip
strip --strip-all build/luvi
cp build/luvi /io