.travis.yml: basic compile and check recipes
diff mbox

Message ID 1380040263-7010-2-git-send-email-alex.bennee@linaro.org
State New
Headers show

Commit Message

Alex Bennée Sept. 24, 2013, 4:31 p.m. UTC
From: Alex Bennée <alex@bennee.com>

This adds a build matrix definition for travis-ci.org continuous
integration service. It is usable on any public repository hosted on
GitHub. Once you have created an account signed into Travis you can
enable it on selected projects via travis-ci.org/profile. Alternatively
you can configure the service hooks on GitHub via the repository
Settings tab,then Service Hooks and selecting Travis.

Once setup Travis will automatically test every push as well as any pull
requests submitted to that repository.

The build matrix is currently split by target architecture (see TARGETS
environment variable) because a full build of QEMU can take some time.
This way you get quick feedback for any obvious errors. The additional
environment variables exist to allow additional builds to tweak the
environment. These are:

EXTRA_CONFIG - extra terms passed to configure
EXTRA_PKGS - extra dev packages to install
TEST_CMD - default "make check", can be overridden

I've confined the additional stuff to x86/x86_64 for convenience.

As Travis supports clang the main builds are done twice (once for gcc
and once for clang). However clang is disabled for the debug/trace
builds for the purposes of brevity.

Other wrinkles:

 * The lttng user-space tracing back-end is disabled
   (it is currently horribly broken)
 * The ftrace back-end doesn't run "make check"
   (it requires a mounted debugfs to work)

Signed-off-by: Alex Bennée <alex@bennee.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 .travis.yml | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 66 insertions(+)
 create mode 100644 .travis.yml

Comments

Peter Maydell Sept. 24, 2013, 11:44 p.m. UTC | #1
On 25 September 2013 01:31,  <alex.bennee@linaro.org> wrote:
> +    # Debug related options
> +    - env: TARGETS=i386-softmmu,x86_64-softmmu
> +           EXTRA_CONFIG="--enable-debug --enable-debug-tcg --enable-tcg-interpreter"

--enable-debug implies --enable-debug-tcg, you don't need to specify
it separately.

I think we should have an --enable-debug config tested which is actually
testing TCG, not the TCG interpreter (which is a very rarely used and
not IMHO terribly useful config).

> +    # This disabled make check for the ftrace backend which needs more setting up
> +    # Currently broken on 12.04 due to mis-packaged liburcu and changed API, will be pulled.
> +    #- env: TARGETS=i386-softmmu,x86_64-softmmu
> +    #       EXTRA_PKGS="liblttng-ust-dev liburcu-dev"
> +    #       EXTRA_CONFIG="--enable-trace-backend=ust"

Does our configure identify the busted library and refuse to configure with
this config? It probably ought to.

-- PMM
Alex Bennée Sept. 25, 2013, 10 a.m. UTC | #2
peter.maydell@linaro.org writes:

> On 25 September 2013 01:31,  <alex.bennee@linaro.org> wrote:
>> +    # Debug related options
>> +    - env: TARGETS=i386-softmmu,x86_64-softmmu
>> +           EXTRA_CONFIG="--enable-debug --enable-debug-tcg --enable-tcg-interpreter"
>
> --enable-debug implies --enable-debug-tcg, you don't need to specify
> it separately.
>
> I think we should have an --enable-debug config tested which is actually
> testing TCG, not the TCG interpreter (which is a very rarely used and
> not IMHO terribly useful config).

OK I'll split those two up.

>> +    # This disabled make check for the ftrace backend which needs more setting up
>> +    # Currently broken on 12.04 due to mis-packaged liburcu and changed API, will be pulled.
>> +    #- env: TARGETS=i386-softmmu,x86_64-softmmu
>> +    #       EXTRA_PKGS="liblttng-ust-dev liburcu-dev"
>> +    #       EXTRA_CONFIG="--enable-trace-backend=ust"
>
> Does our configure identify the busted library and refuse to configure with
> this config? It probably ought to.

It's a mess. It probably still works on some set-ups but in discussion
with Stefan on IRC it looks like it's regressed on most modern set-ups.
The fundamental issue is lttng's lack of stable API. I hunted around a
bit trying to get it working but realised the script needs fixing up as
well so gave up.

Really ust just needs to be ripped out for now unless someone else wants
to dig into to supporting multiple versions painlessly.
Stefan Hajnoczi Sept. 26, 2013, 7:38 a.m. UTC | #3
On Wed, Sep 25, 2013 at 11:00:05AM +0100, Alex Bennée wrote:
> 
> peter.maydell@linaro.org writes:
> 
> > On 25 September 2013 01:31,  <alex.bennee@linaro.org> wrote:
> >> +    # This disabled make check for the ftrace backend which needs more setting up
> >> +    # Currently broken on 12.04 due to mis-packaged liburcu and changed API, will be pulled.
> >> +    #- env: TARGETS=i386-softmmu,x86_64-softmmu
> >> +    #       EXTRA_PKGS="liblttng-ust-dev liburcu-dev"
> >> +    #       EXTRA_CONFIG="--enable-trace-backend=ust"
> >
> > Does our configure identify the busted library and refuse to configure with
> > this config? It probably ought to.
> 
> It's a mess. It probably still works on some set-ups but in discussion
> with Stefan on IRC it looks like it's regressed on most modern set-ups.
> The fundamental issue is lttng's lack of stable API. I hunted around a
> bit trying to get it working but realised the script needs fixing up as
> well so gave up.
> 
> Really ust just needs to be ripped out for now unless someone else wants
> to dig into to supporting multiple versions painlessly.

I sent a patch to drop ust.  Either someone will show up who is willing
to fix it or we'll remove it since it has few (zero?) users.

Stefan

Patch
diff mbox

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..89423ad
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,66 @@ 
+language: c
+compiler:
+  - gcc
+  - clang
+env:
+  global:
+    - TEST_CMD="make check"
+    - EXTRA_CONFIG=""
+    # Development packages, EXTRA_PKGS saved for additional builds
+    - CORE_PKGS="libusb-1.0-0-dev libiscsi-dev librados-dev libncurses5-dev"
+    - NET_PKGS="libseccomp-dev libgnutls-dev libssh2-1-dev  libspice-server-dev libspice-protocol-dev libnss3-dev"
+    - GUI_PKGS="libgtk-3-dev libvte-2.90-dev libsdl1.2-dev libpng12-dev libpixman-1-dev"
+    - EXTRA_PKGS=""
+  matrix:
+  - TARGETS=alpha-softmmu,alpha-linux-user
+  - TARGETS=arm-softmmu,arm-linux-user
+  - TARGETS=cris-softmmu
+  - TARGETS=i386-softmmu,x86_64-softmmu
+  - TARGETS=lm32-softmmu
+  - TARGETS=m68k-softmmu 
+  - TARGETS=microblaze-softmmu,microblazeel-softmmu
+  - TARGETS=mips-softmmu,mips64-softmmu,mips64el-softmmu,mipsel-softmmu
+  - TARGETS=moxie-softmmu
+  - TARGETS=or32-softmmu,
+  - TARGETS=ppc-softmmu,ppc64-softmmu,ppcemb-softmmu
+  - TARGETS=s390x-softmmu
+  - TARGETS=sh4-softmmu,sh4eb-softmmu
+  - TARGETS=sparc-softmmu,sparc64-softmmu
+  - TARGETS=unicore32-softmmu
+  - TARGETS=xtensa-softmmu,xtensaeb-softmmu
+before_install:
+  - git submodule update --init --recursive
+  - sudo apt-get update -qq
+  - sudo apt-get install -qq ${CORE_PKGS} ${NET_PKGS} ${GUI_PKGS} ${EXTRA_PKGS}
+script: "./configure --target-list=${TARGETS} ${EXTRA_CONFIG} && make && ${TEST_CMD}"
+matrix:
+  # We manually include a number of additional build for non-standard bits
+  include:
+    # Debug related options
+    - env: TARGETS=i386-softmmu,x86_64-softmmu
+           EXTRA_CONFIG="--enable-debug --enable-debug-tcg --enable-tcg-interpreter"
+      compiler: gcc
+    # Currently configure doesn't force --disable-pie
+    - env: TARGETS=i386-softmmu,x86_64-softmmu
+           EXTRA_CONFIG="--enable-gprof --enable-gcov --disable-pie"
+      compiler: gcc
+    - env: TARGETS=i386-softmmu,x86_64-softmmu
+           EXTRA_PKGS="sparse"
+           EXTRA_CONFIG="--enable-sparse"
+      compiler: gcc
+    # All the trace backends (apart from dtrace)
+    - env: TARGETS=i386-softmmu,x86_64-softmmu
+           EXTRA_CONFIG="--enable-trace-backend=stderr"
+      compiler: gcc
+    - env: TARGETS=i386-softmmu,x86_64-softmmu
+           EXTRA_CONFIG="--enable-trace-backend=simple"
+      compiler: gcc
+    - env: TARGETS=i386-softmmu,x86_64-softmmu
+           EXTRA_CONFIG="--enable-trace-backend=ftrace"
+           TEST_CMD=""
+      compiler: gcc
+    # This disabled make check for the ftrace backend which needs more setting up
+    # Currently broken on 12.04 due to mis-packaged liburcu and changed API, will be pulled.
+    #- env: TARGETS=i386-softmmu,x86_64-softmmu
+    #       EXTRA_PKGS="liblttng-ust-dev liburcu-dev"
+    #       EXTRA_CONFIG="--enable-trace-backend=ust"