mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 14:04:23 +00:00
GHA CI: Split "main CI" to multiple workflows
This commit is contained in:
parent
c12e486f59
commit
a9feae6110
253
.github/workflows/ci.yaml
vendored
253
.github/workflows/ci.yaml
vendored
@ -1,253 +0,0 @@
|
|||||||
name: CI - Main
|
|
||||||
|
|
||||||
# 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
|
|
||||||
# the appropriate libtorrent version, which only takes 3-5 minutes to build from source anyway
|
|
||||||
|
|
||||||
on: [pull_request, push]
|
|
||||||
|
|
||||||
env:
|
|
||||||
VCPKG_COMMIT: 8dddc6c899ce6fdbeab38b525a31e7f23cb2d5bb
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ubuntu:
|
|
||||||
name: Ubuntu
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
libt_version: ["v2.0.4", "v1.2.14"]
|
|
||||||
qbt_gui: ["GUI=ON", "GUI=OFF"]
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup ccache
|
|
||||||
uses: hendrikmuhs/ccache-action@v1
|
|
||||||
with:
|
|
||||||
key: ${{ runner.os }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install \
|
|
||||||
build-essential cmake git ninja-build pkg-config \
|
|
||||||
libssl-dev libgeoip-dev zlib1g-dev \
|
|
||||||
libboost-dev libboost-chrono-dev libboost-random-dev libboost-system-dev
|
|
||||||
# sudo apt install libqt5svg5-dev qtbase5-dev qttools5-dev # the Qt version in the standard repositories is too old...
|
|
||||||
|
|
||||||
# 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
|
|
||||||
- name: Install Qt
|
|
||||||
run: |
|
|
||||||
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal
|
|
||||||
sudo apt install \
|
|
||||||
qt515base qt515svg qt515tools
|
|
||||||
|
|
||||||
- name: Install libtorrent
|
|
||||||
run: |
|
|
||||||
git clone --branch ${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
|
|
||||||
cd libtorrent
|
|
||||||
git submodule update --init --recursive
|
|
||||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
||||||
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 build
|
|
||||||
sudo cmake --install build
|
|
||||||
|
|
||||||
- name: Build qBittorrent
|
|
||||||
run: |
|
|
||||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
||||||
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
|
|
||||||
cmake --build build
|
|
||||||
|
|
||||||
- name: Install qBittorrent
|
|
||||||
run: sudo cmake --install build --prefix /usr/local
|
|
||||||
|
|
||||||
- name: Upload build artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: qBittorrent-CI_ubuntu-20.04-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}
|
|
||||||
path: |
|
|
||||||
build/compile_commands.json
|
|
||||||
build/install_manifest.txt
|
|
||||||
build/target_graph.dot
|
|
||||||
build/qbittorrent
|
|
||||||
build/qbittorrent-nox
|
|
||||||
libtorrent/cmake-build-dir/compile_commands.json
|
|
||||||
libtorrent/cmake-build-dir/target_graph.dot
|
|
||||||
|
|
||||||
windows:
|
|
||||||
name: Windows
|
|
||||||
runs-on: windows-2019
|
|
||||||
|
|
||||||
env:
|
|
||||||
VCPKG_DEST_WIN: C:\qbt_tools\vcpkg
|
|
||||||
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
# - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement)
|
|
||||||
- name: Install build tools
|
|
||||||
run: |
|
|
||||||
choco install ninja
|
|
||||||
|
|
||||||
- name: Setup vcpkg
|
|
||||||
uses: lukka/run-vcpkg@v7
|
|
||||||
with:
|
|
||||||
vcpkgDirectory: ${{ env.VCPKG_DEST_WIN }}
|
|
||||||
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
|
|
||||||
setupOnly: true
|
|
||||||
|
|
||||||
# Tell vcpkg to only build Release variants of the dependencies
|
|
||||||
- name: Configure vcpkg triplet overlay
|
|
||||||
run: |
|
|
||||||
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 `
|
|
||||||
-Value "set(VCPKG_BUILD_TYPE release)"
|
|
||||||
|
|
||||||
# clear buildtrees after each package installation to reduce disk space requirements
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
$packages = `
|
|
||||||
"boost-circular-buffer:x64-windows-static-release",
|
|
||||||
"libtorrent:x64-windows-static-release",
|
|
||||||
"qt5-base:x64-windows-static-release",
|
|
||||||
"qt5-svg:x64-windows-static-release",
|
|
||||||
"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
|
|
||||||
foreach($package in $packages)
|
|
||||||
{
|
|
||||||
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install $package `
|
|
||||||
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
|
|
||||||
--clean-after-build
|
|
||||||
}
|
|
||||||
|
|
||||||
# NOTE: this is necessary to correctly find and use cl.exe with the Ninja generator for now
|
|
||||||
- name: Setup devcmd
|
|
||||||
uses: ilammy/msvc-dev-cmd@v1
|
|
||||||
|
|
||||||
- name: Build qBittorrent
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
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 ^
|
|
||||||
-DMSVC_RUNTIME_DYNAMIC=OFF ^
|
|
||||||
--graphviz=build\target_graph.dot
|
|
||||||
cmake --build build
|
|
||||||
|
|
||||||
- name: Upload build artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: qBittorrent-CI_Windows-x64
|
|
||||||
path: |
|
|
||||||
build/compile_commands.json
|
|
||||||
build/target_graph.dot
|
|
||||||
build/qbittorrent.exe
|
|
||||||
build/qbittorrent.pdb
|
|
||||||
dist/windows/qt.conf
|
|
||||||
|
|
||||||
macos:
|
|
||||||
name: macOS
|
|
||||||
runs-on: macos-10.15
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
libt_version: ["v2.0.4", "v1.2.14"]
|
|
||||||
qbt_gui: ["GUI=ON", "GUI=OFF"]
|
|
||||||
fail-fast: false
|
|
||||||
|
|
||||||
env:
|
|
||||||
openssl_root: /usr/local/opt/openssl@1.1
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup ccache
|
|
||||||
uses: hendrikmuhs/ccache-action@v1
|
|
||||||
with:
|
|
||||||
key: ${{ runner.os }}
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
brew update > /dev/null
|
|
||||||
brew install \
|
|
||||||
cmake ninja \
|
|
||||||
boost openssl@1.1 qt@5 zlib
|
|
||||||
brew link --force \
|
|
||||||
qt@5
|
|
||||||
# workaround for cmake + Qt
|
|
||||||
sudo ln -s /usr/local/opt/qt@5/mkspecs /usr/local/mkspecs
|
|
||||||
sudo ln -s /usr/local/opt/qt@5/plugins /usr/local/plugins
|
|
||||||
|
|
||||||
- name: Install libtorrent
|
|
||||||
run: |
|
|
||||||
git clone --branch ${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
|
|
||||||
cd libtorrent
|
|
||||||
git submodule update --init --recursive
|
|
||||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
||||||
cmake \
|
|
||||||
-B build \
|
|
||||||
-G "Ninja" \
|
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
||||||
-DCMAKE_CXX_STANDARD=17 \
|
|
||||||
-Ddeprecated-functions=OFF \
|
|
||||||
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
|
|
||||||
cmake --build build
|
|
||||||
sudo cmake --install build
|
|
||||||
|
|
||||||
- name: Build qBittorrent
|
|
||||||
run: |
|
|
||||||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
|
||||||
cmake \
|
|
||||||
-B build \
|
|
||||||
-G "Ninja" \
|
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
||||||
-D${{ matrix.qbt_gui }} \
|
|
||||||
-DVERBOSE_CONFIGURE=ON \
|
|
||||||
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
|
|
||||||
cmake --build build
|
|
||||||
|
|
||||||
- name: Upload build artifacts
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}
|
|
||||||
path: |
|
|
||||||
build/qbittorrent.app
|
|
||||||
build/qbittorrent-nox.app
|
|
@ -3,8 +3,8 @@ name: CI - File health
|
|||||||
on: [pull_request, push]
|
on: [pull_request, push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_file_health:
|
ci:
|
||||||
name: Check file health
|
name: Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@ -15,6 +15,6 @@ jobs:
|
|||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install zsh
|
sudo apt install zsh
|
||||||
|
|
||||||
- name: Run script
|
- name: Check files
|
||||||
run: |
|
run: |
|
||||||
./.github/workflows/file_health.sh
|
./.github/workflows/file_health.sh
|
73
.github/workflows/ci_macos.yaml
vendored
Normal file
73
.github/workflows/ci_macos.yaml
vendored
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
name: CI - macOS
|
||||||
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
name: Build
|
||||||
|
runs-on: macos-10.15
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
libt_version: ["v2.0.4", "v1.2.14"]
|
||||||
|
qbt_gui: ["GUI=ON", "GUI=OFF"]
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
openssl_root: /usr/local/opt/openssl@1.1
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
brew update > /dev/null
|
||||||
|
brew install \
|
||||||
|
cmake ninja \
|
||||||
|
boost openssl@1.1 qt@5 zlib
|
||||||
|
brew link --force \
|
||||||
|
qt@5
|
||||||
|
# workaround for cmake + Qt
|
||||||
|
sudo ln -s /usr/local/opt/qt@5/mkspecs /usr/local/mkspecs
|
||||||
|
sudo ln -s /usr/local/opt/qt@5/plugins /usr/local/plugins
|
||||||
|
|
||||||
|
- name: Install libtorrent
|
||||||
|
run: |
|
||||||
|
git clone --branch ${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
|
||||||
|
cd libtorrent
|
||||||
|
git submodule update --init --recursive
|
||||||
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
cmake \
|
||||||
|
-B build \
|
||||||
|
-G "Ninja" \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
|
-DCMAKE_CXX_STANDARD=17 \
|
||||||
|
-Ddeprecated-functions=OFF \
|
||||||
|
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
|
||||||
|
cmake --build build
|
||||||
|
sudo cmake --install build
|
||||||
|
|
||||||
|
- name: Build qBittorrent
|
||||||
|
run: |
|
||||||
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
cmake \
|
||||||
|
-B build \
|
||||||
|
-G "Ninja" \
|
||||||
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
|
-D${{ matrix.qbt_gui }} \
|
||||||
|
-DVERBOSE_CONFIGURE=ON \
|
||||||
|
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}
|
||||||
|
path: |
|
||||||
|
build/qbittorrent.app
|
||||||
|
build/qbittorrent-nox.app
|
84
.github/workflows/ci_ubuntu.yaml
vendored
Normal file
84
.github/workflows/ci_ubuntu.yaml
vendored
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
name: CI - Ubuntu
|
||||||
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
name: Build
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
libt_version: ["v2.0.4", "v1.2.14"]
|
||||||
|
qbt_gui: ["GUI=ON", "GUI=OFF"]
|
||||||
|
fail-fast: false
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1
|
||||||
|
with:
|
||||||
|
key: ${{ runner.os }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install \
|
||||||
|
build-essential cmake git ninja-build pkg-config \
|
||||||
|
libssl-dev libgeoip-dev zlib1g-dev \
|
||||||
|
libboost-dev libboost-chrono-dev libboost-random-dev libboost-system-dev
|
||||||
|
# sudo apt install libqt5svg5-dev qtbase5-dev qttools5-dev # the Qt version in the standard repositories is too old...
|
||||||
|
|
||||||
|
# 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
|
||||||
|
- name: Install Qt
|
||||||
|
run: |
|
||||||
|
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal
|
||||||
|
sudo apt install \
|
||||||
|
qt515base qt515svg qt515tools
|
||||||
|
|
||||||
|
- name: Install libtorrent
|
||||||
|
run: |
|
||||||
|
git clone --branch ${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
|
||||||
|
cd libtorrent
|
||||||
|
git submodule update --init --recursive
|
||||||
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
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 build
|
||||||
|
sudo cmake --install build
|
||||||
|
|
||||||
|
- name: Build qBittorrent
|
||||||
|
run: |
|
||||||
|
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||||
|
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
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
|
- name: Install qBittorrent
|
||||||
|
run: sudo cmake --install build
|
||||||
|
|
||||||
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: qBittorrent-CI_ubuntu-20.04-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}
|
||||||
|
path: |
|
||||||
|
build/compile_commands.json
|
||||||
|
build/install_manifest.txt
|
||||||
|
build/target_graph.dot
|
||||||
|
build/qbittorrent
|
||||||
|
build/qbittorrent-nox
|
||||||
|
libtorrent/cmake-build-dir/compile_commands.json
|
||||||
|
libtorrent/cmake-build-dir/target_graph.dot
|
@ -3,9 +3,10 @@ name: CI - WebUI
|
|||||||
on: [pull_request, push]
|
on: [pull_request, push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check_webui:
|
ci:
|
||||||
name: Check WebUI
|
name: Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: src/webui/www
|
working-directory: src/webui/www
|
95
.github/workflows/ci_windows.yaml
vendored
Normal file
95
.github/workflows/ci_windows.yaml
vendored
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
name: CI - Windows
|
||||||
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
name: Build
|
||||||
|
runs-on: windows-2019
|
||||||
|
|
||||||
|
env:
|
||||||
|
VCPKG_COMMIT: 8dddc6c899ce6fdbeab38b525a31e7f23cb2d5bb
|
||||||
|
VCPKG_DEST_WIN: C:\qbt_tools\vcpkg
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: pwsh
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# - ninja is needed for building qBittorrent (because it's preferable, not a hard requirement)
|
||||||
|
- name: Install build tools
|
||||||
|
run: |
|
||||||
|
choco install ninja
|
||||||
|
|
||||||
|
- name: Setup vcpkg
|
||||||
|
uses: lukka/run-vcpkg@v7
|
||||||
|
with:
|
||||||
|
vcpkgDirectory: ${{ env.VCPKG_DEST_WIN }}
|
||||||
|
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
|
||||||
|
setupOnly: true
|
||||||
|
|
||||||
|
# Tell vcpkg to only build Release variants of the dependencies
|
||||||
|
- name: Configure vcpkg triplet overlay
|
||||||
|
run: |
|
||||||
|
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 `
|
||||||
|
-Value "set(VCPKG_BUILD_TYPE release)"
|
||||||
|
|
||||||
|
# clear buildtrees after each package installation to reduce disk space requirements
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
$packages = `
|
||||||
|
"boost-circular-buffer:x64-windows-static-release",
|
||||||
|
"libtorrent:x64-windows-static-release",
|
||||||
|
"qt5-base:x64-windows-static-release",
|
||||||
|
"qt5-svg:x64-windows-static-release",
|
||||||
|
"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
|
||||||
|
foreach($package in $packages)
|
||||||
|
{
|
||||||
|
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install $package `
|
||||||
|
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
|
||||||
|
--clean-after-build
|
||||||
|
}
|
||||||
|
|
||||||
|
# NOTE: this is necessary to correctly find and use cl.exe with the Ninja generator for now
|
||||||
|
- name: Setup devcmd
|
||||||
|
uses: ilammy/msvc-dev-cmd@v1
|
||||||
|
|
||||||
|
- name: Build qBittorrent
|
||||||
|
shell: cmd
|
||||||
|
run: |
|
||||||
|
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 ^
|
||||||
|
-DMSVC_RUNTIME_DYNAMIC=OFF ^
|
||||||
|
--graphviz=build\target_graph.dot
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: qBittorrent-CI_Windows-x64
|
||||||
|
path: |
|
||||||
|
build/compile_commands.json
|
||||||
|
build/target_graph.dot
|
||||||
|
build/qbittorrent.exe
|
||||||
|
build/qbittorrent.pdb
|
||||||
|
dist/windows/qt.conf
|
Loading…
x
Reference in New Issue
Block a user