Skip to contentSkip to conversation

travis: add initial Travis CI script to do builds

PATCH Superseded Doug Goldstein 3 participants 6 messages Feb 5, 2016

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 travis: add initial Travis CI script to do builds

This is just suppose to do a simple compile test on Travis CI. Currently due to linux86 (bcc/bin86/dev86) not being whitelisted the tools cannot be built.

---

So this will work great if we get a regular cronjob or a post-receive hook to push to GitHub (https://github.com/xen-project/xen) since Travis CI provides free integration with public repositories. So an example run of this is available at https://travis-ci.org/cardoe/xen/builds/107246160 if this gets merged I will setup a xen-project space under Travis for us. Currently its under my namespace because this file only exists in my branches.

The goal here is not to replace osstest by any means but to augment it by providing some easy to do build tests on every revision and reporting back. It should be possible in the future to potentially tie this into osstest to allow this to build and if the tree for some reason failed to build not kick off a test flight on osstest. Just some thoughts, I know I'm getting a bit ahead of myself.

Other future tweaks I've got are some simple dom0 boot tests using qemu to boot Xen and then boot a kernel and see that it came up. I've also got some scripts to check the code base for code style consistency using clang-format.

If you're curious to see the output of these tests come to #xentest on Freenode.

---
 .travis.yml | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 .travis.yml
.travis.yml new file +64 -0
new file mode 100644
index 0000000..9020f16
@@ -0,0 +1,64 @@
+language: c
+dist: trusty
+sudo: required
+matrix:
+    allow_failures:
+        - compiler: clang
+    include:
+        - compiler: gcc
+          env: XEN_TARGET_ARCH=x86_64
+        - compiler: gcc
+          env: XEN_TARGET_ARCH=x86_64 COMPILER=gcc-5
+        - compiler: clang
+          env: XEN_TARGET_ARCH=x86_64 clang=y
+        - compiler: clang
+          env: XEN_TARGET_ARCH=x86_64 COMPILER=clang-3.8 clang=y
+        - compiler: gcc
+          env: XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf-
+        - compiler: gcc
+          env: XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
+addons:
+    apt:
+        sources:
+            - ubuntu-toolchain-r-test
+            - llvm-toolchain-precise
+        packages:
+            - zlib1g-dev
+            - libncurses5-dev
+            - libssl-dev
+            - python2.7-dev
+            - xorg-dev
+            - uuid-dev
+            - libyajl-dev
+            - libaio-dev
+            - libglib2.0-dev
+            - libpixman-1-dev
+            - pkg-config
+            - bridge-utils
+            - iproute2
+            - flex
+            - bison
+            - gettext
+            - acpica-tools
+            - bin86
+            - bcc
+            - libc6-dev-i386
+            - libnl-3-dev
+            - ocaml-nox
+            - libfindlib-ocaml-dev
+            - markdown
+            - transfig
+            - pandoc
+            - gcc-arm-linux-gnueabihf
+            - gcc-aarch64-linux-gnu
+            - gcc-5
+            - clang-3.8
+before_script:
+    - export CC=${COMPILER:-${CC}}
+    - ${CC} --version
+script:
+    - ( ./configure --disable-tools --disable-stubdom --enable-docs &&
+      make CC="${CROSS_COMPILE}${CC}" HOSTCC="${CC}" dist )
+notifications:
+      irc:
+          - "chat.freenode.net#xentest"
Signature · 1 line
2.4.10
#1 lore raw
Quoted 14 lines · Doug Goldstein

This is just suppose to do a simple compile test on Travis CI. Currently due to linux86 (bcc/bin86/dev86) not being whitelisted the tools cannot be built.

---

So this will work great if we get a regular cronjob or a post-receive hook to push to GitHub (https://github.com/xen-project/xen) since Travis CI provides free integration with public repositories. So an example run of this is available at https://travis-ci.org/cardoe/xen/builds/107246160 if this gets merged I will setup a xen-project space under Travis for us. Currently its under my namespace because this file only exists in my branches.

Quoted 7 lines

The goal here is not to replace osstest by any means but to augment it by providing some easy to do build tests on every revision and reporting back. It should be possible in the future to potentially tie this into osstest to allow this to build and if the tree for some reason failed to build not kick off a test flight on osstest. Just some thoughts, I know I'm getting a bit ahead of myself.

I think adding travis CI is a good idea. It would be valuable if individual developers can run their series through travis before submitting. Thanks for your work.

Quoted 7 lines

Other future tweaks I've got are some simple dom0 boot tests using qemu to boot Xen and then boot a kernel and see that it came up. I've also got some scripts to check the code base for code style consistency using clang-format.

If you're curious to see the output of these tests come to #xentest on Freenode.

The purpose of #xentest is (or was) to coordinate test day activities, I would rather use a different channel.

However, there has been idea floating that test day should be organised in developer channels, and there is no test day activity at the moment, so I think it would fine for now to use it for travis.

A stupid question: does this mean if I fork xen.git on github, travis will pick up my fork and spam #xentest?

Wei.

#2 lore raw
Quoted 38 lines · Wei Liu
Quoted 14 lines · Doug Goldstein

This is just suppose to do a simple compile test on Travis CI. Currently due to linux86 (bcc/bin86/dev86) not being whitelisted the tools cannot be built.

---

So this will work great if we get a regular cronjob or a post-receive hook to push to GitHub (https://github.com/xen-project/xen) since Travis CI provides free integration with public repositories. So an example run of this is available at https://travis-ci.org/cardoe/xen/builds/107246160 if this gets merged I will setup a xen-project space under Travis for us. Currently its under my namespace because this file only exists in my branches.

Quoted 7 lines

The goal here is not to replace osstest by any means but to augment it by providing some easy to do build tests on every revision and reporting back. It should be possible in the future to potentially tie this into osstest to allow this to build and if the tree for some reason failed to build not kick off a test flight on osstest. Just some thoughts, I know I'm getting a bit ahead of myself.

I think adding travis CI is a good idea. It would be valuable if individual developers can run their series through travis before submitting. Thanks for your work.

Quoted 7 lines

Other future tweaks I've got are some simple dom0 boot tests using qemu to boot Xen and then boot a kernel and see that it came up. I've also got some scripts to check the code base for code style consistency using clang-format.

If you're curious to see the output of these tests come to #xentest on Freenode.

The purpose of #xentest is (or was) to coordinate test day activities, I would rather use a different channel.

Quoted 9 lines

However, there has been idea floating that test day should be organised in developer channels, and there is no test day activity at the moment, so I think it would fine for now to use it for travis.

A stupid question: does this mean if I fork xen.git on github, travis will pick up my fork and spam #xentest?

Wei.

Hmm. Good point. It will. I'll drop this part of the patch. There might be a way to properly filter this but I'll look into that as a follow on.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#3 lore raw
Quoted 43 lines · Doug Goldstein
Quoted 42 lines · Wei Liu
Quoted 14 lines · Doug Goldstein

This is just suppose to do a simple compile test on Travis CI. Currently due to linux86 (bcc/bin86/dev86) not being whitelisted the tools cannot be built.

---

So this will work great if we get a regular cronjob or a post-receive hook to push to GitHub (https://github.com/xen-project/xen) since Travis CI provides free integration with public repositories. So an example run of this is available at https://travis-ci.org/cardoe/xen/builds/107246160 if this gets merged I will setup a xen-project space under Travis for us. Currently its under my namespace because this file only exists in my branches.

Quoted 7 lines

The goal here is not to replace osstest by any means but to augment it by providing some easy to do build tests on every revision and reporting back. It should be possible in the future to potentially tie this into osstest to allow this to build and if the tree for some reason failed to build not kick off a test flight on osstest. Just some thoughts, I know I'm getting a bit ahead of myself.

I think adding travis CI is a good idea. It would be valuable if individual developers can run their series through travis before submitting. Thanks for your work.

Quoted 7 lines

Other future tweaks I've got are some simple dom0 boot tests using qemu to boot Xen and then boot a kernel and see that it came up. I've also got some scripts to check the code base for code style consistency using clang-format.

If you're curious to see the output of these tests come to #xentest on Freenode.

The purpose of #xentest is (or was) to coordinate test day activities, I would rather use a different channel.

However, there has been idea floating that test day should be organised in developer channels, and there is no test day activity at the moment, so I think it would fine for now to use it for travis.

Quoted 9 lines
Quoted 5 lines

A stupid question: does this mean if I fork xen.git on github, travis will pick up my fork and spam #xentest?

Wei.

Hmm. Good point. It will. I'll drop this part of the patch. There might be a way to properly filter this but I'll look into that as a follow on.

I think the best option is for travis to use credential from the current fork / current user. I *think* that should be supported one way or another. But there is no need to rush of course. :-)

Wei.

Quoted 3 lines
Signature · 1 line
Doug Goldstein
#4 lore raw
In reply to Doug Goldstein
Quoted 7 lines · Doug Goldstein

The goal here is not to replace osstest by any means but to augment it by providing some easy to do build tests on every revision and reporting back. It should be possible in the future to potentially tie this into osstest to allow this to build and if the tree for some reason failed to build not kick off a test flight on osstest. Just some thoughts, I know I'm getting a bit ahead of myself.

IMHO Free Software projects like Xen Project should be very wary of tying their infrastructure and workflows to services which are backed by non-free software (which I know github is and AFAICT Travis CI also is).

IOW while augmenting things to provide extra/non-critical data about the state of the world might be ok or at least tolerable, projects should be wary of inserting these tools into the "critical path" of their workflows. I think inserting Travis CI before osstest would be just such a mistake.

https://mako.cc/writing/hill-free_tools.html is a good essay on the subject.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw
Quoted 18 lines · Ian Campbell
Quoted 7 lines · Doug Goldstein

The goal here is not to replace osstest by any means but to augment it by providing some easy to do build tests on every revision and reporting back. It should be possible in the future to potentially tie this into osstest to allow this to build and if the tree for some reason failed to build not kick off a test flight on osstest. Just some thoughts, I know I'm getting a bit ahead of myself.

IMHO Free Software projects like Xen Project should be very wary of tying their infrastructure and workflows to services which are backed by non-free software (which I know github is and AFAICT Travis CI also is).

IOW while augmenting things to provide extra/non-critical data about the state of the world might be ok or at least tolerable, projects should be wary of inserting these tools into the "critical path" of their workflows. I think inserting Travis CI before osstest would be just such a mistake.

Quoted 5 lines

https://mako.cc/writing/hill-free_tools.html is a good essay on the subject.

Ian.

That's fine. I was throwing out some ideas, we definitely don't have to do the things I said. My stated just trying to use existing services to provide some extra testing of Xen and not replace osstest, similarly to Xen using Coverity which itself is not open source. I've been tinkering with using llvm's scan-build to provide similar analysis but currently the tree doesn't build cleanly with llvm.

Signature · 1 line
Doug Goldstein

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel