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

Fix .deb package generation #196

Merged
merged 15 commits into from
Dec 11, 2017
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
34 changes: 16 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ matrix:
include:
- os: linux
dist: trusty
sudo: false
sudo: true
compiler: gcc
env:
- BUILD_TARGET=gcc_build
- MATRIX_EVAL="BUILD_TARGET=gcc_build && DEPLOY_BUILD=yes"
addons:
apt:
packages:
- libtinyxml2-dev
- checkinstall
- libcurl4-openssl-dev
- os: linux
dist: trusty
sudo: false
compiler: gcc
env:
- BUILD_TARGET=gcc_build
- CC=gcc-5
- CXX=g++-5
- MATRIX_EVAL="BUILD_TARGET=gcc_build && CC=gcc-5 && CXX=g++-5"
addons:
apt:
sources:
Expand All @@ -34,9 +34,7 @@ matrix:
sudo: false
compiler: gcc
env:
- BUILD_TARGET=coverage_build
- CC=gcc-6
- CXX=g++-6
- MATRIX_EVAL="BUILD_TARGET=coverage_build && CC=gcc-6 && CXX=g++-6"
addons:
apt:
sources:
Expand All @@ -46,12 +44,12 @@ matrix:
- g++-6
- libtinyxml2-dev
- os: linux
sudo: required
sudo: true
services:
- docker
env: BUILD_TARGET=docker_build
- os: osx
osx_image: xcode8
osx_image: xcode9.2
env:
- BUILD_TARGET=osx_build

Expand All @@ -61,6 +59,7 @@ addons:
- libcurl4-openssl-dev

before_install:
- eval "${MATRIX_EVAL}"
- if [[ "${BUILD_TARGET}" = "coverage_build" ]]; then
pip install --user cpp-coveralls;
fi
Expand All @@ -75,7 +74,7 @@ script:
- if [[ "${BUILD_TARGET}" = "gcc_build" ]]; then
make BUILD_TYPE=Debug run_unit_tests -j4;
make clean;
make BUILD_TYPE=Release run_unit_tests -j4;
make INSTALL_PREFIX=/usr BUILD_TYPE=Release run_unit_tests -j4;
fi
- if [[ "${BUILD_TARGET}" = "coverage_build" ]]; then
make BUILD_TYPE=Coverage run_unit_tests -j4;
Expand All @@ -100,19 +99,18 @@ after_success:
--exclude="debug_helpers" --exclude="example" --exclude="external_example"
--exclude-pattern=".*CMakeFiles.*" --exclude-pattern=".*_test.*";
fi

before_deploy:
- export RELEASE_PKG_FILE=$(ls *.deb)
- echo "Deploying $RELEASE_PKG_FILE to GitHub releases"
- if [[ "${DEPLOY_BUILD}" = "yes" ]]; then
./create_deb.sh;
fi;

deploy:
provider: releases
skip_cleanup: true
api_key:
secure: hBX3pFWNZiDbz4yKnOjhLg3QS9Ubn1XePxSeIt2Btq5GzbomOPDCgpIFijBppliwj9oKc302EMnZSg2QWeAzFKn9UnmIflJ0E4iymYgwWdTJv+bSnYALJEmO8F6gF9FgRlPk8FCtZiECoTsa75w5TrEZKZpFpmzVYRiDu0eo6sEjW7UJPC0A2KSTXLrBCHSIZy/iasbGmuur4brG7NO0QdMOvDXvhsYfkXDRJFMTtTHvLiKJcqiunPfqARzf1H4x4iczRYscKu5Vn8Kmw3NANGkcIDvEj4ooih831EXxACRZw0VgycgNHOKRXKC9pZ4hLQMon+jxpQX+X8k/K5161oEkF/gCVKyFb31Pk/4Uwe81p1GJY2lAC7MDUxA98RKXhdvVYF2Cp44+IbF0YVoWRUtVAhknXRQ3Weg25kyVSu83q2nN2nZq2qGTnpNIbdN56s/F+uaFtipGEh+vmiv8rNUz+Z5MFrY2FQaSvBTFw9K4tNs9uc+VQd1bE7X5wh0yywEqUEw2nzqTB2xR+OubygUASbk2GLNdc254P0lrzCHbNM62Y7sRX06CM7hPlwhELEkVtUXZWJ0KuhQyLvRh3aPJ3Jj30EswTt/FGT1gzSP1FjjHBRZCK4P2D2rwJ5TMn2JrZKfPxmEd3kVmn6h80+gBbKgonGmZspd2SvPEI5g=
file:
- ${RELEASE_PKG_FILE}
condition: ${BUILD_TARGET} = docker_build
file_glob: true
file: "*.deb"
condition: ${DEPLOY_BUILD} = yes
on:
repo: dronecore/DroneCore
tags: true
6 changes: 3 additions & 3 deletions create_deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ version=`echo $version | sed 's/v\([0-9]*\.[0-9]*\.[0-9]*\).*$/\1/'`
make clean
make INSTALL_PREFIX=/usr BUILD_TYPE=Release

checkinstall \
sudo checkinstall \
--maintainer="Julian Oes \<julian@oes.ch\>" \
--pkgname="dronecore-dev" \
--pkgversion="$version" \
--pkgarch="amd64" \
--pkgrelease=1 \
--pkglicense="BSD-3-clause" \
--requires="libcurl4-openssl-dev" \
--requires="libcurl4-openssl-dev,libtinyxml2-dev" \
--provides="dronecore-dev" \
--backup=no \
--deldoc=yes \
--deldesc=yes \
--default=yes
--default make default install