Run the linux bundle on Travis
This commit is contained in:
parent
35fb8ea1bf
commit
091e74d618
54
.travis.yml
54
.travis.yml
@ -1,6 +1,21 @@
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- os: linux
|
||||
dist: trusty
|
||||
group: beta
|
||||
language: python
|
||||
sudo: false
|
||||
env: USE_BUNDLE=1 SW=$HOME/sw PKG_CONFIG_PATH=$SW/lib/pkgconfig LD_LIBRARY_PATH=$SW/lib PYTHON=$SW/bin/python3
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- libxi-dev
|
||||
- libxrandr-dev
|
||||
- libxinerama-dev
|
||||
- libxcursor-dev
|
||||
- libxcb-xkb-dev
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
group: beta
|
||||
@ -92,21 +107,28 @@ install: |
|
||||
curl https://download.calibre-ebook.com/travis/kitty/osx.tar.xz | tar xJ -C $SW;
|
||||
fi
|
||||
else
|
||||
pushd /tmp
|
||||
wget --no-check-certificate http://xkbcommon.org/download/libxkbcommon-0.6.1.tar.xz
|
||||
tar xf libxkbcommon-0.6.1.tar.xz
|
||||
cd libxkbcommon-0.6.1
|
||||
./configure --prefix=$HOME/harfbuzz --disable-dependency-tracking --disable-static
|
||||
make -j2
|
||||
make install
|
||||
wget https://github.com/behdad/harfbuzz/releases/download/1.6.3/harfbuzz-1.6.3.tar.bz2
|
||||
tar xf harfbuzz-1.6.3.tar.bz2
|
||||
cd harfbuzz-1.6.3
|
||||
./configure --prefix=$HOME/harfbuzz --disable-dependency-tracking --disable-static --with-glib=no --with-gobject=no --with-cairo=no --with-fontconfig=no --with-icu=no --with-directwrite=no --with-freetype=yes
|
||||
make -j2
|
||||
make install
|
||||
cd ..
|
||||
popd
|
||||
if [[ "$USE_BUNDLE" == "1" ]]; then
|
||||
mkdir -p $SW;
|
||||
curl https://download.calibre-ebook.com/travis/kitty/linux-64.tar.xz | tar xJ -C $SW;
|
||||
find $SW -type f -name '*.pc' -exec sed -i "s,/sw/sw,$SW,g" {} \;;
|
||||
find $SW -type f -name '_sysconfig*.py' -exec sed -i "s,/sw/sw,$SW,g" {} \;;
|
||||
else
|
||||
pushd /tmp
|
||||
wget --no-check-certificate http://xkbcommon.org/download/libxkbcommon-0.6.1.tar.xz
|
||||
tar xf libxkbcommon-0.6.1.tar.xz
|
||||
cd libxkbcommon-0.6.1
|
||||
./configure --prefix=$HOME/harfbuzz --disable-dependency-tracking --disable-static
|
||||
make -j2
|
||||
make install
|
||||
wget https://github.com/behdad/harfbuzz/releases/download/1.6.3/harfbuzz-1.6.3.tar.bz2
|
||||
tar xf harfbuzz-1.6.3.tar.bz2
|
||||
cd harfbuzz-1.6.3
|
||||
./configure --prefix=$HOME/harfbuzz --disable-dependency-tracking --disable-static --with-glib=no --with-gobject=no --with-cairo=no --with-fontconfig=no --with-icu=no --with-directwrite=no --with-freetype=yes
|
||||
make -j2
|
||||
make install
|
||||
cd ..
|
||||
popd
|
||||
fi
|
||||
fi
|
||||
pkg-config --cflags harfbuzz
|
||||
if [[ "$TRAVIS_OS_NAME" != 'osx' ]]; then
|
||||
@ -116,7 +138,7 @@ install: |
|
||||
set +e
|
||||
|
||||
before_script:
|
||||
- echo $LD_LIBRARY_PATH
|
||||
- echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH PKG_CONFIG_PATH=$PKG_CONFIG_PATH
|
||||
- $PYTHON setup.py build --debug --verbose $SANITIZE_ARG;
|
||||
|
||||
script:
|
||||
|
||||
9
setup.py
9
setup.py
@ -36,7 +36,6 @@ version = tuple(
|
||||
)
|
||||
_plat = sys.platform.lower()
|
||||
is_macos = 'darwin' in _plat
|
||||
is_travis = os.environ.get('TRAVIS') == 'true'
|
||||
env = None
|
||||
|
||||
PKGCONFIG = os.environ.get('PKGCONFIG_EXE', 'pkg-config')
|
||||
@ -162,7 +161,7 @@ class Env:
|
||||
self.cc, self.cppflags, self.cflags, self.ldflags, self.ldpaths = cc, cppflags, cflags, ldflags, ldpaths
|
||||
|
||||
def copy(self):
|
||||
return Env(self.cc, list(self.cppflags), list(self.cflags), list(self.ldflags), list(self.ldflags))
|
||||
return Env(self.cc, list(self.cppflags), list(self.cflags), list(self.ldflags), list(self.ldpaths))
|
||||
|
||||
|
||||
def init_env(
|
||||
@ -220,7 +219,8 @@ def init_env(
|
||||
cppflags.append('-DWITH_PROFILER')
|
||||
cflags.append('-g3')
|
||||
ldflags.append('-lprofiler')
|
||||
return Env(cc, cppflags, cflags, ldflags)
|
||||
ldpaths = []
|
||||
return Env(cc, cppflags, cflags, ldflags, ldpaths=ldpaths)
|
||||
|
||||
|
||||
def kitty_env():
|
||||
@ -247,9 +247,6 @@ def kitty_env():
|
||||
ans.ldpaths += pylib + font_libs + gl_libs + libpng
|
||||
if is_macos:
|
||||
ans.ldpaths.extend('-framework Cocoa'.split())
|
||||
if is_travis and 'SW' in os.environ:
|
||||
cflags.append('-I{}/include'.format(os.environ['SW']))
|
||||
ans.ldpaths.append('-L{}/lib'.format(os.environ['SW']))
|
||||
else:
|
||||
ans.ldpaths += ['-lrt']
|
||||
if '-ldl' not in ans.ldpaths:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user