qBittorrent/.github/workflows/ci_ubuntu.yaml
xavier2k6 b740cc23d3
GHA CI: Update dependencies
Update `libtorrent` version(s) to `2.0.6` & `1.2.16` in `GHA CI`
- https://github.com/arvidn/libtorrent/releases/tag/v2.0.6
- https://github.com/arvidn/libtorrent/releases/tag/v1.2.16

Update `Boost` version to `1.79.0`
- https://www.boost.org/users/history/version_1_79_0.html

Bump `pre-commit-hooks` version to `4.2.0`
- https://github.com/pre-commit/pre-commit-hooks/releases/tag/v4.2.0

Update `Qt6` version to `6.3.0`
- https://www.qt.io/blog/qt-6.3-released
- https://code.qt.io/cgit/qt/qtreleasenotes.git/about/qt/6.3.0/release-note.md

Note: used `aqtinstall 2.1.0` with `jurplel/install-qt-action` for support of `Qt 6.2.1+`
(this requirement can be removed on official release of `jurplel/install-qt-action v3`)

PR #16888.
2022-04-19 10:32:56 +08:00

107 lines
3.1 KiB
YAML

name: CI - Ubuntu
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Build
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.6", "1.2.16"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["5.15.2", "6.2.0"]
exclude:
- libt_version: "1.2.16"
qt_version: "6.2.0"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install \
build-essential cmake ninja-build pkg-config \
libboost-dev libssl-dev zlib1g-dev
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
ccache_options: |
max_size=2G
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: ${{ matrix.qt_version }}
- name: Install libtorrent
run: |
git clone \
--branch v${{ matrix.libt_version }} \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git
cd libtorrent
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
- name: Build qBittorrent (Qt5)
if: ${{ startsWith(matrix.qt_version, 5) }}
run: |
lupdate -extensions c,cpp,h,hpp,ui ./
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build
DESTDIR="qbittorrent" cmake --install build
- name: Build qBittorrent (Qt6)
if: ${{ startsWith(matrix.qt_version, 6) }}
run: |
lupdate -extensions c,cpp,h,hpp,ui ./
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DQT6=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build
DESTDIR="qbittorrent" cmake --install build
- name: Prepare build artifacts
run: |
mkdir upload
mkdir upload/cmake
cp build/compile_commands.json upload/cmake
mkdir upload/cmake/libtorrent
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build-info_ubuntu-20.04-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: upload