Prepare CI for release builds.

pull/4/head
whitequark 2016-04-19 12:19:00 +00:00
parent c17f1160dc
commit 2edc61d072
7 changed files with 47 additions and 19 deletions

View File

@ -5,14 +5,11 @@ os:
sudo: required sudo: required
dist: trusty dist: trusty
install: install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; sudo apt-get install -q -y cmake cmake-data libpng12-dev zlib1g-dev libjson0-dev libfontconfig1-dev libgtkmm-2.4-dev libpangomm-1.4-dev libgl1-mesa-dev libglu-dev libglew-dev libfreetype6-dev dpkg-dev; fi - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/install-debian.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew upgrade cmake libpng; fi - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/install-macos.sh; fi
script: script:
- mkdir cbuild - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/build-debian.sh; fi
- cd cbuild - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/build-macos.sh; fi
- cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_BUILD_TYPE=Debug ..
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cd ..; dpkg-buildpackage -b -us -uc; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then make; fi
deploy: deploy:
- provider: releases - provider: releases
api_key: api_key:
@ -20,8 +17,7 @@ deploy:
skip_cleanup: true skip_cleanup: true
file_glob: true file_glob: true
file: file:
- ../solvespace_*.deb - ../*.deb
- ../solvespace-dbg_*.deb
on: on:
repo: whitequark/solvespace repo: whitequark/solvespace
tags: true tags: true
@ -30,7 +26,7 @@ deploy:
api_key: api_key:
secure: DA3tW0My37vbi2t3dZ061281Xm8KSIkeLdFZsQISrut0g1kkbWuBTPxAfvE3B6OE8p47wAclE/wxA1+obMTVkY0oYpd5u+JelYNHxU/oL8Ww0xdUANwKNJ1JD2EZP8nSz7JSvxuGILC6AFPoTjawsG97SXwiTyp7z0PA6nvzraE= secure: DA3tW0My37vbi2t3dZ061281Xm8KSIkeLdFZsQISrut0g1kkbWuBTPxAfvE3B6OE8p47wAclE/wxA1+obMTVkY0oYpd5u+JelYNHxU/oL8Ww0xdUANwKNJ1JD2EZP8nSz7JSvxuGILC6AFPoTjawsG97SXwiTyp7z0PA6nvzraE=
skip_cleanup: true skip_cleanup: true
file: /Users/travis/build/whitequark/solvespace/cbuild/solvespace.dmg file: build/solvespace.dmg
on: on:
repo: whitequark/solvespace repo: whitequark/solvespace
tags: true tags: true

6
.travis/build-debian.sh Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh -xe
if echo $TRAVIS_TAG | grep ^release-; then BUILD_TYPE=RelWithDebInfo; else BUILD_TYPE=Debug; fi
export BUILD_TYPE
dpkg-buildpackage -b -us -uc

8
.travis/build-macos.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh -xe
if echo $TRAVIS_TAG | grep ^release-; then BUILD_TYPE=RelWithDebInfo; else BUILD_TYPE=Debug; fi
mkdir build
cd build
cmake -DCMAKE_OSX_DEPLOYMENT_TARGET=10.7 -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
make

7
.travis/install-debian.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh -xe
sudo apt-get update -qq
sudo apt-get install -q -y \
cmake cmake-data libpng12-dev zlib1g-dev libjson0-dev libfontconfig1-dev \
libgtkmm-2.4-dev libpangomm-1.4-dev libgl1-mesa-dev libglu-dev libglew-dev \
libfreetype6-dev dpkg-dev

4
.travis/install-macos.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh -xe
brew update
brew upgrade cmake libpng

View File

@ -1,16 +1,22 @@
version: 2.1.{build} version: 2.1.{build}
clone_depth: 1
before_build: before_build:
- git submodule update --init - git submodule update --init
- mkdir cbuild - mkdir build
- cd cbuild - cd build
- cmake -G"Visual Studio 12" -T v120_xp .. - set tag=x%APPVEYOR_REPO_TAG_NAME%
build: - if %tag:~,9% == xrelease- (set BUILD_TYPE=RelWithDebInfo) else (set BUILD_TYPE=Debug)
project: C:\projects\solvespace\cbuild\src\solvespace.vcxproj - cmake -G"Visual Studio 12" -T v120_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% ..
verbosity: minimal build_script:
- msbuild "C:\projects\solvespace\build\src\solvespace.vcxproj" /verbosity:minimal /property:Configuration=%BUILD_TYPE% /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
artifacts: artifacts:
- path: cbuild\src\Debug\solvespace.exe - path: build\src\Debug\solvespace.exe
name: solvespace.exe name: solvespace.exe
- path: cbuild\src\Debug\solvespace.pdb - path: build\src\Debug\solvespace.pdb
name: solvespace.pdb
- path: build\src\RelWithDebInfo\solvespace.exe
name: solvespace.exe
- path: build\src\RelWithDebInfo\solvespace.pdb
name: solvespace.pdb name: solvespace.pdb
deploy: deploy:
- provider: GitHub - provider: GitHub

3
debian/rules vendored
View File

@ -15,7 +15,8 @@ include /usr/share/dpkg/default.mk
# This is example for Cmake (See http://bugs.debian.org/641051 ) # This is example for Cmake (See http://bugs.debian.org/641051 )
override_dh_auto_configure: override_dh_auto_configure:
dh_auto_configure -- \ dh_auto_configure -- \
-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
# create a -dbg package # create a -dbg package
override_dh_strip: override_dh_strip: