mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 22:42:53 +00:00
Travis CI: enable Ubuntu 16.04 and Fedora 26 testing
Enable compilation test for Fedora 26 and Ubuntu 16.04. The tests will run for all combinations of RELEASE={0|1} and PLATFORM={sbl|uefi} Signed-off-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com>
This commit is contained in:
parent
b8b2d037c3
commit
465ce972a2
@ -1,29 +0,0 @@
|
|||||||
BSD 3-Clause License
|
|
||||||
|
|
||||||
Copyright (c) 2018, Geoffroy Van Cutsem
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this
|
|
||||||
list of conditions and the following disclaimer.
|
|
||||||
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
|
|
||||||
* Neither the name of the copyright holder nor the names of its
|
|
||||||
contributors may be used to endorse or promote products derived from
|
|
||||||
this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
||||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
||||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
||||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
||||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
||||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
||||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
This repository contains a number of Dockerfile that include
|
This folder contains a number of Dockerfile that include
|
||||||
all the build tools and dependencies to build the ACRN Project
|
all the build tools and dependencies to build the ACRN Project
|
||||||
components, i.e. the `acrn-hypervisor` and `acrn-devicemodel`
|
components, i.e. the `acrn-hypervisor` and `acrn-devicemodel`
|
||||||
|
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
DOCKER_BIN=`which docker`
|
|
||||||
|
|
||||||
function usage {
|
|
||||||
echo "Usage: $0 <path-to-acrn>"
|
|
||||||
echo " Where <path-to-acrn> is the path to where you"
|
|
||||||
echo " have cloned the acrn repositories"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ $# -eq 0 ];
|
|
||||||
then
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
build_container () {
|
|
||||||
var=$(sudo $DOCKER_BIN images --format '{{.Tag}}' | grep -c $distro)
|
|
||||||
echo $var
|
|
||||||
if [ $(sudo $DOCKER_BIN images --format '{{.Repository}}' | grep -c $distro) == '0' ];
|
|
||||||
then
|
|
||||||
echo There is no build container for $distro yet.
|
|
||||||
echo Creating a build container for $distro... please be patient!
|
|
||||||
$DOCKER_BIN build -t $distro -f Dockerfile.$distro .
|
|
||||||
else
|
|
||||||
echo We already have a build container for $distro, attempting to use it...
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
for distro in `ls Dockerfile.*`; do
|
|
||||||
# Extract the name of the Linux distro. It assumes the Dockerfile name is built as "Dockerfile.<distro>"
|
|
||||||
distro=${distro:11}
|
|
||||||
build_container
|
|
||||||
echo "Testing Linux distribion: $distro"
|
|
||||||
$DOCKER_BIN run -v $1:/root/acrn:z $distro make
|
|
||||||
done
|
|
||||||
|
|
12
.travis.yml
12
.travis.yml
@ -4,7 +4,9 @@ language: c
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- OS_TESTED="clearlinux"
|
- OS_TESTED_CL="clearlinux"
|
||||||
|
- OS_TESTED_UBUNTU="ubuntu16.04"
|
||||||
|
- OS_TESTED_FEDORA="fedora26"
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- RELEASE=0
|
- RELEASE=0
|
||||||
@ -23,10 +25,14 @@ services:
|
|||||||
- docker
|
- docker
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- docker build -t ${OS_TESTED} -f .travis-dockerfiles/Dockerfile.${OS_TESTED} .
|
- docker build -t ${OS_TESTED_CL} -f .travis-dockerfiles/Dockerfile.${OS_TESTED_CL} .
|
||||||
|
- docker build -t ${OS_TESTED_UBUNTU} -f .travis-dockerfiles/Dockerfile.${OS_TESTED_UBUNTU} .
|
||||||
|
- docker build -t ${OS_TESTED_FEDORA} -f .travis-dockerfiles/Dockerfile.${OS_TESTED_FEDORA} .
|
||||||
- docker images
|
- docker images
|
||||||
|
|
||||||
install: true
|
install: true
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- docker run -v $PWD:/root/acrn ${OS_TESTED} /bin/bash -c "make clean && make PLATFORM=$PLATFORM RELEASE=$RELEASE"
|
- docker run -v $PWD:/root/acrn ${OS_TESTED_CL} /bin/bash -c "make clean && make PLATFORM=$PLATFORM RELEASE=$RELEASE"
|
||||||
|
- docker run -v $PWD:/root/acrn ${OS_TESTED_UBUNTU} /bin/bash -c "make clean && make PLATFORM=$PLATFORM RELEASE=$RELEASE"
|
||||||
|
- docker run -v $PWD:/root/acrn ${OS_TESTED_FEDORA} /bin/bash -c "make clean && make PLATFORM=$PLATFORM RELEASE=$RELEASE"
|
||||||
|
Loading…
Reference in New Issue
Block a user