2018-05-05 06:29:23 -05:00
|
|
|
language: c
|
2015-12-31 18:43:38 -06:00
|
|
|
|
2018-05-16 05:25:40 -05:00
|
|
|
include: &toolchain_linux_amd64
|
|
|
|
os: linux
|
|
|
|
dist: trusty
|
|
|
|
addons:
|
|
|
|
apt:
|
2018-05-16 21:04:46 -05:00
|
|
|
update: true
|
2018-05-16 05:25:40 -05:00
|
|
|
packages:
|
|
|
|
- libgtk-3-dev
|
2018-05-05 06:29:23 -05:00
|
|
|
|
2018-05-16 05:25:40 -05:00
|
|
|
include: &toolchain_linux_386
|
|
|
|
os: linux
|
|
|
|
dist: trusty
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- gcc-multilib
|
|
|
|
- g++-multilib
|
|
|
|
- libgtk-3-dev:i386
|
|
|
|
# the rest fixes broken dependencies of libgtk:i386
|
|
|
|
- libgirepository-1.0-1:i386
|
|
|
|
- libglib2.0-dev:i386
|
|
|
|
- gir1.2-glib-2.0:i386
|
|
|
|
- gir1.2-atk-1.0:i386
|
|
|
|
- libatk1.0-dev:i386
|
|
|
|
- libfreetype6-dev:i386
|
|
|
|
- libfontconfig1-dev:i386
|
|
|
|
- libcairo2-dev:i386
|
|
|
|
- libgdk-pixbuf2.0-dev:i386
|
|
|
|
- libpango1.0-dev:i386
|
|
|
|
- libxft-dev:i386
|
|
|
|
- libpng12-dev:i386
|
2018-05-05 06:29:23 -05:00
|
|
|
|
2018-05-16 05:25:40 -05:00
|
|
|
include: &toolchain_osx_amd64
|
|
|
|
os: osx
|
|
|
|
osx_image: xcode8
|
2018-05-05 06:29:23 -05:00
|
|
|
|
2018-05-16 05:25:40 -05:00
|
|
|
# Travis CI build matrix.
|
|
|
|
# Each entry below will trigger an extra, parallel build on Travis.
|
|
|
|
matrix:
|
|
|
|
include:
|
2018-05-16 20:55:04 -05:00
|
|
|
- env: linking=shared arch=amd64
|
2018-05-16 05:25:40 -05:00
|
|
|
<<: *toolchain_linux_amd64
|
2018-05-16 20:55:04 -05:00
|
|
|
- env: linking=static arch=amd64
|
2018-05-16 05:25:40 -05:00
|
|
|
<<: *toolchain_linux_amd64
|
2018-05-16 20:55:04 -05:00
|
|
|
- env: linking=shared arch=386
|
2018-05-16 05:25:40 -05:00
|
|
|
<<: *toolchain_linux_386
|
2018-05-16 20:55:04 -05:00
|
|
|
- env: linking=static arch=386
|
2018-05-16 05:25:40 -05:00
|
|
|
<<: *toolchain_linux_386
|
2018-05-16 20:55:04 -05:00
|
|
|
- env: linking=shared arch=amd64
|
2018-05-16 05:25:40 -05:00
|
|
|
<<: *toolchain_osx_amd64
|
2018-05-16 20:55:04 -05:00
|
|
|
- env: linking=static arch=amd64
|
2018-05-16 05:25:40 -05:00
|
|
|
<<: *toolchain_osx_amd64
|
2015-12-31 18:43:38 -06:00
|
|
|
|
2018-05-16 05:25:40 -05:00
|
|
|
install:
|
2018-05-16 20:55:04 -05:00
|
|
|
- if [[ "${arch}" == "386" ]]; then
|
2018-05-16 05:25:40 -05:00
|
|
|
export CFLAGS=-m32;
|
|
|
|
export CXXFLAGS=-m32;
|
|
|
|
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig;
|
|
|
|
fi
|
|
|
|
- if [[ "${linking}" == "static" ]]; then
|
|
|
|
export CMAKE_FLAGS=-DBUILD_SHARED_LIBS=OFF;
|
|
|
|
fi
|
2016-06-17 09:09:47 -05:00
|
|
|
|
2015-12-31 18:43:38 -06:00
|
|
|
script:
|
2016-06-17 09:01:07 -05:00
|
|
|
- cmake --version
|
2018-05-05 06:29:23 -05:00
|
|
|
- mkdir build
|
2018-05-16 07:36:57 -05:00
|
|
|
- pushd build
|
|
|
|
- cmake -G "Unix Makefiles" ${CMAKE_FLAGS} ..
|
|
|
|
- make tester examples
|
|
|
|
- popd
|
2018-05-05 06:29:23 -05:00
|
|
|
|
|
|
|
after_success:
|
|
|
|
- ls -lR build/out
|
|
|
|
- file build/out/test
|
2018-05-16 20:55:04 -05:00
|
|
|
- export platform="$TRAVIS_OS_NAME"
|
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp ui.h ui_darwin.h build/out/; export platform=darwin; fi
|
2018-05-16 07:36:57 -05:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cp ui.h ui_unix.h build/out/; fi
|
|
|
|
- if [[ "x${TRAVIS_TAG}" != "x" ]]; then export version=${TRAVIS_TAG}; else export version=${TRAVIS_BRANCH}; fi
|
2018-05-16 20:55:04 -05:00
|
|
|
- export artifact=${version}-${platform}-${arch}-${linking}
|
2018-05-16 21:04:46 -05:00
|
|
|
- echo ${artifact}
|
2018-05-16 07:36:57 -05:00
|
|
|
- pushd build/out
|
2018-05-16 21:04:46 -05:00
|
|
|
- # TODO do not include symlinks in the archive
|
2018-05-16 07:36:57 -05:00
|
|
|
- tar -czvf libui-${artifact}.tgz libui.* *.h
|
|
|
|
- tar -czvf examples-${artifact}.tgz `find . -type f ! -name "*.*"`
|
|
|
|
- popd
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
2018-08-10 19:11:15 -05:00
|
|
|
api_key:
|
|
|
|
secure: "fmgC97mlXQY/ASWAL/GyTJfiJIo/hsVFf6bP3Zz8odv259PJUFGgnZ9kNIgJcFQ5961lXDFi7pBMMSetm1GZ2EBZxIXnUfe1kfIhw62ybJHIwB2+g2tc8A4zzfkWJVY4xVYpitOU3iMuu5Z8U2n+68RYWKpcxhbkVw5v8Zu2Rms="
|
2018-05-16 07:36:57 -05:00
|
|
|
file: build/out/*.tgz
|
|
|
|
file_glob: true
|
|
|
|
skip_cleanup: true
|
|
|
|
on:
|
|
|
|
tags: true
|