Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new container infrastructure on Travis-CI #5

Merged
merged 7 commits into from
Oct 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sudo: false
language: cpp
matrix:
include:
Expand All @@ -8,15 +9,11 @@ matrix:
- os: linux
env: OS=ubuntu EASY_BUILD=hosted
exclude:
- os: linux
- compiler: gcc
before_script:
- sudo add-apt-repository ppa:miselin/pedigree-compilers -y
- sudo apt-get update -q
- sudo apt-get install qemu travis-compilers
- os: linux
- compiler: gcc
script:
- ./easy_build_$EASY_BUILD.sh $OS
- ./scripts/runtest.py
- ./easy_build_$EASY_BUILD.sh nosudo $OS
- ./scripts/runtest.py
install: true
notifications:
email: false
Expand All @@ -30,3 +27,20 @@ notifications:
on_failure: always
slack:
secure: T9GJHictl8hUOgGh5RRVmRMExqlWJByssoSYdgnFuHA8ugLXyvHyYaVjLPVcFE9yv7w+sQgki0ZIzCyUH/Hg6/UPwRaH8W4Cm57vQwhE+TUvfy6eRRvYT118X/9X3xkYwhNUks+uydP6oI9YTnvr1XrzB6L4htA7Ma/YKBDhLhg=
addons:
apt:
packages:
- libmpfr-dev
- libmpc-dev
- libgmp3-dev
- sqlite3
- texinfo
- scons
- xorriso
- e2fsprogs
- qemu
- nasm
cache:
directories:
- $HOME/.ccache
- $HOME/pedigree-compiler
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ env['PYFLAKES'] = env.Detect('pyflakes')
env['MTOOLS_MMD'] = env.Detect('mmd')
env['MTOOLS_MCOPY'] = env.Detect('mcopy')
env['MTOOLS_MDEL'] = env.Detect('mdel')
env['MKISOFS'] = env.Detect(['mkisofs', 'genisoimage'])
env['MKISOFS'] = env.Detect(['mkisofs', 'genisoimage', 'xorriso'])
env['SQLITE'] = env.Detect('sqlite3')
env['MKIMAGE'] = env.Detect('mkimage')
env['GIT'] = env.Detect('git')
Expand Down
3 changes: 3 additions & 0 deletions build-etc/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ TRAVIS_OPTIONS=
if [ ! -z "$TRAVIS" ]; then
TRAVIS_OPTIONS="travis=$TRAVIS forcemtools=1"

# Override the compiler directory for Travis caching.
COMPILER_DIR=$HOME/pedigree-compiler

# The toolchain .deb file installs all files owned as root, which is not
# useful when we want to symlink our crt* and POSIX headers. So, fix that.
ME=`whoami`
Expand Down
8 changes: 6 additions & 2 deletions easy_build_hosted.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ if [ ! -e $script_dir/.easy_os ]; then
read os
else
os=$1
if [ "$os" = "nosudo" ]; then
os=$2
nosudo=1
fi
fi

shopt -s nocasematch
Expand All @@ -38,11 +42,11 @@ if [ ! -e $script_dir/.easy_os ]; then
debian)
# TODO: Not sure if the package list is any different for debian vs ubuntu?
echo "Installing packages with apt-get, please wait..."
sudo apt-get install libmpfr-dev libmpc-dev libgmp3-dev sqlite3 texinfo scons genisoimage nasm
[ $nosudo = 0 ] && sudo apt-get install libmpfr-dev libmpc-dev libgmp3-dev sqlite3 texinfo scons genisoimage nasm
;;
ubuntu)
echo "Installing packages with apt-get, please wait..."
sudo apt-get install libmpfr-dev libmpc-dev libgmp3-dev sqlite3 texinfo scons genisoimage nasm
[ $nosudo = 0 ] && sudo apt-get install libmpfr-dev libmpc-dev libgmp3-dev sqlite3 texinfo scons genisoimage nasm
;;
opensuse)
echo "Installing packages with zypper, please wait..."
Expand Down
14 changes: 10 additions & 4 deletions easy_build_x64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ old=$(pwd)
script_dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P) && script_dir=$script_dir
cd $old

COMPILER_DIR=$script_dir/pedigree-compiler
. $script_dir/build-etc/travis.sh

set -e
Expand All @@ -19,6 +20,7 @@ echo
compiler_build_options=""

real_os=""
nosudo=0
if [ ! -e $script_dir/.easy_os ]; then

echo "Checking for dependencies... Which operating system are you running on?"
Expand All @@ -28,6 +30,10 @@ if [ ! -e $script_dir/.easy_os ]; then
read os
else
os=$1
if [ "$os" = "nosudo" ]; then
os=$2
nosudo=1
fi
fi

shopt -s nocasematch
Expand All @@ -38,11 +44,11 @@ if [ ! -e $script_dir/.easy_os ]; then
debian)
# TODO: Not sure if the package list is any different for debian vs ubuntu?
echo "Installing packages with apt-get, please wait..."
sudo apt-get install libmpfr-dev libmpc-dev libgmp3-dev sqlite3 texinfo scons genisoimage
[ $nosudo = 0 ] && sudo apt-get install libmpfr-dev libmpc-dev libgmp3-dev sqlite3 texinfo scons genisoimage
;;
ubuntu)
echo "Installing packages with apt-get, please wait..."
sudo apt-get install libmpfr-dev libmpc-dev libgmp3-dev sqlite3 texinfo scons genisoimage e2fsprogs
[ $nosudo = 0 ] && sudo apt-get install libmpfr-dev libmpc-dev libgmp3-dev sqlite3 texinfo scons genisoimage e2fsprogs
;;
opensuse)
echo "Installing packages with zypper, please wait..."
Expand Down Expand Up @@ -122,7 +128,7 @@ case $real_os in
esac

# Install cross-compilers
$script_dir/scripts/checkBuildSystemNoInteractive.pl x86_64-pedigree $script_dir/pedigree-compiler $compiler_build_options
$script_dir/scripts/checkBuildSystemNoInteractive.pl x86_64-pedigree $COMPILER_DIR $compiler_build_options

old=$(pwd)
cd $script_dir
Expand Down Expand Up @@ -158,7 +164,7 @@ export LIBTOOL=$script_dir/../images/local/applications:$PATH
# again to build it against the shared libstdc++. Once a working shared
# libstdc++ exists, the static one built here is no longer relevant.
# What a mess!
$script_dir/scripts/checkBuildSystemNoInteractive.pl x86_64-pedigree $script_dir/pedigree-compiler $compiler_build_options "libcpp"
$script_dir/scripts/checkBuildSystemNoInteractive.pl x86_64-pedigree $COMPILER_DIR $compiler_build_options "libcpp"

set +e

Expand Down
10 changes: 9 additions & 1 deletion site_scons/buildutils/diskimages/livecd.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,16 @@ def buildCdImage(target, source, env):
shutil.copy(pathToMenu, '%s.mkisofs' % pathToMenu)
pathToMenu += '.mkisofs'

env['MKISOFS'] = 'xorriso'

args = [
env['MKISOFS'],
]

if env['MKISOFS'] == 'xorriso':
args.extend(['-as', 'mkisofs'])

args.extend([
'-D',
'-joliet',
'-graft-points',
Expand All @@ -67,7 +75,7 @@ def buildCdImage(target, source, env):
'boot/kernel=%s' % (source[2].abspath,),
'boot/initrd.tar=%s' % (source[1].abspath,),
'.pedigree-root=%s' % (source[0].abspath,),
]
])

if env['livecd']:
args.extend([
Expand Down