Compare commits

...

5 Commits

Author SHA1 Message Date
N00byKing
37e3a6b8f3 Merge branch '3027' of https://github.com/N00byKing/yuzu into 3027 2018-02-14 19:34:23 +01:00
N00byKing
52a0b0a97d Fix Indentation 2018-02-14 19:33:58 +01:00
N00byKing
71fdff79b8 Add frozen dependencies linux build 2018-02-14 19:33:58 +01:00
N00byKing
6588d41d25 Fix Indentation 2018-01-23 19:34:26 +01:00
N00byKing
85f1aebe70 Add frozen dependencies linux build 2018-01-21 15:01:27 +01:00
4 changed files with 84 additions and 0 deletions

View File

@@ -25,6 +25,16 @@ matrix:
install: "./.travis/linux/deps.sh"
script: "./.travis/linux/build.sh"
after_success: "./.travis/linux/upload.sh"
- os: linux
env: NAME="linux build (frozen versions of dependencies)"
sudo: required
dist: trusty
services: docker
before_install:
- chmod +x ./.travis/linux-frozen/build.sh
- chmod +x ./.travis/linux-frozen/docker.sh
- chmod +x ./.travis/linux-frozen/install_package.py
script: "./.travis/linux-frozen/build.sh"
- os: osx
env: NAME="macos build"
sudo: false

View File

@@ -0,0 +1,4 @@
#!/bin/bash -ex
docker pull ubuntu:18.04
docker run -v $(pwd):/yuzu ubuntu:18.04 /bin/bash -ex /yuzu/.travis/linux-frozen/docker.sh

View File

@@ -0,0 +1,32 @@
#!/bin/bash -ex
cd /yuzu
apt-get update
apt-get install -y build-essential wget git python-launchpadlib libssl-dev
# Install specific versions of packages with their dependencies
# The apt repositories remove older versions regularly, so we can't use
# apt-get and have to pull the packages directly from the archives.
/yuzu/.travis/linux-frozen/install_package.py \
libsdl2-dev 2.0.4+dfsg1-2ubuntu2 xenial \
qtbase5-dev 5.9.3+dfsg-0ubuntu1 bionic \
libharfbuzz0b 1.7.2-1 bionic \
libqt5opengl5-dev 5.9.3+dfsg-0ubuntu1 bionic \
libfontconfig1 2.12.6-0ubuntu1 bionic \
libfreetype6 2.8-0.2ubuntu2 bionic \
libicu-le-hb0 1.0.3+git161113-4 bionic \
libdouble-conversion1 2.0.1-4ubuntu1 bionic \
qtchooser 64-ga1b6736-5 bionic \
libicu60 60.2-1ubuntu1 bionic
# Get a recent version of CMake
wget https://cmake.org/files/v3.9/cmake-3.9.0-Linux-x86_64.sh
echo y | sh cmake-3.9.0-Linux-x86_64.sh --prefix=cmake
export PATH=/yuzu/cmake/cmake-3.9.0-Linux-x86_64/bin:$PATH
mkdir build && cd build
cmake .. -DYUZU_BUILD_UNICORN=ON -DCMAKE_BUILD_TYPE=Release
make -j4
ctest -VV -C Release

View File

@@ -0,0 +1,38 @@
#!/usr/bin/python
import sys, re, subprocess
from launchpadlib.launchpad import Launchpad
cachedir = '/.launchpadlib/cache/'
launchpad = Launchpad.login_anonymously('grab build info', 'production', cachedir, version='devel')
processed_packages = []
deb_file_list = []
def get_url(pkg, distro):
build_link = launchpad.archives.getByReference(reference='ubuntu').getPublishedBinaries(binary_name=pkg[0], distro_arch_series='https://api.launchpad.net/devel/ubuntu/'+distro+'/amd64', version=pkg[1], exact_match=True, order_by_date=True).entries[0]['build_link']
deb_name = pkg[0] + '_' + pkg[1] + '_amd64.deb'
deb_link = build_link + '/+files/' + deb_name
return [deb_link, deb_name]
def list_dependencies(deb_file):
t=subprocess.check_output(['bash', '-c', 'dpkg -I ' + deb_file + ' | grep -oP "^ Depends\: \K.*$"'])
deps=[i.strip() for i in t.split(',')]
equals_re = re.compile(r'^(.*) \(= (.*)\)$')
return [equals_re.sub(r'\1=\2', i).split('=') for i in filter(equals_re.match, deps)]
def get_package(pkg, distro):
if pkg in processed_packages:
return
print 'Getting ' + pkg[0] + '...'
url = get_url(pkg, distro)
subprocess.check_call(['wget', '--quiet', url[0], '-O', url[1]])
for dep in list_dependencies(url[1]):
get_package(dep, distro)
processed_packages.append(pkg)
deb_file_list.append('./' + url[1])
for i in xrange(1, len(sys.argv), 3):
get_package([sys.argv[i], sys.argv[i + 1]], sys.argv[i + 2])
subprocess.check_call(['apt-get', 'install', '-y'] + deb_file_list)