|
|
@ -1,4 +1,4 @@ |
|
|
|
name: GitHub Actions CI |
|
|
|
name: CI - Main |
|
|
|
|
|
|
|
|
|
|
|
# Cache is used for all Windows and macOS dependencies (size approx. 1230 * 2 + 1850 = 4310 MiB) |
|
|
|
# Cache is used for all Windows and macOS dependencies (size approx. 1230 * 2 + 1850 = 4310 MiB) |
|
|
|
# Cache is not used for Ubuntu builds, because it already has all dependencies except |
|
|
|
# Cache is not used for Ubuntu builds, because it already has all dependencies except |
|
|
@ -13,8 +13,7 @@ env: |
|
|
|
LIBTORRENT_VERSION_TAG: v1.2.14 |
|
|
|
LIBTORRENT_VERSION_TAG: v1.2.14 |
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
|
|
|
|
ubuntu: |
|
|
|
ci_ubuntu: |
|
|
|
|
|
|
|
name: Ubuntu |
|
|
|
name: Ubuntu |
|
|
|
|
|
|
|
|
|
|
|
strategy: |
|
|
|
strategy: |
|
|
@ -30,10 +29,10 @@ jobs: |
|
|
|
shell: bash |
|
|
|
shell: bash |
|
|
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- name: checkout repository |
|
|
|
- name: Checkout repository |
|
|
|
uses: actions/checkout@v2 |
|
|
|
uses: actions/checkout@v2 |
|
|
|
|
|
|
|
|
|
|
|
- name: install all build dependencies except libtorrent from Ubuntu repos |
|
|
|
- name: Install dependencies |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
sudo apt update |
|
|
|
sudo apt update |
|
|
|
sudo apt install \ |
|
|
|
sudo apt install \ |
|
|
@ -44,35 +43,43 @@ jobs: |
|
|
|
|
|
|
|
|
|
|
|
# this will be installed under /opt/qt515. CMake will still find it automatically without additional hints |
|
|
|
# this will be installed under /opt/qt515. CMake will still find it automatically without additional hints |
|
|
|
# to speed up the process, only the required components are installed rather than the full qt515-meta-full metapackage |
|
|
|
# to speed up the process, only the required components are installed rather than the full qt515-meta-full metapackage |
|
|
|
- name: install Qt 5.15.2 from an external PPA |
|
|
|
- name: Install Qt |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal |
|
|
|
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 |
|
|
|
- name: Install libtorrent |
|
|
|
run: | |
|
|
|
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 }} |
|
|
|
git checkout ${{ env.LIBTORRENT_VERSION_TAG }} |
|
|
|
cmake -B cmake-build-dir -G "Ninja" \ |
|
|
|
cmake \ |
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
-B build \ |
|
|
|
|
|
|
|
-G "Ninja" \ |
|
|
|
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ |
|
|
|
-Ddeprecated-functions=OFF \ |
|
|
|
-Ddeprecated-functions=OFF \ |
|
|
|
--graphviz=cmake-build-dir/target_graph.dot |
|
|
|
--graphviz=cmake-build-dir/target_graph.dot |
|
|
|
cmake --build cmake-build-dir |
|
|
|
cmake --build build |
|
|
|
sudo cmake --install cmake-build-dir --prefix /usr/local |
|
|
|
sudo cmake --install build --prefix /usr/local |
|
|
|
|
|
|
|
|
|
|
|
- name: build qBittorrent |
|
|
|
- name: Build qBittorrent |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
cmake -B build -G "Ninja" \ |
|
|
|
cmake \ |
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
-B build \ |
|
|
|
|
|
|
|
-G "Ninja" \ |
|
|
|
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ |
|
|
|
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ |
|
|
|
-D${{ matrix.qbt_gui }} \ |
|
|
|
-D${{ matrix.qbt_gui }} \ |
|
|
|
-DVERBOSE_CONFIGURE=ON \ |
|
|
|
-DVERBOSE_CONFIGURE=ON \ |
|
|
|
--graphviz=build/target_graph.dot |
|
|
|
--graphviz=build/target_graph.dot |
|
|
|
cmake --build build |
|
|
|
cmake --build build |
|
|
|
|
|
|
|
|
|
|
|
- name: install qBittorrent |
|
|
|
- name: Install qBittorrent |
|
|
|
run: sudo cmake --install build --prefix /usr/local |
|
|
|
run: sudo cmake --install build --prefix /usr/local |
|
|
|
|
|
|
|
|
|
|
|
- name: upload artifact as zip |
|
|
|
- name: Upload build artifacts |
|
|
|
uses: actions/upload-artifact@v2 |
|
|
|
uses: actions/upload-artifact@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }} |
|
|
|
name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }} |
|
|
@ -85,9 +92,8 @@ jobs: |
|
|
|
libtorrent/cmake-build-dir/compile_commands.json |
|
|
|
libtorrent/cmake-build-dir/compile_commands.json |
|
|
|
libtorrent/cmake-build-dir/target_graph.dot |
|
|
|
libtorrent/cmake-build-dir/target_graph.dot |
|
|
|
|
|
|
|
|
|
|
|
ci_windows: |
|
|
|
windows: |
|
|
|
name: Windows + vcpkg |
|
|
|
name: Windows |
|
|
|
|
|
|
|
|
|
|
|
runs-on: windows-2019 |
|
|
|
runs-on: windows-2019 |
|
|
|
|
|
|
|
|
|
|
|
defaults: |
|
|
|
defaults: |
|
|
@ -95,15 +101,15 @@ jobs: |
|
|
|
shell: pwsh |
|
|
|
shell: pwsh |
|
|
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- name: checkout repository |
|
|
|
- name: Checkout repository |
|
|
|
uses: actions/checkout@v2 |
|
|
|
uses: actions/checkout@v2 |
|
|
|
|
|
|
|
|
|
|
|
# - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement) |
|
|
|
# - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement) |
|
|
|
- name: install additional required packages with chocolatey |
|
|
|
- name: Install build tools |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
choco install ninja |
|
|
|
choco install ninja |
|
|
|
|
|
|
|
|
|
|
|
- name: setup vcpkg (cached, if possible) |
|
|
|
- name: Setup vcpkg |
|
|
|
uses: lukka/run-vcpkg@v7 |
|
|
|
uses: lukka/run-vcpkg@v7 |
|
|
|
with: |
|
|
|
with: |
|
|
|
vcpkgDirectory: ${{ env.VCPKG_DEST_WIN }} |
|
|
|
vcpkgDirectory: ${{ env.VCPKG_DEST_WIN }} |
|
|
@ -111,16 +117,21 @@ jobs: |
|
|
|
setupOnly: true |
|
|
|
setupOnly: true |
|
|
|
|
|
|
|
|
|
|
|
# Tell vcpkg to only build Release variants of the dependencies |
|
|
|
# Tell vcpkg to only build Release variants of the dependencies |
|
|
|
- name: configure vcpkg triplet overlay for release builds only |
|
|
|
- name: Configure vcpkg triplet overlay |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory |
|
|
|
New-Item ` |
|
|
|
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-windows-static.cmake ` |
|
|
|
-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 |
|
|
|
${{ 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)" |
|
|
|
-Value "set(VCPKG_BUILD_TYPE release)" |
|
|
|
|
|
|
|
|
|
|
|
# clear buildtrees after each package installation to reduce disk space requirements |
|
|
|
# clear buildtrees after each package installation to reduce disk space requirements |
|
|
|
- name: install dependencies via vcpkg |
|
|
|
- name: Install dependencies |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
$packages = ` |
|
|
|
$packages = ` |
|
|
|
"boost-circular-buffer:x64-windows-static-release", |
|
|
|
"boost-circular-buffer:x64-windows-static-release", |
|
|
@ -140,14 +151,17 @@ jobs: |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
# NOTE: this is necessary to correctly find and use cl.exe with the Ninja generator for now |
|
|
|
# NOTE: this is necessary to correctly find and use cl.exe with the Ninja generator for now |
|
|
|
- name: setup devcmd |
|
|
|
- name: Setup devcmd |
|
|
|
uses: ilammy/msvc-dev-cmd@v1 |
|
|
|
uses: ilammy/msvc-dev-cmd@v1 |
|
|
|
|
|
|
|
|
|
|
|
- name: build qBittorrent |
|
|
|
- name: Build qBittorrent |
|
|
|
shell: cmd |
|
|
|
shell: cmd |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
cmake -B build -G "Ninja" ^ |
|
|
|
cmake ^ |
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo ^ |
|
|
|
-B build ^ |
|
|
|
|
|
|
|
-G "Ninja" ^ |
|
|
|
|
|
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo ^ |
|
|
|
|
|
|
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON ^ |
|
|
|
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_WIN }}\scripts\buildsystems\vcpkg.cmake ^ |
|
|
|
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_WIN }}\scripts\buildsystems\vcpkg.cmake ^ |
|
|
|
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release ^ |
|
|
|
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release ^ |
|
|
|
-DVERBOSE_CONFIGURE=ON ^ |
|
|
|
-DVERBOSE_CONFIGURE=ON ^ |
|
|
@ -155,7 +169,7 @@ jobs: |
|
|
|
--graphviz=build\target_graph.dot |
|
|
|
--graphviz=build\target_graph.dot |
|
|
|
cmake --build build |
|
|
|
cmake --build build |
|
|
|
|
|
|
|
|
|
|
|
- name: upload artifact as zip |
|
|
|
- name: Upload build artifacts |
|
|
|
uses: actions/upload-artifact@v2 |
|
|
|
uses: actions/upload-artifact@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
name: qBittorrent-CI_Windows-x64 |
|
|
|
name: qBittorrent-CI_Windows-x64 |
|
|
@ -166,54 +180,59 @@ jobs: |
|
|
|
build/qbittorrent.pdb |
|
|
|
build/qbittorrent.pdb |
|
|
|
dist/windows/qt.conf |
|
|
|
dist/windows/qt.conf |
|
|
|
|
|
|
|
|
|
|
|
ci_macos: |
|
|
|
macos: |
|
|
|
name: macOS + vcpkg |
|
|
|
name: macOS |
|
|
|
|
|
|
|
runs-on: macos-10.15 |
|
|
|
|
|
|
|
|
|
|
|
strategy: |
|
|
|
strategy: |
|
|
|
matrix: |
|
|
|
matrix: |
|
|
|
qbt_gui: ["GUI=ON", "GUI=OFF"] |
|
|
|
qbt_gui: ["GUI=ON", "GUI=OFF"] |
|
|
|
fail-fast: false |
|
|
|
fail-fast: false |
|
|
|
|
|
|
|
|
|
|
|
runs-on: macos-10.15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
defaults: |
|
|
|
defaults: |
|
|
|
run: |
|
|
|
run: |
|
|
|
shell: pwsh |
|
|
|
shell: pwsh |
|
|
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- name: checkout repository |
|
|
|
- name: Checkout repository |
|
|
|
uses: actions/checkout@v2 |
|
|
|
uses: actions/checkout@v2 |
|
|
|
|
|
|
|
|
|
|
|
# - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement) |
|
|
|
# - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement) |
|
|
|
# - automake is needed for the installation the vcpkg installation of fontconfig, a dependency of qt5-base |
|
|
|
# - automake is needed for the installation the vcpkg installation of fontconfig, a dependency of qt5-base |
|
|
|
- name: install additional required packages with homebrew |
|
|
|
- name: Install build tools |
|
|
|
shell: bash |
|
|
|
shell: bash |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
brew install automake ninja |
|
|
|
brew install automake ninja |
|
|
|
|
|
|
|
|
|
|
|
- name: setup vcpkg (cached, if possible) |
|
|
|
- name: Setup vcpkg |
|
|
|
uses: lukka/run-vcpkg@v7 |
|
|
|
uses: lukka/run-vcpkg@v7 |
|
|
|
with: |
|
|
|
with: |
|
|
|
vcpkgDirectory: ${{ env.VCPKG_DEST_MACOS }} |
|
|
|
vcpkgDirectory: ${{ env.VCPKG_DEST_MACOS }} |
|
|
|
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }} |
|
|
|
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }} |
|
|
|
setupOnly: true |
|
|
|
setupOnly: true |
|
|
|
|
|
|
|
|
|
|
|
- name: configure vcpkg triplet overlay for release builds only |
|
|
|
- name: Configure vcpkg triplet overlay |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
New-Item -Path ${{ github.workspace }} -Name "triplets_overlay" -ItemType Directory |
|
|
|
New-Item ` |
|
|
|
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake ` |
|
|
|
-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 |
|
|
|
${{ 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)" |
|
|
|
-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 |
|
|
|
# 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 |
|
|
|
- name: Adjust "C++ standard" cmake flag |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
(Get-Content -path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( ` |
|
|
|
(Get-Content ` |
|
|
|
|
|
|
|
-path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( ` |
|
|
|
'${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=17') ` |
|
|
|
'${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=17') ` |
|
|
|
| Set-Content -Path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake |
|
|
|
| Set-Content -Path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake |
|
|
|
|
|
|
|
|
|
|
|
- name: install dependencies via vcpkg |
|
|
|
- name: Install dependencies |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
$packages = ` |
|
|
|
$packages = ` |
|
|
|
"boost-circular-buffer:x64-osx-release", |
|
|
|
"boost-circular-buffer:x64-osx-release", |
|
|
@ -232,10 +251,14 @@ jobs: |
|
|
|
--clean-after-build |
|
|
|
--clean-after-build |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
- name: build qBittorrent |
|
|
|
- name: Build qBittorrent |
|
|
|
shell: bash |
|
|
|
shell: bash |
|
|
|
run: | |
|
|
|
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 \ |
|
|
|
-DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_DEST_MACOS }}/scripts/buildsystems/vcpkg.cmake \ |
|
|
|
-DVCPKG_TARGET_TRIPLET=x64-osx-release \ |
|
|
|
-DVCPKG_TARGET_TRIPLET=x64-osx-release \ |
|
|
|
-D${{ matrix.qbt_gui }} \ |
|
|
|
-D${{ matrix.qbt_gui }} \ |
|
|
@ -243,7 +266,7 @@ jobs: |
|
|
|
--graphviz=build/target_graph.dot |
|
|
|
--graphviz=build/target_graph.dot |
|
|
|
cmake --build build |
|
|
|
cmake --build build |
|
|
|
|
|
|
|
|
|
|
|
- name: upload artifact as zip |
|
|
|
- name: Upload build artifacts |
|
|
|
uses: actions/upload-artifact@v2 |
|
|
|
uses: actions/upload-artifact@v2 |
|
|
|
with: |
|
|
|
with: |
|
|
|
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }} |
|
|
|
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }} |
|
|
|