On 2017-10-04 14:31, [ext] [email protected] wrote: > From: Claudius Heine <[email protected]> > > Having the dependency setup in the travis-build script offers some > advantages: > > - more flexibility without relying on travis specific configurations
Well, the installation script remains travis-specific, but if that helps reducing the installation footprint, it's fine. Merged to next, thanks. Jan > - faster build: > - for each job, only necessary packages are installed > - some uncessasary packages will not be installed (for example > oracle-java9-installer) > > Signed-off-by: Claudius Heine <[email protected]> > --- > > Changes in v2: > - expanded patch description > > I tried converting it to the build matrix, but thats not as convenient as > doing it in this script: > > - Defining job local apt addon parameter always overwrites global apt addon > parameter, so each job has to specify all packages. No distiction between > common and job specific packages. > - All apt source lines are added before any packages are installed. Not > possible to install just some packages from a repository of a newer > distribution without updating any other packages. > > It might be possible to put all the commands in a environment variable and > evaluate this variable in the 'install' step. But I would prefer using a > shell script directly instead. > > Claudis > > .travis-build.sh | 35 +++++++++++++++++++++++++++++++++-- > .travis.yml | 6 ------ > 2 files changed, 33 insertions(+), 8 deletions(-) > > diff --git a/.travis-build.sh b/.travis-build.sh > index 76629a8..2e00edc 100755 > --- a/.travis-build.sh > +++ b/.travis-build.sh > @@ -18,6 +18,31 @@ else > TARGET_EFFECTIVE="${PARAM:-"${TARGET}"}" > fi > > +install_common_deps() > +{ > + sudo apt-get install gcc-multilib gnu-efi libpci-dev > +} > + > +install_native_deps() > +{ > + sudo apt-add-repository \ > + 'deb http://archive.ubuntu.com/ubuntu xenial universe' > + sudo apt-get update -qq > + sudo apt-get install --no-install-recommends \ > + --target-release xenial libcmocka-dev > +} > + > +install_i586_deps() > +{ > + sudo apt-get install --no-install-recommends \ > + libz-dev:i386 > + sudo apt-add-repository \ > + 'deb http://archive.ubuntu.com/ubuntu xenial universe' > + sudo apt-get update -qq > + sudo apt-get install --no-install-recommends \ > + --target-release xenial libcmocka-dev:i386 > +} > + > prepare_build() > { > autoreconf -fi > @@ -48,6 +73,8 @@ install_cppcheck() > > case "$TARGET_EFFECTIVE" in > native) > + install_common_deps > + install_native_deps > prepare_build > enter_build > ../configure > @@ -55,8 +82,8 @@ case "$TARGET_EFFECTIVE" in > ;; > > i586) > - sudo apt-get install --no-install-recommends \ > - --target-release xenial libcmocka-dev:i386 > + install_common_deps > + install_i586_deps > prepare_build > enter_build > ../configure --with-gnuefi-lib-dir=/usr/lib32 CFLAGS=-m32 \ > @@ -65,6 +92,8 @@ case "$TARGET_EFFECTIVE" in > ;; > > cppcheck) > + install_common_deps > + install_native_deps > echo "Building and installing cppcheck..." > if ! install_cppcheck >cppcheck_build.log 2>&1 > then > @@ -103,6 +132,8 @@ case "$TARGET_EFFECTIVE" in > $enable $suppress $cpp_conf $includes . > ;; > coverity_prepare) > + install_common_deps > + install_native_deps > prepare_build > enter_build > ../configure > diff --git a/.travis.yml b/.travis.yml > index af6e354..69ad4c4 100644 > --- a/.travis.yml > +++ b/.travis.yml > @@ -25,12 +25,6 @@ sudo: required > before_install: > - echo -n | openssl s_client -connect scan.coverity.com:444 | sed -ne > '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a > /etc/ssl/certs/ca-certificates.crt > > -install: > - - sudo apt-get install gcc-multilib gnu-efi libpci-dev libz-dev:i386 > - - sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu xenial > universe' > - - sudo apt-get update -qq > - - sudo apt-get install --no-install-recommends --target-release xenial > libcmocka-dev > - > addons: > coverity_scan: > project: > -- You received this message because you are subscribed to the Google Groups "EFI Boot Guard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/efibootguard-dev/a6ea2781-5382-172c-4d2d-b372661a3832%40siemens.com. For more options, visit https://groups.google.com/d/optout.
