diff --git a/.travis.yml b/.travis.yml index 5daea078..a81592b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,11 @@ os: sudo: required dist: trusty 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" == "osx" ]]; then brew update; brew upgrade cmake libpng; fi + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/install-debian.sh; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/install-macos.sh; fi script: - - mkdir cbuild - - cd cbuild - - 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 + - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/build-debian.sh; fi + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/build-macos.sh; fi deploy: - provider: releases api_key: @@ -20,8 +17,7 @@ deploy: skip_cleanup: true file_glob: true file: - - ../solvespace_*.deb - - ../solvespace-dbg_*.deb + - ../*.deb on: repo: whitequark/solvespace tags: true @@ -30,7 +26,7 @@ deploy: api_key: secure: DA3tW0My37vbi2t3dZ061281Xm8KSIkeLdFZsQISrut0g1kkbWuBTPxAfvE3B6OE8p47wAclE/wxA1+obMTVkY0oYpd5u+JelYNHxU/oL8Ww0xdUANwKNJ1JD2EZP8nSz7JSvxuGILC6AFPoTjawsG97SXwiTyp7z0PA6nvzraE= skip_cleanup: true - file: /Users/travis/build/whitequark/solvespace/cbuild/solvespace.dmg + file: build/solvespace.dmg on: repo: whitequark/solvespace tags: true diff --git a/.travis/build-debian.sh b/.travis/build-debian.sh new file mode 100755 index 00000000..9d0a4c05 --- /dev/null +++ b/.travis/build-debian.sh @@ -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 diff --git a/.travis/build-macos.sh b/.travis/build-macos.sh new file mode 100755 index 00000000..29109730 --- /dev/null +++ b/.travis/build-macos.sh @@ -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 diff --git a/.travis/install-debian.sh b/.travis/install-debian.sh new file mode 100755 index 00000000..146190f0 --- /dev/null +++ b/.travis/install-debian.sh @@ -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 diff --git a/.travis/install-macos.sh b/.travis/install-macos.sh new file mode 100755 index 00000000..6fb5a4f7 --- /dev/null +++ b/.travis/install-macos.sh @@ -0,0 +1,4 @@ +#!/bin/sh -xe + +brew update +brew upgrade cmake libpng diff --git a/appveyor.yml b/appveyor.yml index ed7f58b1..2ebdacdc 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,16 +1,22 @@ version: 2.1.{build} +clone_depth: 1 before_build: - git submodule update --init - - mkdir cbuild - - cd cbuild - - cmake -G"Visual Studio 12" -T v120_xp .. -build: - project: C:\projects\solvespace\cbuild\src\solvespace.vcxproj - verbosity: minimal + - mkdir build + - cd build + - set tag=x%APPVEYOR_REPO_TAG_NAME% + - if %tag:~,9% == xrelease- (set BUILD_TYPE=RelWithDebInfo) else (set BUILD_TYPE=Debug) + - cmake -G"Visual Studio 12" -T v120_xp -DCMAKE_BUILD_TYPE=%BUILD_TYPE% .. +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: - - path: cbuild\src\Debug\solvespace.exe + - path: build\src\Debug\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 deploy: - provider: GitHub diff --git a/debian/rules b/debian/rules index eee3b398..084b447b 100755 --- a/debian/rules +++ b/debian/rules @@ -15,7 +15,8 @@ include /usr/share/dpkg/default.mk # This is example for Cmake (See http://bugs.debian.org/641051 ) override_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 override_dh_strip: