2021-08-19 06:21:34 +03:00
|
|
|
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: Install dependencies
|
|
|
|
run: |
|
2021-10-03 11:09:09 +03:00
|
|
|
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal
|
2021-08-19 06:21:34 +03:00
|
|
|
sudo apt update
|
|
|
|
sudo apt install \
|
2021-09-23 07:38:52 +03:00
|
|
|
build-essential cmake ninja-build pkg-config \
|
2021-10-03 11:09:09 +03:00
|
|
|
libboost-dev libssl-dev qt515base qt515svg qt515tools zlib1g-dev
|
2021-08-19 06:21:34 +03:00
|
|
|
|
2021-09-23 07:38:52 +03:00
|
|
|
- name: Setup ccache
|
|
|
|
uses: Chocobo1/setup-ccache-action@v1
|
|
|
|
with:
|
|
|
|
update_packager_index: false
|
2021-10-03 11:09:09 +03:00
|
|
|
ccache_options: |
|
|
|
|
max_size=2G
|
2021-08-19 06:21:34 +03:00
|
|
|
|
|
|
|
- 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
|
|
|
|
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: |
|
|
|
|
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
|
2021-10-03 11:09:09 +03:00
|
|
|
sudo cmake --install build
|
2021-08-19 06:21:34 +03:00
|
|
|
|
|
|
|
- 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
|