From da4f2c24398338942b23a7844f97d6ec9dc22c7c Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 8 Aug 2023 23:31:56 +0800 Subject: [PATCH 1/3] GHA CI: install boost from upstream --- .github/workflows/ci_ubuntu.yaml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index 19bd0da25..f98ccb50e 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -22,6 +22,9 @@ jobs: qbt_gui: ["GUI=ON", "GUI=OFF"] qt_version: ["6.5.2"] + env: + boost_path: "${{ github.workspace }}/../boost" + steps: - name: Checkout repository uses: actions/checkout@v3 @@ -30,8 +33,8 @@ jobs: run: | sudo apt update sudo apt install \ - build-essential cmake ninja-build pkg-config \ - libboost-dev libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev + build-essential cmake ninja-build \ + libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev - name: Setup ccache uses: Chocobo1/setup-ccache-action@v1 @@ -40,6 +43,15 @@ jobs: ccache_options: | max_size=2G + - name: Install boost + run: | + curl \ + -L \ + -o "${{ runner.temp }}/boost.tar.bz2" \ + "https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.bz2" + tar -xf "${{ runner.temp }}/boost.tar.bz2" -C "${{ github.workspace }}/.." + mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}" + - name: Install Qt uses: jurplel/install-qt-action@v3 with: @@ -60,6 +72,7 @@ jobs: -DBUILD_SHARED_LIBS=OFF \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DBOOST_ROOT="${{ env.boost_path }}" \ -Ddeprecated-functions=OFF cmake --build build sudo cmake --install build @@ -82,6 +95,7 @@ jobs: -G "Ninja" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ + -DBOOST_ROOT="${{ env.boost_path }}" \ -DCMAKE_INSTALL_PREFIX="/usr" \ -DTESTING=ON \ -DVERBOSE_CONFIGURE=ON \ From 180e708f3c80b4a378b776e68cee58991badfe5e Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 8 Aug 2023 23:33:02 +0800 Subject: [PATCH 2/3] Bump boost requirement to 1.76 std::hash specialisations for boost::asio structures is required. --- CMakeLists.txt | 2 +- INSTALL | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8a233c02..659789580 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ project(qBittorrent ) # version requirements - older versions may work, but you are on your own -set(minBoostVersion 1.71) +set(minBoostVersion 1.76) set(minQt6Version 6.5.0) set(minOpenSSLVersion 1.1.1) set(minLibtorrent1Version 1.2.19) diff --git a/INSTALL b/INSTALL index 1b4f73e95..89caa8ef4 100644 --- a/INSTALL +++ b/INSTALL @@ -3,7 +3,7 @@ qBittorrent - A BitTorrent client in C++ / Qt 1) Install these dependencies: - - Boost >= 1.71 + - Boost >= 1.76 - libtorrent-rasterbar 1.2.19 - 1.2.x || 2.0.9 - 2.0.x * By Arvid Norberg, https://www.libtorrent.org/ From 4d98761e9949e7412c6006f31461b70e0af9ad30 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 8 Aug 2023 23:46:30 +0800 Subject: [PATCH 3/3] GHA CI: remove redundant conditionals --- .github/workflows/ci_macos.yaml | 3 +-- .github/workflows/ci_ubuntu.yaml | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_macos.yaml b/.github/workflows/ci_macos.yaml index 20d9f550f..b4d27a17e 100644 --- a/.github/workflows/ci_macos.yaml +++ b/.github/workflows/ci_macos.yaml @@ -85,8 +85,7 @@ jobs: cmake --build build sudo cmake --install build - - name: Build qBittorrent (Qt6) - if: startsWith(matrix.qt_version, 6) + - name: Build qBittorrent run: | CXXFLAGS="$CXXFLAGS -Wno-gnu-zero-variadic-macro-arguments -Werror -Wno-error=deprecated-declarations" \ LDFLAGS="$LDFLAGS -gz" \ diff --git a/.github/workflows/ci_ubuntu.yaml b/.github/workflows/ci_ubuntu.yaml index f98ccb50e..826f85d06 100644 --- a/.github/workflows/ci_ubuntu.yaml +++ b/.github/workflows/ci_ubuntu.yaml @@ -80,13 +80,12 @@ jobs: # to avoid scanning 3rdparty codebases, initialize it just before building qbt - name: Initialize CodeQL uses: github/codeql-action/init@v2 - if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') && startsWith(matrix.qt_version, 6) + if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') with: config-file: ./.github/workflows/helper/codeql/cpp.yaml languages: cpp - - name: Build qBittorrent (Qt6) - if: startsWith(matrix.qt_version, 6) + - name: Build qBittorrent run: | CXXFLAGS="$CXXFLAGS -Werror" \ LDFLAGS="$LDFLAGS -gz" \ @@ -107,7 +106,7 @@ jobs: - name: Run CodeQL analysis uses: github/codeql-action/analyze@v2 - if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') && startsWith(matrix.qt_version, 6) + if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') with: category: ${{ github.base_ref || github.ref_name }}