summaryrefslogtreecommitdiffstats
path: root/opal-ci/build-ubuntu-16.04.sh
blob: 06a9b484f98f75a58502d83aeaee684bc135977b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash

set -uo pipefail
set -e
set -vx

MAKE_J=$(grep -c processor /proc/cpuinfo)

export CROSS="ccache powerpc64le-linux-gnu-"

make -j${MAKE_J} all
(cd opal-ci; ./build-qemu-powernv.sh)
export QEMU_BIN=$(pwd)/opal-ci/qemu/ppc64-softmmu/qemu-system-ppc64
./opal-ci/fetch-debian-jessie-installer.sh
make -j${MAKE_J} check
(make clean; cd external/gard && CROSS= make -j${MAKE_J})
# because some ppc64le versions don't have arm cross compiler
if which arm-linux-gnueabi-gcc; then
    ( cd external/pflash;
      echo "Building for ARM..."
      make clean && make distclean
      CROSS_COMPILE=arm-linux-gnueabi-  make || { echo "ARM build failed"; exit 1; }
    )
fi
(cd external/pflash; make clean && make distclean && make)
make clean
SKIBOOT_GCOV=1 make -j${MAKE_J}
SKIBOOT_GCOV=1 make -j${MAKE_J} check

make clean
rm -rf builddir
mkdir builddir
make SRC=$(pwd) -f ../Makefile -C builddir -j${MAKE_J}
make clean
OpenPOWER on IntegriCloud