Skip to content

Commit

Permalink
Merge pull request #4704 from nextcloud/updateContinuousIntegrationIm…
Browse files Browse the repository at this point in the history
…ages

switch to using the main client CI image based on ubuntu 22.04
  • Loading branch information
claucambra authored Aug 2, 2022
2 parents 9a84edf + 81ff861 commit 84f6d62
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 27 deletions.
22 changes: 11 additions & 11 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@ name: qt-5.15

steps:
- name: cmake
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- cmake -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src
- cmake -G Ninja -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 ../src
- name: compile
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- make -j$(nproc)
- ninja
- name: test
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8
volumes:
- name: build
path: /drone/build
Expand Down Expand Up @@ -47,23 +47,23 @@ name: qt-5.15-clang

steps:
- name: cmake
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror ../src
- cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DCMAKE_BUILD_TYPE=Debug -DQUICK_COMPILER=ON -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DECM_ENABLE_SANITIZERS=address -DCMAKE_CXX_FLAGS=-Werror -DOPENSSL_ROOT_DIR=/usr/local/lib64 ../src
- name: compile
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8
volumes:
- name: build
path: /drone/build
commands:
- cd /drone/build
- ninja
- name: test
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8
volumes:
- name: build
path: /drone/build
Expand All @@ -73,7 +73,7 @@ steps:
- chown -R test:test .
- su -c 'ASAN_OPTIONS=detect_leaks=0 xvfb-run ctest --output-on-failure' test
- name: clang-tidy
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
image: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8
volumes:
- name: build
path: /drone/build
Expand All @@ -98,7 +98,7 @@ name: AppImage

steps:
- name: build
image: ghcr.io/nextcloud/continuous-integration-client-appimage:client-appimage-3
image: ghcr.io/nextcloud/continuous-integration-client-appimage:client-appimage-4
environment:
CI_UPLOAD_GIT_TOKEN:
from_secret: CI_UPLOAD_GIT_TOKEN
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
container: ghcr.io/nextcloud/continuous-integration-client:client-5.15-4
container: ghcr.io/nextcloud/continuous-integration-client:client-5.15-8
env:
SONAR_SERVER_URL: "https://sonarcloud.io"
BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed
Expand All @@ -28,8 +28,8 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DBUILD_COVERAGE=ON
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} make -j 2
cmake .. -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DBUILD_UPDATER=ON -DBUILD_TESTING=1 -DBUILD_COVERAGE=ON -DOPENSSL_ROOT_DIR=/usr/local/lib64
build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ninja
- name: Run tests
run: |
cd build
Expand Down
4 changes: 2 additions & 2 deletions admin/linux/build-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ cp ./usr/share/icons/hicolor/512x512/apps/*.png . # Workaround for linuxeployqt
# Because distros need to get their shit together
cp -R /usr/lib/x86_64-linux-gnu/libssl.so* ./usr/lib/
cp -R /usr/lib/x86_64-linux-gnu/libcrypto.so* ./usr/lib/
cp -P /usr/local/lib/libssl.so* ./usr/lib/
cp -P /usr/local/lib/libcrypto.so* ./usr/lib/
cp -P /usr/local/lib*/libssl.so* ./usr/lib/
cp -P /usr/local/lib*/libcrypto.so* ./usr/lib/

# NSS fun
cp -P -r /usr/lib/x86_64-linux-gnu/nss ./usr/lib/
Expand Down
1 change: 1 addition & 0 deletions src/gui/creds/webflowcredentials.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ void WebFlowCredentials::askFromUser() {
#ifdef WITH_WEBENGINE
bool useFlow2 = (type != DetermineAuthTypeJob::WebViewFlow);
#else // WITH_WEBENGINE
Q_UNUSED(type)
bool useFlow2 = true;
#endif // WITH_WEBENGINE

Expand Down
3 changes: 0 additions & 3 deletions src/gui/sharelinkwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,10 @@ ShareLinkWidget::ShareLinkWidget(AccountPtr account,

_ui->errorLabel->hide();

auto sharingPossible = true;
if (!_account->capabilities().sharePublicLink()) {
qCWarning(lcShareLink) << "Link shares have been disabled";
sharingPossible = false;
} else if (!(maxSharingPermissions & SharePermissionShare)) {
qCWarning(lcShareLink) << "The file can not be shared because it was shared without sharing permission.";
sharingPossible = false;
}

_ui->enableShareLink->setChecked(false);
Expand Down
8 changes: 0 additions & 8 deletions src/libsync/clientsideencryption.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,6 @@ bool EncryptionHelper::fileEncryption(const QByteArray &key, const QByteArray &i

QByteArray out(blockSize + OCC::Constants::e2EeTagSize - 1, '\0');
int len = 0;
int total_len = 0;

qCDebug(lcCse) << "Starting to encrypt the file" << input->fileName() << input->atEnd();
while(!input->atEnd()) {
Expand All @@ -1673,15 +1672,13 @@ bool EncryptionHelper::fileEncryption(const QByteArray &key, const QByteArray &i
}

output->write(out, len);
total_len += len;
}

if(1 != EVP_EncryptFinal_ex(ctx, unsignedData(out), &len)) {
qCInfo(lcCse()) << "Could finalize encryption";
return false;
}
output->write(out, len);
total_len += len;

/* Get the e2EeTag */
QByteArray e2EeTag(OCC::Constants::e2EeTagSize, '\0');
Expand Down Expand Up @@ -1865,7 +1862,6 @@ QByteArray EncryptionHelper::StreamingDecryptor::chunkDecryption(const char *inp
return QByteArray();
}

qint64 bytesWritten = 0;
qint64 inputPos = 0;

QByteArray decryptedBlock(blockSize + OCC::Constants::e2EeTagSize - 1, '\0');
Expand Down Expand Up @@ -1894,8 +1890,6 @@ QByteArray EncryptionHelper::StreamingDecryptor::chunkDecryption(const char *inp
return QByteArray();
}

bytesWritten += writtenToOutput;

// advance input position for further read
inputPos += encryptedBlock.size();

Expand Down Expand Up @@ -1934,8 +1928,6 @@ QByteArray EncryptionHelper::StreamingDecryptor::chunkDecryption(const char *inp
return QByteArray();
}

bytesWritten += writtenToOutput;

_decryptedSoFar += OCC::Constants::e2EeTagSize;

_isFinished = true;
Expand Down

0 comments on commit 84f6d62

Please sign in to comment.