Merge pull request #6299 from dschmidt/linux-docker-ci

Use docker for Linux CI
This commit is contained in:
Dominik Schmidt 2018-01-13 13:46:04 +01:00 committed by GitHub
commit f326bf371d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 51 additions and 31 deletions

80
Jenkinsfile vendored
View file

@ -6,46 +6,66 @@
// all possible error combinations.
// See also the top comment in syncenginetestutils.h
//
// We are building "Linux - GCC" with "make" and "Linux - Clang" with ninja,
// the combinations are more or less arbitrarily chosen. We just want to
// check that both compilers and both CMake generators work. It's
// unlikely that a specific generator only breaks with a specific
// compiler.
def linux = docker.image('dominikschmidt/owncloud-client-ci-image:latest')
def win32 = docker.image('guruz/docker-owncloud-client-win32:latest')
node('CLIENT') {
stage 'Checkout'
checkout scm
sh '''git submodule update --init'''
stage 'Qt5'
sh '''rm -rf build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 -DWITH_TESTING=1 -DCMAKE_PREFIX_PATH=/var/lib/jenkins/qt/5.6.2 ..
make -j4
ctest -V --output-on-failure'''
stage 'Linux - Pull Docker Image'
linux.pull()
stage 'Qt5 - clang'
sh '''rm -rf build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE="Debug" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUNIT_TESTING=1 -DWITH_TESTING=1 -DCMAKE_PREFIX_PATH=/var/lib/jenkins/qt/5.6.2 ..
make -j4
ctest -V --output-on-failure'''
stage 'Linux - GCC'
linux.inside {
sh '''
export HOME="$(pwd)/home"
rm -rf build home
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 ..
make -j4
LC_ALL=C.UTF-8 ctest -V --output-on-failure
'''
}
stage 'Linux - Clang'
linux.inside {
sh '''
export HOME="$(pwd)/home"
rm -rf build home
mkdir build
cd build
cmake -GNinja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE="Debug" -DUNIT_TESTING=1 ..
ninja -j4
LC_ALL=C.UTF-8 ctest -V --output-on-failure
'''
}
stage 'Win32 - Pull Docker Image'
win32.pull()
stage 'Win32'
def win32 = docker.image('guruz/docker-owncloud-client-win32:latest')
win32.pull() // make sure we have the latest available from Docker Hub
win32.inside {
sh '''
rm -rf build-win32
mkdir build-win32
cd build-win32
../admin/win/download_runtimes.sh
cmake .. -DCMAKE_TOOLCHAIN_FILE=../admin/win/Toolchain-mingw32-openSUSE.cmake -DWITH_CRASHREPORTER=ON
make -j4
make package
ctest .
'''
}
win32.inside {
sh '''
rm -rf build-win32
mkdir build-win32
cd build-win32
../admin/win/download_runtimes.sh
cmake .. -DCMAKE_TOOLCHAIN_FILE=../admin/win/Toolchain-mingw32-openSUSE.cmake -DWITH_CRASHREPORTER=ON
make -j4
make package
ctest .
'''
}
// Stage 'macOS' TODO
}

View file

@ -57,7 +57,7 @@ void setLaunchOnStartup_private(const QString &appName, const QString &guiName,
QString desktopFileLocation = userAutoStartPath + appName + QLatin1String(".desktop");
if (enable) {
if (!QDir().exists(userAutoStartPath) && !QDir().mkpath(userAutoStartPath)) {
qCWarning(lcUtility) << "Could not create autostart folder";
qCWarning(lcUtility) << "Could not create autostart folder" << userAutoStartPath;
return;
}
QFile iniFile(desktopFileLocation);