[lxc-devel] [PATCH] add travis-ci support to LXC github repo

S.Çağlar Onur caglar at 10ur.org
Tue Dec 24 19:00:11 UTC 2013


Hi,

On Mon, Dec 23, 2013 at 2:34 PM, Stéphane Graber <stgraber at ubuntu.com> wrote:
> On Mon, Dec 23, 2013 at 02:18:18PM -0500, S.Çağlar Onur wrote:
>> Hi Stéphane,
>>
>> On Mon, Dec 23, 2013 at 2:13 PM, Stéphane Graber <stgraber at ubuntu.com> wrote:
>> > On Mon, Dec 23, 2013 at 02:03:56PM -0500, S.Çağlar Onur wrote:
>> >> Hi Serge,
>> >>
>> >> On Mon, Dec 23, 2013 at 10:42 AM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
>> >> > Is this something you've discussed with Stéphane?  A set of tests is
>> >> > already being run on his own server, so I'm not sure this is needed.
>> >> > There is the "the more testing the better" point of view, but I've seen
>> >> > more time wasted trying to debug test "breakages" that were actually
>> >> > host system errors (at least on one of the test harnasses we were using
>> >> > for lxc) than real errors found, so I'm a bit hesitant.
>> >>
>> >> No, I haven't discussed this with Stéphane. IMHO this only ensures
>> >> that master builds fine after a commit. We don't run test cases as
>> >> travis-ci vms not capable of creating LXC containers for now. One
>> >> advantage of travis over others is its integration with github. When
>> >> someone sends a pull request, travis builds that changeset on top of
>> >> master so that one can see whether merging the pull request is OK or
>> >> not.
>> >>
>> >> But if you think that's unnecessary, or think that this duplicates
>> >> what qa.linuxcontainers.org does then please feel free to drop this :)
>> >
>> > I don't really mind it as long as it doesn't bother me with e-mails
>> > (which I'll be getting from our own CI environment anyway). I'd
>> > recommend going with a much simpler set of options though to make the
>> > whole thing a bit more robust.
>> >
>> > Nowadays a simple:
>> > sh autogen.sh
>> > ./configure
>> > make -j4
>>
>> I extracted them from ubuntu build logs thinking that they are what we
>> want to use but I'm OK with simple, simple is good :) What about
>> something like that then?
>>
>> language: c
>> compiler:
>>   - gcc
>> # failing with python
>> #  - clang
>> before_install:
>>  - sudo apt-get update -qq
>>  - sudo apt-get install -qq libapparmor-dev libcap-dev libseccomp-dev
>> python3-dev
>
> Add docbook2x, libgnutls-dev, liblua5.2-dev and libselinux1-dev and we
> should actually have all features enabled.
>
> I need to change our configure.ac to add GNUTLS to the configure
> overview and disable python3 if clang is used instead of gcc, then we'll
> be able to just build with clang too without any extra config flag.

Done :) and tested [
https://travis-ci.org/caglar10ur/lxc-upstream/jobs/15938718 &
https://travis-ci.org/caglar10ur/lxc-upstream/jobs/15938719 ], will
submit the revised version in a minute.

>> script: ./autogen.sh && ./configure && make -j4
>>
>> > Will build LXC with all options enabled so long as the right packages
>> > were installed first. Not hardcoding them will prevent test breakage
>> > when we rename/remove some of those options.
>> >
>> >>
>> >> > I'd be more interested in new tests for specific use cases - like a
>> >> > unprivileged container create/start - which aren't currently being
>> >> > tested, or cleanups to the existing tests cases to make them more
>> >> > robust and useful.
>> >> >
>> >> > thanks,
>> >> > -serge
>> >> >
>> >> > Quoting Ranjib Dey (dey.ranjib at gmail.com):
>> >> >> +1 . too bad travis run on openvz :-( . else we could have run the tests .
>> >> >>
>> >> >>
>> >> >> On Sun, Dec 22, 2013 at 11:58 PM, S.Çağlar Onur <caglar at 10ur.org> wrote:
>> >> >>
>> >> >> > Travis is a free hosted CI platform for the open source community. It
>> >> >> > integrates
>> >> >> > well with github and enables continous builds/tests for both repository
>> >> >> > itself
>> >> >> > and all the pull requests so that one can quickly see the result of the
>> >> >> > possible
>> >> >> > merge.
>> >> >> >
>> >> >> > This yml file is one of the few required steps to enable travis-ci support
>> >> >> > for
>> >> >> > LXC github repo. One of you guys still need to sign in travis-ci through
>> >> >> > GitHub OAuth
>> >> >> > and enable travis support from its profile page
>> >> >> > https://travis-ci.org/profile
>> >> >> >
>> >> >> > As an example
>> >> >> > https://travis-ci.org/caglar10ur/lxc-upstream/builds/15872074 can be seen
>> >> >> >
>> >> >> > Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
>> >> >> > ---
>> >> >> >  .travis.yml | 9 +++++++++
>> >> >> >  1 file changed, 9 insertions(+)
>> >> >> >  create mode 100644 .travis.yml
>> >> >> >
>> >> >> > diff --git a/.travis.yml b/.travis.yml
>> >> >> > new file mode 100644
>> >> >> > index 0000000..e7e3776
>> >> >> > --- /dev/null
>> >> >> > +++ b/.travis.yml
>> >> >> > @@ -0,0 +1,9 @@
>> >> >> > +language: c
>> >> >> > +compiler:
>> >> >> > +  - gcc
>> >> >> > +# failing with python
>> >> >> > +#  - clang
>> >> >> > +before_install:
>> >> >> > + - sudo apt-get update -qq
>> >> >> > + - sudo apt-get install -qq libapparmor-dev libcap-dev libseccomp-dev
>> >> >> > python3-dev
>> >> >> > +script: ./autogen.sh && CFLAGS="-g -O2 -fstack-protector
>> >> >> > --param=ssp-buffer-size=4 -Wformat -Werror=format-security"
>> >> >> > CPPFLAGS="-D_FORTIFY_SOURCE=2" CXXFLAGS="-g -O2 -fstack-protector
>> >> >> > --param=ssp-buffer-size=4 -Wformat -Werror=format-security" FFLAGS="-g -O2"
>> >> >> > LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro" ./configure --prefix=/usr
>> >> >> > --sysconfdir=/etc --bindir=/usr/bin --libdir=/usr/lib/x86_64-linux-gnu/
>> >> >> > --localstatedir=/var --includedir=/usr/include --disable-rpath
>> >> >> > --enable-python --enable-tests --enable-apparmor --with-distro=ubuntu &&
>> >> >> > make -j4
>> >> >> > --
>> >> >> > 1.8.3.2
>> >> >> >
>> >> >> > _______________________________________________
>> >> >> > lxc-devel mailing list
>> >> >> > lxc-devel at lists.linuxcontainers.org
>> >> >> > http://lists.linuxcontainers.org/listinfo/lxc-devel
>> >> >> >
>> >> >
>> >> >> _______________________________________________
>> >> >> lxc-devel mailing list
>> >> >> lxc-devel at lists.linuxcontainers.org
>> >> >> http://lists.linuxcontainers.org/listinfo/lxc-devel
>> >> >
>> >> > _______________________________________________
>> >> > lxc-devel mailing list
>> >> > lxc-devel at lists.linuxcontainers.org
>> >> > http://lists.linuxcontainers.org/listinfo/lxc-devel
>> >>
>> >>
>> >>
>> >> --
>> >> S.Çağlar Onur <caglar at 10ur.org>
>> >> _______________________________________________
>> >> lxc-devel mailing list
>> >> lxc-devel at lists.linuxcontainers.org
>> >> http://lists.linuxcontainers.org/listinfo/lxc-devel
>> >
>> > --
>> > Stéphane Graber
>> > Ubuntu developer
>> > http://www.ubuntu.com
>> >
>> > _______________________________________________
>> > lxc-devel mailing list
>> > lxc-devel at lists.linuxcontainers.org
>> > http://lists.linuxcontainers.org/listinfo/lxc-devel
>> >
>>
>>
>>
>> --
>> S.Çağlar Onur <caglar at 10ur.org>
>> _______________________________________________
>> lxc-devel mailing list
>> lxc-devel at lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-devel
>
> --
> Stéphane Graber
> Ubuntu developer
> http://www.ubuntu.com
>
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel
>



-- 
S.Çağlar Onur <caglar at 10ur.org>


More information about the lxc-devel mailing list