forked from andlabs/libui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (89 loc) · 2.52 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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: TODO
file: build/out/*.tgz
file_glob: true
skip_cleanup: true
on:
tags: true