Skip to contentSkip to conversation

travis: add initial Travis CI script to do builds

PATCH In review Doug Goldstein 5 participants 7 messages Feb 8, 2016 – Feb 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v3 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.

---
change since v3:
- add debug builds
change since v2:
- drop IRC notification

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.

---
 .travis.yml | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)
 create mode 100644 .travis.yml
.travis.yml new file +73 -0
new file mode 100644
index 0000000..c7227ba
@@ -0,0 +1,73 @@
+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: gcc
+          env: XEN_TARGET_ARCH=x86_64 debug=y
+        - compiler: gcc
+          env: XEN_TARGET_ARCH=x86_64 COMPILER=gcc-5 debug=y
+        - 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: clang
+          env: XEN_TARGET_ARCH=x86_64 clang=y debug=y
+        - compiler: clang
+          env: XEN_TARGET_ARCH=x86_64 COMPILER=clang-3.8 clang=y debug=y
+        - compiler: gcc
+          env: XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf-
+        - compiler: gcc
+          env: XEN_TARGET_ARCH=arm32 CROSS_COMPILE=arm-linux-gnueabihf- debug=y
+        - compiler: gcc
+          env: XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu-
+        - compiler: gcc
+          env: XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- debug=y
+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 )
Signature · 1 line
2.4.10
#2 lore raw
Quoted 7 lines · Andrew Cooper
Quoted 6 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.

Quoted 8 lines
Quoted 1 line

This will be a massive help for contributes to sanity check their patch
series.

BTW, when all the bits will be in place, a piece of doc (e.g., on the wiki) explaining how to take advantage of this "massive help" would be great... E.g., for those people that have managed to survive until now barely knowing what Travis even is! :-P

Regards,
Dario

Signature · 4 lines
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

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

#3 lore raw
Quoted 16 lines · Dario Faggioli
Quoted 7 lines · Andrew Cooper
Quoted 6 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.

Quoted 8 lines
Quoted 1 line

This will be a massive help for contributes to sanity check their patch
series.

Quoted 8 lines

BTW, when all the bits will be in place, a piece of doc (e.g., on the wiki) explaining how to take advantage of this "massive help" would be great... E.g., for those people that have managed to survive until now barely knowing what Travis even is! :-P

Regards,
Dario

Gladly. I just got write permissions to the wiki so I'll get started soon.

Signature · 1 line
Doug Goldstein

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

#6 lore raw

Re: [PATCH v3] travis: add initial Travis CI script to do builds [and 2 more messages]

In reply to Doug Goldstein

Doug Goldstein writes ("[PATCH v3] travis: add initial Travis CI script to do builds"):

Quoted 5 lines

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.

Andrew Cooper writes ("Re: [Xen-devel] [PATCH v3] travis: add initial Travis CI> Reviewed-by: Andrew Cooper <[email protected]>

Wei Liu writes ("Re: [Xen-devel] [PATCH v3] travis: add initial Travis CI script to do builds"):

Quoted 1 line