98 lines
2.7 KiB
YAML
98 lines
2.7 KiB
YAML
language: c
|
|
|
|
include: &toolchain_linux_amd64
|
|
os: linux
|
|
dist: trusty
|
|
addons:
|
|
apt:
|
|
update: true
|
|
packages:
|
|
- libgtk-3-dev
|
|
|
|
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
|
|
|
|
include: &toolchain_osx_amd64
|
|
os: osx
|
|
osx_image: xcode8
|
|
|
|
# Travis CI build matrix.
|
|
# Each entry below will trigger an extra, parallel build on Travis.
|
|
matrix:
|
|
include:
|
|
- env: linking=shared arch=amd64
|
|
<<: *toolchain_linux_amd64
|
|
- env: linking=static arch=amd64
|
|
<<: *toolchain_linux_amd64
|
|
- env: linking=shared arch=386
|
|
<<: *toolchain_linux_386
|
|
- env: linking=static arch=386
|
|
<<: *toolchain_linux_386
|
|
- env: linking=shared arch=amd64
|
|
<<: *toolchain_osx_amd64
|
|
- env: linking=static arch=amd64
|
|
<<: *toolchain_osx_amd64
|
|
|
|
install:
|
|
- if [[ "${arch}" == "386" ]]; then
|
|
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
|
|
|
|
script:
|
|
- cmake --version
|
|
- mkdir build
|
|
- pushd build
|
|
- cmake -G "Unix Makefiles" ${CMAKE_FLAGS} ..
|
|
- make tester examples
|
|
- popd
|
|
|
|
after_success:
|
|
- ls -lR build/out
|
|
- file build/out/test
|
|
- export platform="$TRAVIS_OS_NAME"
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cp ui.h ui_darwin.h build/out/; export platform=darwin; fi
|
|
- 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
|
|
- export artifact=${version}-${platform}-${arch}-${linking}
|
|
- echo ${artifact}
|
|
- pushd build/out
|
|
- # TODO do not include symlinks in the archive
|
|
- tar -czvf libui-${artifact}.tgz libui.* *.h
|
|
- tar -czvf examples-${artifact}.tgz `find . -type f ! -name "*.*"`
|
|
- popd
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key:
|
|
secure: "fmgC97mlXQY/ASWAL/GyTJfiJIo/hsVFf6bP3Zz8odv259PJUFGgnZ9kNIgJcFQ5961lXDFi7pBMMSetm1GZ2EBZxIXnUfe1kfIhw62ybJHIwB2+g2tc8A4zzfkWJVY4xVYpitOU3iMuu5Z8U2n+68RYWKpcxhbkVw5v8Zu2Rms="
|
|
file: build/out/*.tgz
|
|
file_glob: true
|
|
skip_cleanup: true
|
|
on:
|
|
tags: true
|