mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Port CI script changes from master
This commit is contained in:
parent
8246e539bc
commit
547b0ce83c
17
.travis.yml
17
.travis.yml
@ -1,6 +1,6 @@
|
||||
language: node_js
|
||||
nodejs:
|
||||
- 6
|
||||
- node
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
@ -10,19 +10,10 @@ matrix:
|
||||
include:
|
||||
- os: linux
|
||||
sudo: false
|
||||
env:
|
||||
- SW=$HOME/sw PATH=$SW/bin:$PATH CFLAGS=-I$SW/include LDFLAGS=-L$SW/lib LD_LIBRARY_PATH=$SW/qt/lib:$SW/lib PKG_CONFIG_PATH=$SW/lib/pkgconfig QMAKE=$SW/qt/bin/qmake QT_PLUGIN_PATH=$SW/qt/plugins
|
||||
- os: osx
|
||||
env:
|
||||
# On OS X the frameworks/dylibs contain hard coded paths, so we have to re-create the paths in the VM exactly
|
||||
- SWBASE=/sw SW=$SWBASE/sw PATH=$SW/bin:$SW/qt/bin:$SW/python/Python.framework/Versions/2.7/bin:$PWD/node_modules/.bin:$PATH CFLAGS=-I$SW/include LDFLAGS=-L$SW/lib QMAKE=$SW/qt/bin/qmake QT_PLUGIN_PATH=$SW/qt/plugins
|
||||
|
||||
before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then mkdir -p $SW && curl https://download.calibre-ebook.com/travis/linux-64.tar.xz | tar xJ -C $SW; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then sudo mkdir -p $SW && sudo chown -R $USER $SWBASE; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then curl https://download.calibre-ebook.com/travis/osx.tar.xz | tar xJ -C $SW; fi
|
||||
- npm install --no-optional rapydscript-ng && echo $PATH && which rapydscript && rapydscript --version
|
||||
- python setup.py bootstrap --ephemeral
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export SSL_CERT_FILE=$PWD/resources/mozilla-ca-certs.pem; fi
|
||||
- python setup/unix-ci.py install
|
||||
- python setup/unix-ci.py bootstrap
|
||||
|
||||
script: python setup.py test
|
||||
script: python setup/unix-ci.py test
|
||||
|
@ -21,7 +21,7 @@ def setenv(key, val):
|
||||
|
||||
if isosx:
|
||||
|
||||
SWBASE = '/Users/kovid'
|
||||
SWBASE = '/sw'
|
||||
SW = SWBASE + '/sw'
|
||||
|
||||
def install_env():
|
||||
@ -38,8 +38,10 @@ if isosx:
|
||||
setenv('QT_PLUGIN_PATH', '$SW/qt/plugins')
|
||||
else:
|
||||
|
||||
SW = os.path.expanduser('~/sw')
|
||||
|
||||
def install_env():
|
||||
setenv('SW', '$HOME/sw')
|
||||
setenv('SW', SW)
|
||||
setenv('PATH', '$SW/bin:$PATH')
|
||||
setenv('CFLAGS', '-I$SW/include')
|
||||
setenv('LDFLAGS', '-L$SW/lib')
|
||||
@ -88,17 +90,15 @@ def main():
|
||||
action = sys.argv[1]
|
||||
if action == 'install':
|
||||
if isosx:
|
||||
run('sudo', 'mkdir', '-p', SWBASE)
|
||||
run('sudo', 'chown', os.environ['USER'], SWBASE)
|
||||
download_and_decompress(
|
||||
'https://download.calibre-ebook.com/travis/sw-osx.tar.bz2',
|
||||
SWBASE
|
||||
)
|
||||
run('sudo', 'mkdir', '-p', SW)
|
||||
run('sudo', 'chown', '-R', os.environ['USER'], SWBASE)
|
||||
tball = 'osx'
|
||||
else:
|
||||
download_and_decompress(
|
||||
'https://download.calibre-ebook.com/travis/sw-linux.tar.xz',
|
||||
os.path.expanduser('~')
|
||||
)
|
||||
tball = 'linux-64'
|
||||
os.makedirs(SW)
|
||||
download_and_decompress(
|
||||
'https://download.calibre-ebook.com/travis/{}.tar.xz'.format(tball), SW
|
||||
)
|
||||
|
||||
run('npm install --no-optional rapydscript-ng')
|
||||
print(os.environ['PATH'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user