Merge pull request #2247 from nextcloud/improve_drone_config

Improve drone config
This commit is contained in:
Kevin Ottens 2020-08-12 09:45:26 +02:00 committed by GitHub
commit ed1c2eaab4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 68 additions and 75 deletions

View file

@ -2,43 +2,37 @@ kind: pipeline
name: qt-5.12
steps:
- name: build and test
image: nextcloudci/client-5.12:client-5.12-9
- name: cmake
image: nextcloudci/client-5.12:client-5.12-10
volumes:
- name: build
path: /drone/build
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
export QT_BASE_DIR=/opt/qt5.12.9 &&
export QTDIR=\$QT_BASE_DIR &&
export PATH=\$QT_BASE_DIR/bin:\$PATH &&
export LD_LIBRARY_PATH=\$QT_BASE_DIR/lib/x86_64-linux-gnu:\$QT_BASE_DIR/lib:/usr/local/lib:\$LD_LIBRARY_PATH &&
export PKG_CONFIG_PATH=\$QT_BASE_DIR/lib/pkgconfig:\$PKG_CONFIG_PATH &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
export QT_BASE_DIR=/opt/qt5.12.9 &&
export QTDIR=\$QT_BASE_DIR &&
export PATH=\$QT_BASE_DIR/bin:\$PATH &&
export LD_LIBRARY_PATH=\$QT_BASE_DIR/lib/x86_64-linux-gnu:\$QT_BASE_DIR/lib:/usr/local/lib:\$LD_LIBRARY_PATH &&
export PKG_CONFIG_PATH=\$QT_BASE_DIR/lib/pkgconfig:\$PKG_CONFIG_PATH &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test"
- cd /drone/build
- cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DNO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../src
- name: compile
image: nextcloudci/client-5.12:client-5.12-10
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- make -j$(nproc)
- name: test
image: nextcloudci/client-5.12:client-5.12-10
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- useradd -m -s /bin/bash test
- chown -R test:test .
- su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test
volumes:
- name: build
temp: {}
trigger:
branch:
- master
@ -51,45 +45,44 @@ kind: pipeline
name: qt-5.12-clang
steps:
- name: build and test
image: nextcloudci/client-5.12:client-5.12-9
- name: cmake
image: nextcloudci/client-5.12:client-5.12-10
volumes:
- name: build
path: /drone/build
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
export QT_BASE_DIR=/opt/qt5.12.9 &&
export QTDIR=\$QT_BASE_DIR &&
export PATH=\$QT_BASE_DIR/bin:\$PATH &&
export LD_LIBRARY_PATH=\$QT_BASE_DIR/lib/x86_64-linux-gnu:\$QT_BASE_DIR/lib:/usr/local/lib:\$LD_LIBRARY_PATH &&
export PKG_CONFIG_PATH=\$QT_BASE_DIR/lib/pkgconfig:\$PKG_CONFIG_PATH &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
export QT_BASE_DIR=/opt/qt5.12.9 &&
export QTDIR=\$QT_BASE_DIR &&
export PATH=\$QT_BASE_DIR/bin:\$PATH &&
export LD_LIBRARY_PATH=\$QT_BASE_DIR/lib/x86_64-linux-gnu:\$QT_BASE_DIR/lib:/usr/local/lib:\$LD_LIBRARY_PATH &&
export PKG_CONFIG_PATH=\$QT_BASE_DIR/lib/pkgconfig:\$PKG_CONFIG_PATH &&
mkdir build &&
cd build &&
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DNO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test"
# Static analysis with clang-tidy
- "! run-clang-tidy-6.0 -p build -quiet | grep -A 5 ': error:'"
- cd /drone/build
- cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_BUILD_TYPE=Debug -DNO_SHIBBOLETH=1 -DBUILD_UPDATER=ON -DUNIT_TESTING=1 -DSANITIZE_ADDRESS=ON ../src
- name: compile
image: nextcloudci/client-5.12:client-5.12-10
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- ninja
- name: test
image: nextcloudci/client-5.12:client-5.12-10
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- useradd -m -s /bin/bash test
- chown -R test:test .
- su -c 'ASAN_OPTIONS=detect_leaks=0 ctest --output-on-failure' test
- name: clang-tidy
image: nextcloudci/client-5.12:client-5.12-10
volumes:
- name: build
path: /drone/build
commands:
- "! run-clang-tidy-10 -j$(nproc) -p /drone/build -header-filter $PWD -quiet | grep -A 5 ': error:'"
volumes:
- name: build
temp: {}
trigger:
branch:
- master

View file

@ -86,7 +86,7 @@ cp -P -r /usr/lib/x86_64-linux-gnu/nss ./usr/lib/
# Use linuxdeployqt to deploy
cd /build
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
wget --ca-directory=/etc/ssl/certs/ -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt*.AppImage
./linuxdeployqt-continuous-x86_64.AppImage --appimage-extract
rm ./linuxdeployqt-continuous-x86_64.AppImage