|
|
|
@ -13,8 +13,7 @@ env:
@@ -13,8 +13,7 @@ env:
|
|
|
|
|
LIBTORRENT_VERSION_TAG: v1.2.14 |
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
|
|
|
|
|
|
ci_ubuntu: |
|
|
|
|
ubuntu: |
|
|
|
|
name: Ubuntu |
|
|
|
|
|
|
|
|
|
strategy: |
|
|
|
@ -47,23 +46,31 @@ jobs:
@@ -47,23 +46,31 @@ jobs:
|
|
|
|
|
- name: install Qt 5.15.2 from an external PPA |
|
|
|
|
run: | |
|
|
|
|
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal |
|
|
|
|
sudo apt install qt515base qt515svg qt515tools |
|
|
|
|
sudo apt install \ |
|
|
|
|
qt515base qt515svg qt515tools |
|
|
|
|
|
|
|
|
|
- name: install libtorrent from source |
|
|
|
|
run: | |
|
|
|
|
git clone https://github.com/arvidn/libtorrent && cd libtorrent |
|
|
|
|
git clone https://github.com/arvidn/libtorrent |
|
|
|
|
cd libtorrent |
|
|
|
|
git checkout ${{ env.LIBTORRENT_VERSION_TAG }} |
|
|
|
|
cmake -B cmake-build-dir -G "Ninja" \ |
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
|
cmake \ |
|
|
|
|
-B build \ |
|
|
|
|
-G "Ninja" \ |
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ |
|
|
|
|
-Ddeprecated-functions=OFF \ |
|
|
|
|
--graphviz=cmake-build-dir/target_graph.dot |
|
|
|
|
cmake --build cmake-build-dir |
|
|
|
|
sudo cmake --install cmake-build-dir --prefix /usr/local |
|
|
|
|
cmake --build build |
|
|
|
|
sudo cmake --install build --prefix /usr/local |
|
|
|
|
|
|
|
|
|
- name: build qBittorrent |
|
|
|
|
run: | |
|
|
|
|
cmake -B build -G "Ninja" \ |
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
|
cmake \ |
|
|
|
|
-B build \ |
|
|
|
|
-G "Ninja" \ |
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ |
|
|
|
|
-D${{ matrix.qbt_gui }} \ |
|
|
|
|
-DVERBOSE_CONFIGURE=ON \ |
|
|
|
|
--graphviz=build/target_graph.dot |
|
|
|
@ -85,9 +92,8 @@ jobs:
@@ -85,9 +92,8 @@ jobs:
|
|
|
|
|
libtorrent/cmake-build-dir/compile_commands.json |
|
|
|
|
libtorrent/cmake-build-dir/target_graph.dot |
|
|
|
|
|
|
|
|
|
ci_windows: |
|
|
|
|
windows: |
|
|
|
|
name: Windows + vcpkg |
|
|
|
|
|
|
|
|
|
runs-on: windows-2019 |
|
|
|
|
|
|
|
|
|
defaults: |
|
|
|
@ -113,10 +119,15 @@ jobs:
@@ -113,10 +119,15 @@ jobs:
|
|
|
|
|
# Tell vcpkg to only build Release variants of the dependencies |
|
|
|
|
- name: configure vcpkg triplet overlay for release builds only |
|
|
|
|
run: | |
|
|
|
|
New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory |
|
|
|
|
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake ` |
|
|
|
|
New-Item ` |
|
|
|
|
-Path ${{ github.workspace }} ` |
|
|
|
|
-Name "triplets_overlay" ` |
|
|
|
|
-ItemType Directory |
|
|
|
|
Copy-Item ` |
|
|
|
|
${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake ` |
|
|
|
|
${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake |
|
|
|
|
Add-Content ${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake ` |
|
|
|
|
Add-Content ` |
|
|
|
|
${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake ` |
|
|
|
|
-Value "set(VCPKG_BUILD_TYPE release)" |
|
|
|
|
|
|
|
|
|
# clear buildtrees after each package installation to reduce disk space requirements |
|
|
|
@ -130,8 +141,8 @@ jobs:
@@ -130,8 +141,8 @@ jobs:
|
|
|
|
|
"qt5-tools:x64-windows-static-release", |
|
|
|
|
"qt5-winextras:x64-windows-static-release" |
|
|
|
|
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade ` |
|
|
|
|
--overlay-triplets=${{ github.workspace }}/triplets_overlay ` |
|
|
|
|
--no-dry-run |
|
|
|
|
--overlay-triplets=${{ github.workspace }}/triplets_overlay ` |
|
|
|
|
--no-dry-run |
|
|
|
|
foreach($package in $packages) |
|
|
|
|
{ |
|
|
|
|
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install $package ` |
|
|
|
@ -146,8 +157,11 @@ jobs:
@@ -146,8 +157,11 @@ jobs:
|
|
|
|
|
- name: build qBittorrent |
|
|
|
|
shell: cmd |
|
|
|
|
run: | |
|
|
|
|
cmake -B build -G "Ninja" ^ |
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ^ |
|
|
|
|
cmake ^ |
|
|
|
|
-B build ^ |
|
|
|
|
-G "Ninja" ^ |
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo ^ |
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON ^ |
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_WIN }}\scripts\buildsystems\vcpkg.cmake ^ |
|
|
|
|
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release ^ |
|
|
|
|
-DVERBOSE_CONFIGURE=ON ^ |
|
|
|
@ -166,16 +180,15 @@ jobs:
@@ -166,16 +180,15 @@ jobs:
|
|
|
|
|
build/qbittorrent.pdb |
|
|
|
|
dist/windows/qt.conf |
|
|
|
|
|
|
|
|
|
ci_macos: |
|
|
|
|
macos: |
|
|
|
|
name: macOS + vcpkg |
|
|
|
|
runs-on: macos-10.15 |
|
|
|
|
|
|
|
|
|
strategy: |
|
|
|
|
matrix: |
|
|
|
|
qbt_gui: ["GUI=ON", "GUI=OFF"] |
|
|
|
|
fail-fast: false |
|
|
|
|
|
|
|
|
|
runs-on: macos-10.15 |
|
|
|
|
|
|
|
|
|
defaults: |
|
|
|
|
run: |
|
|
|
|
shell: pwsh |
|
|
|
@ -200,17 +213,23 @@ jobs:
@@ -200,17 +213,23 @@ jobs:
|
|
|
|
|
|
|
|
|
|
- name: configure vcpkg triplet overlay for release builds only |
|
|
|
|
run: | |
|
|
|
|
New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory |
|
|
|
|
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake ` |
|
|
|
|
New-Item ` |
|
|
|
|
-Path ${{ github.workspace }} ` |
|
|
|
|
-Name "triplets_overlay" ` |
|
|
|
|
-ItemType Directory |
|
|
|
|
Copy-Item ` |
|
|
|
|
${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake ` |
|
|
|
|
${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake |
|
|
|
|
Add-Content ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake ` |
|
|
|
|
Add-Content ` |
|
|
|
|
${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake ` |
|
|
|
|
-Value "set(VCPKG_BUILD_TYPE release)","set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)" |
|
|
|
|
|
|
|
|
|
# NOTE: Avoids a libtorrent ABI issue. See https://github.com/arvidn/libtorrent/issues/4965 |
|
|
|
|
- name: force AppleClang to compile libtorrent with the same C++ standard as qBittorrent |
|
|
|
|
run: | |
|
|
|
|
(Get-Content -path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( ` |
|
|
|
|
'${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=17') ` |
|
|
|
|
(Get-Content ` |
|
|
|
|
-path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( ` |
|
|
|
|
'${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=17') ` |
|
|
|
|
| Set-Content -Path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake |
|
|
|
|
|
|
|
|
|
- name: install dependencies via vcpkg |
|
|
|
@ -223,8 +242,8 @@ jobs:
@@ -223,8 +242,8 @@ jobs:
|
|
|
|
|
"qt5-tools:x64-osx-release", |
|
|
|
|
"qt5-macextras:x64-osx-release" |
|
|
|
|
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg upgrade ` |
|
|
|
|
--overlay-triplets=${{ github.workspace }}/triplets_overlay ` |
|
|
|
|
--no-dry-run |
|
|
|
|
--overlay-triplets=${{ github.workspace }}/triplets_overlay ` |
|
|
|
|
--no-dry-run |
|
|
|
|
foreach($package in $packages) |
|
|
|
|
{ |
|
|
|
|
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg install $package ` |
|
|
|
@ -235,7 +254,11 @@ jobs:
@@ -235,7 +254,11 @@ jobs:
|
|
|
|
|
- name: build qBittorrent |
|
|
|
|
shell: bash |
|
|
|
|
run: | |
|
|
|
|
cmake -B build -G "Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
|
cmake \ |
|
|
|
|
-B build \ |
|
|
|
|
-G "Ninja" \ |
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ |
|
|
|
|
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_MACOS }}/scripts/buildsystems/vcpkg.cmake \ |
|
|
|
|
-DVCPKG_TARGET_TRIPLET=x64-osx-release \ |
|
|
|
|
-D${{ matrix.qbt_gui }} \ |
|
|
|
|