2 on: [pull_request, push]
11 libt_version: ["v2.0.4", "v1.2.14"]
12 qbt_gui: ["GUI=ON", "GUI=OFF"]
16 - name: Checkout repository
17 uses: actions/checkout@v2
20 uses: hendrikmuhs/ccache-action@v1
24 - name: Install dependencies
28 build-essential cmake git ninja-build pkg-config \
29 libssl-dev libgeoip-dev zlib1g-dev \
30 libboost-dev libboost-chrono-dev libboost-random-dev libboost-system-dev
31 # sudo apt install libqt5svg5-dev qtbase5-dev qttools5-dev # the Qt version in the standard repositories is too old...
33 # this will be installed under /opt/qt515. CMake will still find it automatically without additional hints
34 # to speed up the process, only the required components are installed rather than the full qt515-meta-full metapackage
37 sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal
39 qt515base qt515svg qt515tools
41 - name: Install libtorrent
43 git clone --branch ${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
45 git submodule update --init --recursive
46 export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
50 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
51 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
52 -Ddeprecated-functions=OFF \
53 --graphviz=cmake-build-dir/target_graph.dot
55 sudo cmake --install build
57 - name: Build qBittorrent
59 export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
63 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
64 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
65 -D${{ matrix.qbt_gui }} \
66 -DVERBOSE_CONFIGURE=ON \
67 --graphviz=build/target_graph.dot
70 - name: Install qBittorrent
71 run: sudo cmake --install build
73 - name: Upload build artifacts
74 uses: actions/upload-artifact@v2
76 name: qBittorrent-CI_ubuntu-20.04-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}
78 build/compile_commands.json
79 build/install_manifest.txt
80 build/target_graph.dot
83 libtorrent/cmake-build-dir/compile_commands.json
84 libtorrent/cmake-build-dir/target_graph.dot