add travis build job

master
Harald Hoyer 2018-08-14 16:01:39 +02:00
parent 0f294d90b2
commit 3c1a083e5c
2 changed files with 70 additions and 0 deletions

15
.travis.yml Normal file
View File

@ -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-$$

55
fedora-test.sh Executable file
View File

@ -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