GHA CI: improve manageability for boost version

Adopted suggestion from: https://github.com/qbittorrent/qBittorrent/pull/23631#discussion_r2637707057

PR #23671.
This commit is contained in:
Chocobo1
2025-12-30 21:59:40 +08:00
committed by GitHub
parent 14d2db185a
commit a5b5ba2065
4 changed files with 51 additions and 39 deletions

View File

@@ -18,7 +18,15 @@ jobs:
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.11", "1.2.20"]
libtorrent:
- version: "2.0.11"
boost_major_version: "1"
boost_minor_version: "90"
boost_patch_version: "0"
- version: "1.2.20"
boost_major_version: "1"
boost_minor_version: "86"
boost_patch_version: "0"
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["6.10.1"]
@@ -55,13 +63,9 @@ jobs:
max_size=1G
- name: Install boost
env:
BOOST_MAJOR_VERSION: "1"
BOOST_MINOR_VERSION: ${{ startsWith(matrix.libt_version, '2') && '90' || '86' }}
BOOST_PATCH_VERSION: ${{ startsWith(matrix.libt_version, '2') && '0' || '0' }}
run: |
boost_url="https://archives.boost.io/release/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/source/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ env.BOOST_MAJOR_VERSION }}.${{ env.BOOST_MINOR_VERSION }}.${{ env.BOOST_PATCH_VERSION }}/boost_${{ env.BOOST_MAJOR_VERSION }}_${{ env.BOOST_MINOR_VERSION }}_${{ env.BOOST_PATCH_VERSION }}.tar.gz"
boost_url="https://archives.boost.io/release/${{ matrix.libtorrent.boost_major_version }}.${{ matrix.libtorrent.boost_minor_version }}.${{ matrix.libtorrent.boost_patch_version }}/source/boost_${{ matrix.libtorrent.boost_major_version }}_${{ matrix.libtorrent.boost_minor_version }}_${{ matrix.libtorrent.boost_patch_version }}.tar.gz"
boost_url2="https://sourceforge.net/projects/boost/files/boost/${{ matrix.libtorrent.boost_major_version }}.${{ matrix.libtorrent.boost_minor_version }}.${{ matrix.libtorrent.boost_patch_version }}/boost_${{ matrix.libtorrent.boost_major_version }}_${{ matrix.libtorrent.boost_minor_version }}_${{ matrix.libtorrent.boost_patch_version }}.tar.gz"
set +e
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
@@ -86,7 +90,7 @@ jobs:
- name: Install libtorrent
run: |
git clone \
--branch v${{ matrix.libt_version }} \
--branch v${{ matrix.libtorrent.version }} \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git \
@@ -164,5 +168,5 @@ jobs:
- name: Upload build artifacts
uses: actions/upload-artifact@v5
with:
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libtorrent.version }}_Qt-${{ matrix.qt_version }}
path: upload