CI: Replace Jenkins-oriented scripts with Travis-oriented ones
This commit is contained in:
parent
ebb0331672
commit
99858242fb
@ -1,44 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Make sure we can make git operations from the Calamares Docker+Jenkins environment.
|
|
||||||
cp ~/jenkins-master/.gitconfig ~
|
|
||||||
cp -R ~/jenkins-master/.ssh ~
|
|
||||||
|
|
||||||
cd "$WORKSPACE"
|
|
||||||
git config --global http.sslVerify false
|
|
||||||
|
|
||||||
rm -Rf "$WORKSPACE/prefix"
|
|
||||||
mkdir "$WORKSPACE/prefix"
|
|
||||||
|
|
||||||
git clone git://anongit.kde.org/kpmcore "$WORKSPACE/kpmcore"
|
|
||||||
cd "$WORKSPACE/kpmcore"
|
|
||||||
mkdir "$WORKSPACE/kpmcore/build"
|
|
||||||
cd "$WORKSPACE/kpmcore/build"
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr ..
|
|
||||||
nice -n 18 make -j2
|
|
||||||
make DESTDIR="$WORKSPACE/prefix" install
|
|
||||||
|
|
||||||
cd "$WORKSPACE"
|
|
||||||
|
|
||||||
wget https://scan.coverity.com/download/cxx/linux64 --no-check-certificate \
|
|
||||||
--post-data "token=ll90T04noQ4cORJx_zczKA&project=calamares%2Fcalamares" \
|
|
||||||
-O coverity_tool.tar.gz
|
|
||||||
mkdir "$WORKSPACE/coveritytool"
|
|
||||||
tar xvf coverity_tool.tar.gz -C "$WORKSPACE/coveritytool" --strip-components 2
|
|
||||||
export PATH="$WORKSPACE/coveritytool/bin:$PATH"
|
|
||||||
|
|
||||||
rm -Rf "$WORKSPACE/build"
|
|
||||||
mkdir "$WORKSPACE/build"
|
|
||||||
cd "$WORKSPACE/build"
|
|
||||||
|
|
||||||
CMAKE_PREFIX_PATH="$WORKSPACE/prefix/usr" cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr -DWEBVIEW_FORCE_WEBKIT=1 ..
|
|
||||||
nice -n 18 cov-build --dir cov-int make -j2
|
|
||||||
|
|
||||||
tar caf calamares-ci.tar.xz cov-int
|
|
||||||
|
|
||||||
curl -k --form token=ll90T04noQ4cORJx_zczKA \
|
|
||||||
--form email=teo@kde.org \
|
|
||||||
--form file=@calamares-ci.tar.xz \
|
|
||||||
--form version="master-`date -u +%Y%m%d`" \
|
|
||||||
--form description="master on `date -u`" \
|
|
||||||
https://scan.coverity.com/builds?project=calamares%2Fcalamares
|
|
@ -1,30 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
#Hack for Coverity build, so the compiler doesn't complain about InheritanceChecker
|
|
||||||
sudo cp ~/jenkins-master/kpluginfactory.h /usr/include/KF5/KCoreAddons
|
|
||||||
|
|
||||||
cd "$WORKSPACE"
|
|
||||||
wget https://scan.coverity.com/download/cxx/linux64 --no-check-certificate \
|
|
||||||
--post-data "token=cyOjQZx5EOFLdhfo7ZDa4Q&project=KDE+Partition+Manager+Core+Library+-+KPMcore" \
|
|
||||||
-O coverity_tool.tar.gz
|
|
||||||
mkdir "$WORKSPACE/coveritytool"
|
|
||||||
tar xvf coverity_tool.tar.gz -C "$WORKSPACE/coveritytool" --strip-components 2
|
|
||||||
export PATH="$WORKSPACE/coveritytool/bin:$PATH"
|
|
||||||
|
|
||||||
rm -Rf "$WORKSPACE/build"
|
|
||||||
mkdir "$WORKSPACE/build"
|
|
||||||
cd "$WORKSPACE/build"
|
|
||||||
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr ..
|
|
||||||
nice -n 18 cov-build --dir cov-int make -j2
|
|
||||||
|
|
||||||
tar cavf kpmcore-ci.tar.xz cov-int
|
|
||||||
|
|
||||||
cat cov-int/build-log.txt
|
|
||||||
|
|
||||||
curl -k --form token=cyOjQZx5EOFLdhfo7ZDa4Q \
|
|
||||||
--form email=teo@kde.org \
|
|
||||||
--form file=@kpmcore-ci.tar.xz \
|
|
||||||
--form version="master-`date -u +%Y%m%d`" \
|
|
||||||
--form description="master on `date -u`" \
|
|
||||||
https://scan.coverity.com/builds?project=KDE+Partition+Manager+Core+Library+-+KPMcore
|
|
15
ci/travis-continuous.sh
Executable file
15
ci/travis-continuous.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Travis CI script for use on every-commit:
|
||||||
|
# - build and install Calamares
|
||||||
|
#
|
||||||
|
test -n "$BUILDDIR" || exit 1
|
||||||
|
test -n "$SRCDIR" || exit 1
|
||||||
|
|
||||||
|
test -d $BUILDDIR || exit 1
|
||||||
|
test -d $SRCDIR || exit 1
|
||||||
|
test -f $SRCDIR/CMakeLists.txt || exit 1
|
||||||
|
|
||||||
|
cd $BUILDDIR || exit 1
|
||||||
|
|
||||||
|
cmake -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON $SRCDIR && make -j2 && make install DESTDIR=/build/INSTALL_ROOT
|
34
ci/travis-coverity.sh
Executable file
34
ci/travis-coverity.sh
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Travis CI script for weekly (cron) use:
|
||||||
|
# - use the coverity tool to build and and upload results
|
||||||
|
#
|
||||||
|
test -n "$COVERITY_SCAN_TOKEN" || exit 1
|
||||||
|
test -n "$BUILDDIR" || exit 1
|
||||||
|
test -n "$SRCDIR" || exit 1
|
||||||
|
|
||||||
|
test -d $BUILDDIR || exit 1
|
||||||
|
test -d $SRCDIR || exit 1
|
||||||
|
test -f $SRCDIR/CMakeLists.txt || exit 1
|
||||||
|
|
||||||
|
cd $BUILDDIR || exit 1
|
||||||
|
|
||||||
|
curl -k -o coverity_tool.tar.gz \
|
||||||
|
-d "token=$COVERITY_SCAN_TOKEN&project=calamares%2Fcalamares" \
|
||||||
|
https://scan.coverity.com/download/cxx/linux64 || exit 1
|
||||||
|
mkdir "$BUILDDIR/coveritytool"
|
||||||
|
tar xvf coverity_tool.tar.gz -C "$BUILDDIR/coveritytool" --strip-components 2
|
||||||
|
export PATH="$BUILDDIR/coveritytool/bin:$PATH"
|
||||||
|
|
||||||
|
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Debug -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON $SRCDIR || exit 1
|
||||||
|
cov-build --dir cov-int make -j2
|
||||||
|
|
||||||
|
tar caf calamares-ci.tar.xz cov-int
|
||||||
|
|
||||||
|
curl -k --form token=$COVERITY_SCAN_TOKEN \
|
||||||
|
--form email=groot@kde.org \
|
||||||
|
--form file=@calamares-ci.tar.xz \
|
||||||
|
--form version="master-`date -u +%Y%m%d`" \
|
||||||
|
--form description="master on `date -u`" \
|
||||||
|
https://scan.coverity.com/builds?project=calamares%2Fcalamares
|
19
ci/travis.sh
Executable file
19
ci/travis.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
#
|
||||||
|
# Travis build driver script:
|
||||||
|
# - the regular CI runs, triggered by commits, run a script that builds
|
||||||
|
# and installs calamares, and then runs the tests.
|
||||||
|
# - the cronjob CI runs, triggered weekly, run a script that uses the
|
||||||
|
# coverity tools to submit a build. This is slightly more resource-
|
||||||
|
# intensive than the coverity add-on, but works on master.
|
||||||
|
#
|
||||||
|
D=`dirname "$0"`
|
||||||
|
test -d "$D" || exit 1
|
||||||
|
test -x "$D/travis-continuous.sh" || exit 1
|
||||||
|
test -x "$D/travis-coverity.sh" || exit 1
|
||||||
|
|
||||||
|
if test "$TRAVIS_EVENT_TYPE" = "cron" ; then
|
||||||
|
exec "$D/travis-coverity.sh"
|
||||||
|
else
|
||||||
|
exec "$D/travis-continuous.sh"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user