-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Right now, this is just a basic compilation+unit tests test, but it's a starting point for more thorough tests. Signed-off-by: Stephen Gallagher <[email protected]>
- Loading branch information
1 parent
9422de2
commit 92fe409
Showing
5 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM @IMAGE@ | ||
|
||
MAINTAINER Stephen Gallagher <[email protected]> | ||
|
||
ARG TARBALL | ||
|
||
RUN yum -y install epel-release \ | ||
&& yum -y install \ | ||
clang \ | ||
createrepo_c \ | ||
curl \ | ||
elinks \ | ||
gcc \ | ||
gcc-c++ \ | ||
git-core \ | ||
glib2-devel \ | ||
gobject-introspection-devel \ | ||
gtk-doc \ | ||
libyaml-devel \ | ||
meson \ | ||
ninja-build \ | ||
openssl \ | ||
pkgconfig \ | ||
popt-devel \ | ||
python34-devel \ | ||
python34-gobject-base \ | ||
python3-rpm-macros \ | ||
redhat-rpm-config \ | ||
rpm-build \ | ||
rpmdevtools \ | ||
ruby \ | ||
"rubygem(json)" \ | ||
rubygems \ | ||
sudo \ | ||
wget \ | ||
&& yum -y clean all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM fedora-modularity/libmodulemd-deps-@RELEASE@ | ||
|
||
MAINTAINER Stephen Gallagher <[email protected]> | ||
|
||
ARG TARBALL | ||
|
||
ADD $TARBALL /builddir/ | ||
|
||
ENTRYPOINT /builddir/.travis/centos/travis-tasks.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
|
||
#Exit on failures | ||
set -e | ||
|
||
set -x | ||
|
||
JOB_NAME=${TRAVIS_JOB_NAME:-CentOS 7} | ||
|
||
arr=($JOB_NAME) | ||
os_name=${arr[0]:-CentOS} | ||
release=${arr[1]:-7} | ||
|
||
# CentOS 7 doesn't have autopep8, so we'll drop the requirement for it | ||
# This implementation will still allow it to occur if autopep8 still shows | ||
# up later. | ||
COMMON_MESON_ARGS="-Dtest_dirty_git=false -Ddeveloper_build=false -Dpython_name=python3.4" | ||
|
||
pushd /builddir/ | ||
|
||
# Build the v1 and v2 code under GCC and run standard tests | ||
meson --buildtype=debug \ | ||
-Dbuild_api_v1=true \ | ||
-Dbuild_api_v2=true \ | ||
$COMMON_MESON_ARGS \ | ||
travis | ||
|
||
set +e | ||
ninja-build -C travis test | ||
if [ $? != 0 ]; then | ||
cat travis_v1/meson-logs/testlog.txt | ||
fi | ||
set -e | ||
|
||
popd #builddir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
pushd $SCRIPT_DIR | ||
|
||
set -e | ||
set -x | ||
|
||
JOB_NAME=${TRAVIS_JOB_NAME:-CentOS 7} | ||
|
||
arr=($JOB_NAME) | ||
os_name=${arr[0]:-CentOS} | ||
release=${arr[1]:-7} | ||
|
||
# Create an archive of the current checkout | ||
TARBALL_PATH=`mktemp -p $SCRIPT_DIR tarball-XXXXXX.tar.bz2` | ||
TARBALL=`basename $TARBALL_PATH` | ||
|
||
pushd $SCRIPT_DIR/.. | ||
git ls-files |xargs tar cfj $TARBALL_PATH .git | ||
popd | ||
|
||
repository="registry.centos.org" | ||
os="centos" | ||
|
||
sed -e "s/@IMAGE@/$repository\/$os:$release/" \ | ||
$SCRIPT_DIR/centos/Dockerfile.deps.tmpl > $SCRIPT_DIR/centos/Dockerfile.deps.$release | ||
sed -e "s/@RELEASE@/$release/" $SCRIPT_DIR/centos/Dockerfile.tmpl > $SCRIPT_DIR/centos/Dockerfile-$release | ||
|
||
sudo docker build -f $SCRIPT_DIR/centos/Dockerfile.deps.$release -t fedora-modularity/libmodulemd-deps-$release . | ||
sudo docker build -f $SCRIPT_DIR/centos/Dockerfile-$release -t fedora-modularity/libmodulemd:$release --build-arg TARBALL=$TARBALL . | ||
|
||
if [ $release != "rawhide" ]; then | ||
# Only run Coverity scan on Rawhide since we have a limited number of scans per week. | ||
unset COVERITY_SCAN_TOKEN | ||
fi | ||
|
||
rm -f $TARBALL_PATH $SCRIPT_DIR/centos/Dockerfile.deps.$release $SCRIPT_DIR/centos/Dockerfile-$release | ||
|
||
docker run -e COVERITY_SCAN_TOKEN=$COVERITY_SCAN_TOKEN -e TRAVIS=$TRAVIS -eTRAVIS_JOB_NAME="$TRAVIS_JOB_NAME" --rm fedora-modularity/libmodulemd:$release | ||
|
||
popd | ||
exit 0 |