From: Claudius Heine <[email protected]>

This commit allows travis to spawn multiple builders in parallel
for both currently supported architectures.

Signed-off-by: Claudius Heine <[email protected]>
---
 .travis-build.sh | 31 +++++++++++++++++++++++++++++++
 .travis.yml      | 14 +++++---------
 2 files changed, 36 insertions(+), 9 deletions(-)
 create mode 100755 .travis-build.sh

diff --git a/.travis-build.sh b/.travis-build.sh
new file mode 100755
index 0000000..56786ab
--- /dev/null
+++ b/.travis-build.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+set -euo pipefail
+
+TARGET="${TARGET-"$1"}"
+
+prepare_build()
+{
+    autoreconf -fi
+    mkdir build
+    cd build
+}
+case "$TARGET" in
+    native)
+        prepare_build
+        ../configure
+        exec make check
+        ;;
+    i586)
+        sudo apt-get install --no-install-recommends \
+            --target-release xenial libcmocka-dev:i386
+        prepare_build
+        ../configure --with-gnuefi-lib-dir=/usr/lib32 CFLAGS=-m32 \
+            host_alias=i586-linux
+        exec make check
+        ;;
+    *)
+        exit -1
+        ;;
+esac
+
diff --git a/.travis.yml b/.travis.yml
index df4a0db..dae0337 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,10 @@
 # the COPYING file in the top-level directory.
 #
 
+env:
+  matrix:
+    - TARGET=native
+    - TARGET=i586
 language: c
 
 compiler:
@@ -24,12 +28,4 @@ install:
   - sudo apt-get install --no-install-recommends --target-release xenial 
libcmocka-dev
 
 script:
-  - autoreconf -fi
-  - mkdir build-x86_64 && cd build-x86_64
-  - ../configure
-  - make check
-  # Switch to 32-bit (libcmocka-dev can only be installed in one variant)
-  - sudo apt-get install --no-install-recommends --target-release xenial 
libcmocka-dev:i386
-  - mkdir ../build-i586 && cd ../build-i586
-  - ../configure --with-gnuefi-lib-dir=/usr/lib32 CFLAGS=-m32 
host_alias=i586-linux
-  - make check
+  - ./.travis-build.sh
-- 
2.14.1

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/20170926132244.1615-2-claudius.heine.ext%40siemens.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to