From 94e21ea2eae1cde38c9377072c426ade3675d587 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 30 Jun 2021 12:45:41 +0200 Subject: [PATCH] Add curl deps to CI --- .gitlab-ci.yml | 18 +++++++++++------- AppImageBuilder.yml | 3 +++ CMakeLists.txt | 4 ++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8c6111eb..379443fe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -27,20 +27,21 @@ build-gcc7: - update-alternatives --install /usr/bin/g++ g++ "/usr/bin/${CXX}" 10 - update-alternatives --set gcc "/usr/bin/${CC}" - update-alternatives --set g++ "/usr/bin/${CXX}" + - rm -rf ../.hunter && mv .hunter ../.hunter || true script: - export PATH="/usr/lib/ccache:${PATH}" - export CMAKE_BUILD_PARALLEL_LEVEL=$(cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l) - export PATH="/usr/local/bin/:${PATH}" - . "/opt/qt${QT_PKG}/bin/qt${QT_PKG}-env.sh" || true - - mkdir -p .deps/usr .hunter - - mkdir -p build - cmake -GNinja -H. -Bbuild -DCMAKE_INSTALL_PREFIX=.deps/usr - -DHUNTER_ROOT=".hunter" + -DHUNTER_ROOT="../.hunter" -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DUSE_BUNDLED_OPENSSL=ON -DUSE_BUNDLED_LMDB=OFF -DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release -DCI_BUILD=ON - cmake --build build + after_script: + - mv ../.hunter .hunter cache: key: "$CI_JOB_NAME" paths: @@ -55,13 +56,14 @@ build-macos: - brew reinstall --force python3 - brew bundle --file=./.ci/macos/Brewfile --force --cleanup - pip3 install dmgbuild + - rm -rf ../.hunter && mv .hunter ../.hunter || true script: - export PATH=/usr/local/opt/qt/bin/:${PATH} - export CMAKE_PREFIX_PATH=/usr/local/opt/qt5 - cmake -GNinja -H. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=.deps/usr - -DHUNTER_ROOT=".hunter" + -DHUNTER_ROOT="../.hunter" -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo -DUSE_BUNDLED_OPENSSL=ON @@ -69,6 +71,7 @@ build-macos: -DCI_BUILD=ON - cmake --build build after_script: + - mv ../.hunter .hunter - ./.ci/macos/deploy.sh - ./.ci/upload-nightly-gitlab.sh artifacts/nheko-${CI_COMMIT_SHORT_SHA}.dmg artifacts: @@ -164,7 +167,7 @@ appimage-amd64: # update appimage-builder (optional) - pip3 install --upgrade git+https://www.opencode.net/azubieta/appimagecraft.git - - apt-get install -y qt5-default qtdeclarative5-dev qttools5-dev qtscript5-dev qtquickcontrols2-5-dev qtmultimedia5-dev libqt5svg5-dev liblmdb-dev libssl-dev git ninja-build qt5keychain-dev libgtest-dev ccache + - apt-get install -y qt5-default qtdeclarative5-dev qttools5-dev qtscript5-dev qtquickcontrols2-5-dev qtmultimedia5-dev libqt5svg5-dev liblmdb-dev libssl-dev git ninja-build qt5keychain-dev libgtest-dev ccache libevent-pthreads-2.1-6 libcurl4-openssl-dev - wget https://github.com/Kitware/CMake/releases/download/v3.19.0/cmake-3.19.0-Linux-x86_64.sh && sh cmake-3.19.0-Linux-x86_64.sh --skip-license --prefix=/usr/local - /usr/sbin/update-ccache-symlinks script: @@ -174,7 +177,6 @@ appimage-amd64: -DHUNTER_ROOT=".hunter" -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF -DHUNTER_CONFIGURATION_TYPES=Release - -DUSE_BUNDLED_BOOST=ON -DUSE_BUNDLED_SPDLOG=ON -DUSE_BUNDLED_OLM=ON -DUSE_BUNDLED_GTEST=OFF @@ -184,8 +186,10 @@ appimage-amd64: -DUSE_BUNDLED_MTXCLIENT=ON -DUSE_BUNDLED_LMDB=OFF -DUSE_BUNDLED_LMDBXX=ON - -DUSE_BUNDLED_TWEENY=ON -DUSE_BUNDLED_QTKEYCHAIN=OFF + -DUSE_BUNDLED_LIBEVENT=OFF + -DUSE_BUNDLED_LIBCURL=OFF + -DUSE_BUNDLED_COEURL=ON - DESTDIR=`pwd`/AppDir ninja -C build install/local - DESTDIR=`pwd`/AppDir ninja -C build _deps/cmark-build/src/install - mkdir -p AppDir/usr/lib/x86_64-linux-gnu AppDir/lib/x86_64-linux-gnu diff --git a/AppImageBuilder.yml b/AppImageBuilder.yml index fab81da9..f83ce90a 100644 --- a/AppImageBuilder.yml +++ b/AppImageBuilder.yml @@ -38,8 +38,11 @@ AppDir: - kimageformat-plugins - libbs2b0 - libbz2-1.0 + - libcurl4 - libelf1 - libexpat1 + - libevent-core-2.1-6 + - libevent-pthreads-2.1-6 - libhogweed4 - libjpeg-turbo8 - libkf5archive5 diff --git a/CMakeLists.txt b/CMakeLists.txt index 667cf29e..e18b651b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,8 +18,8 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "compile as PIC by default") option(HUNTER_ENABLED "Enable Hunter package manager" OFF) include("cmake/HunterGate.cmake") HunterGate( - URL "https://github.com/cpp-pm/hunter/archive/v0.23.288.tar.gz" - SHA1 "6c9b2bc606d86ae31f96a62fc68f0a593024815b" + URL "https://github.com/cpp-pm/hunter/archive/v0.23.305.tar.gz" + SHA1 "fc8d7a6dac2fa23681847b3872d88d3839b657b0" ) option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." ${HUNTER_ENABLED})