Blob Blame History Raw
From 3c1a083e5c5e56bf2e26aa806f023d4f053fc7b7 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 14 Aug 2018 16:01:39 +0200
Subject: [PATCH] add travis build job

---
 .travis.yml    | 15 +++++++++++++++
 fedora-test.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 00000000..16f9a511
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,15 @@
+sudo: required
+
+services:
+  - docker
+
+env:
+  matrix:
+    - IMAGE=latest
+    - IMAGE=rawhide
+    
+before_script:
+- docker pull fedora:$IMAGE
+
+script:
+- docker run --privileged -it -v $(pwd)/:/dracut fedora:$IMAGE /dracut/fedora-test.sh $IMAGE-$$
diff --git a/fedora-test.sh b/fedora-test.sh
new file mode 100755
index 00000000..ee506caf
--- /dev/null
+++ b/fedora-test.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+set -ex
+
+cd ${0%/*}
+
+RUN_ID="$1"
+
+dnf -y update --best --allowerasing
+
+dnf -y install --best --allowerasing \
+    dash \
+    asciidoc \
+    mdadm \
+    lvm2 \
+    dmraid \
+    cryptsetup \
+    nfs-utils \
+    nbd \
+    dhcp-server \
+    scsi-target-utils \
+    iscsi-initiator-utils \
+    strace \
+    btrfs-progs \
+    kmod-devel \
+    gcc \
+    bzip2 \
+    xz \
+    tar \
+    wget \
+    rpm-build \
+    make \
+    git \
+    bash-completion \
+    sudo \
+    kernel \
+    dhcp-client \
+    /usr/bin/qemu-kvm \
+    e2fsprogs \
+    $NULL
+
+./configure
+
+NCPU=$(getconf _NPROCESSORS_ONLN)
+
+make -j$NCPU all syncheck rpm
+
+cd test
+
+time sudo make -j$((NCPU/2+1)) \
+     KVERSION=$(rpm -qa kernel --qf '%{VERSION}-%{RELEASE}.%{ARCH}\n' | sort -rn | head -1) \
+     TEST_RUN_ID=$RUN_ID \
+     -k V=2 \
+     SKIP="14 16" \
+     check