Skip to content

Commit f843830

Browse files
committed
Merge remote-tracking branch 'upstream/master' into seeding-connection-limits
2 parents ab13657 + dda7f80 commit f843830

File tree

456 files changed

+151769
-100460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

456 files changed

+151769
-100460
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ core.eol=lf
88

99
dist/windows/license.txt text eol=crlf
1010
test/testdata/crlf.txt text eol=crlf
11+
12+
# disable line endings conversions
13+
src/base/3rdparty/expected.hpp -text

.github/workflows/ci_file_health.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ concurrency:
1111
jobs:
1212
ci:
1313
name: Check
14-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-slim
1515
permissions:
1616
security-events: write
1717
steps:
1818
- name: Checkout repository
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
2020
with:
2121
persist-credentials: false
2222

2323
- name: Setup python
24-
uses: actions/setup-python@v5
24+
uses: actions/setup-python@v6
2525
with:
2626
python-version: "*"
2727

@@ -31,12 +31,13 @@ jobs:
3131
- name: Check doc
3232
env:
3333
pandoc_path: "${{ github.workspace }}/../pandoc"
34+
pandoc_version: "3.8.3"
3435
run: |
3536
# install pandoc
3637
curl \
3738
-L \
3839
-o "${{ runner.temp }}/pandoc.tar.gz" \
39-
"https://github.com/jgm/pandoc/releases/download/3.7.0.2/pandoc-3.7.0.2-linux-amd64.tar.gz"
40+
"https://github.com/jgm/pandoc/releases/download/${{ env.pandoc_version }}/pandoc-${{ env.pandoc_version }}-linux-amd64.tar.gz"
4041
tar -xf "${{ runner.temp }}/pandoc.tar.gz" -C "${{ github.workspace }}/.."
4142
mv "${{ github.workspace }}/.."/pandoc-* "${{ env.pandoc_path }}"
4243
# run pandoc
@@ -65,7 +66,7 @@ jobs:
6566
> "${{ runner.temp }}/zizmor_results.sarif"
6667
6768
- name: Upload zizmor results
68-
uses: github/codeql-action/upload-sarif@v3
69+
uses: github/codeql-action/upload-sarif@v4
6970
with:
7071
category: zizmor
7172
sarif_file: "${{ runner.temp }}/zizmor_results.sarif"

.github/workflows/ci_macos.yaml

Lines changed: 25 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,25 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
libt_version: ["2.0.11", "1.2.20"]
21+
libtorrent:
22+
- version: "2.0.11"
23+
boost_major_version: "1"
24+
boost_minor_version: "90"
25+
boost_patch_version: "0"
26+
- version: "1.2.20"
27+
boost_major_version: "1"
28+
boost_minor_version: "86"
29+
boost_patch_version: "0"
2230
qbt_gui: ["GUI=ON", "GUI=OFF"]
23-
qt_version: ["6.9.1"]
31+
qt_version: ["6.10.1"]
2432

2533
env:
2634
boost_path: "${{ github.workspace }}/../boost"
2735
libtorrent_path: "${{ github.workspace }}/../libtorrent"
2836

2937
steps:
3038
- name: Checkout repository
31-
uses: actions/checkout@v4
39+
uses: actions/checkout@v6
3240
with:
3341
persist-credentials: false
3442

@@ -43,25 +51,21 @@ jobs:
4351
command: |
4452
brew update > /dev/null
4553
brew install \
46-
cmake ninja \
4754
openssl@3 zlib
55+
# preinstalled on the image: cmake ninja
4856
4957
- name: Setup ccache
5058
uses: Chocobo1/setup-ccache-action@v1
5159
with:
52-
store_cache: ${{ github.ref == 'refs/heads/master' }}
60+
store_cache: ${{ (github.repository != 'qbittorrent/qBittorrent') || (github.ref == 'refs/heads/master') }}
5361
update_packager_index: false
5462
ccache_options: |
5563
max_size=1G
5664
5765
- name: Install boost
58-
env:
59-
BOOST_MAJOR_VERSION: "1"
60-
BOOST_MINOR_VERSION: "86"
61-
BOOST_PATCH_VERSION: "0"
6266
run: |
63-
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"
64-
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"
67+
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"
68+
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"
6569
set +e
6670
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
6771
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
@@ -79,13 +83,14 @@ jobs:
7983
with:
8084
version: ${{ matrix.qt_version }}
8185
archives: qtbase qtdeclarative qtsvg qttools
86+
modules: qtimageformats
8287
# Not sure why Qt made a hard dependency on qtdeclarative, try removing it when Qt > 6.4.0
8388
cache: true
8489

8590
- name: Install libtorrent
8691
run: |
8792
git clone \
88-
--branch v${{ matrix.libt_version }} \
93+
--branch v${{ matrix.libtorrent.version }} \
8994
--depth 1 \
9095
--recurse-submodules \
9196
https://github.com/arvidn/libtorrent.git \
@@ -119,6 +124,11 @@ jobs:
119124
cmake --build build --target qbt_update_translations
120125
cmake --build build
121126
cmake --build build --target check
127+
if [ "${{ matrix.qbt_gui }}" = "GUI=ON" ]; then
128+
build/qbittorrent.app/Contents/MacOS/qbittorrent -v
129+
else
130+
build/qbittorrent-nox.app/Contents/MacOS/qbittorrent-nox -v
131+
fi
122132
123133
- name: Prepare build artifacts
124134
run: |
@@ -131,7 +141,7 @@ jobs:
131141
macdeployqt "$appName.app" -no-strip
132142
# code signing
133143
xattr -cr "$appName.app"
134-
codesign --force --sign - --options runtime \
144+
codesign --force --sign - \
135145
"$appName.app" \
136146
"$appName.app/Contents/Frameworks"/* \
137147
"$appName.app/Contents/MacOS/$appName"
@@ -156,7 +166,7 @@ jobs:
156166
cp ${{ env.libtorrent_path }}/build/compile_commands.json upload/cmake/libtorrent
157167
158168
- name: Upload build artifacts
159-
uses: actions/upload-artifact@v4
169+
uses: actions/upload-artifact@v6
160170
with:
161-
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
171+
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libtorrent.version }}_Qt-${{ matrix.qt_version }}
162172
path: upload

.github/workflows/ci_python.yaml

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1919
with:
2020
persist-credentials: false
2121

2222
- name: Setup python (auxiliary scripts)
23-
uses: actions/setup-python@v5
23+
uses: actions/setup-python@v6
2424
with:
2525
python-version: '3' # use default version
2626

@@ -54,46 +54,30 @@ jobs:
5454
python -m compileall $PY_FILES
5555
5656
- name: Setup python (search engine)
57-
uses: actions/setup-python@v5
57+
uses: actions/setup-python@v6
5858
with:
5959
python-version: '3.9'
6060

6161
- name: Install tools (search engine)
62-
run: pip install bandit isort mypy pycodestyle pyflakes pyright
63-
64-
- name: Gather files (search engine)
62+
working-directory: src/searchengine/nova3
6563
run: |
66-
export "PY_FILES=$(find . -type f -name '*.py' -path '*searchengine*' ! -name 'socks.py' -printf '%p ')"
67-
echo $PY_FILES
68-
echo "PY_FILES=$PY_FILES" >> "$GITHUB_ENV"
64+
pip install uv
65+
uv sync
6966
7067
- name: Check typings (search engine)
71-
run: |
72-
MYPYPATH="src/searchengine/nova3" \
73-
mypy \
74-
--follow-imports skip \
75-
--strict \
76-
$PY_FILES
77-
pyright \
78-
$PY_FILES
68+
working-directory: src/searchengine/nova3
69+
run: uv run just check
7970

8071
- name: Lint code (search engine)
81-
run: |
82-
pyflakes $PY_FILES
83-
bandit --skip B110,B310,B314,B405 $PY_FILES
72+
working-directory: src/searchengine/nova3
73+
run: uv run just lint
8474

8575
- name: Format code (search engine)
76+
working-directory: src/searchengine/nova3
8677
run: |
87-
pycodestyle \
88-
--ignore=E265,E402 \
89-
--max-line-length=1000 \
90-
--statistics \
91-
$PY_FILES
92-
isort \
93-
--check \
94-
--diff \
95-
$PY_FILES
78+
uv run just format
79+
git diff --exit-code
9680
9781
- name: Build code (search engine)
98-
run: |
99-
python -m compileall $PY_FILES
82+
working-directory: src/searchengine/nova3
83+
run: uv run just build

.github/workflows/ci_ubuntu.yaml

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
libt_version: ["2.0.11", "1.2.20"]
22+
libtorrent:
23+
- version: "2.0.11"
24+
boost_major_version: "1"
25+
boost_minor_version: "77"
26+
boost_patch_version: "0"
27+
- version: "1.2.20"
28+
boost_major_version: "1"
29+
boost_minor_version: "77"
30+
boost_patch_version: "0"
2331
qbt_gui: ["GUI=ON", "GUI=OFF"]
2432
qt_version: ["6.6.3"]
2533

@@ -30,7 +38,7 @@ jobs:
3038

3139
steps:
3240
- name: Checkout repository
33-
uses: actions/checkout@v4
41+
uses: actions/checkout@v6
3442
with:
3543
persist-credentials: false
3644

@@ -39,24 +47,20 @@ jobs:
3947
sudo apt update
4048
sudo apt install \
4149
build-essential cmake ninja-build \
42-
libssl-dev libxkbcommon-x11-dev libxcb-cursor-dev zlib1g-dev
50+
libssl-dev zlib1g-dev
4351
4452
- name: Setup ccache
4553
uses: Chocobo1/setup-ccache-action@v1
4654
with:
47-
store_cache: ${{ github.ref == 'refs/heads/master' }}
55+
store_cache: ${{ (github.repository != 'qbittorrent/qBittorrent') || (github.ref == 'refs/heads/master') }}
4856
update_packager_index: false
4957
ccache_options: |
5058
max_size=1G
5159
5260
- name: Install boost
53-
env:
54-
BOOST_MAJOR_VERSION: "1"
55-
BOOST_MINOR_VERSION: "77"
56-
BOOST_PATCH_VERSION: "0"
5761
run: |
58-
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"
59-
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"
62+
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"
63+
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"
6064
set +e
6165
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
6266
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
@@ -74,12 +78,13 @@ jobs:
7478
with:
7579
version: ${{ matrix.qt_version }}
7680
archives: icu qtbase qtdeclarative qtsvg qttools
81+
modules: qtimageformats
7782
cache: true
7883

7984
- name: Install libtorrent
8085
run: |
8186
git clone \
82-
--branch v${{ matrix.libt_version }} \
87+
--branch v${{ matrix.libtorrent.version }} \
8388
--depth 1 \
8489
--recurse-submodules \
8590
https://github.com/arvidn/libtorrent.git \
@@ -100,8 +105,8 @@ jobs:
100105
101106
# to avoid scanning 3rdparty codebases, initialize it just before building qbt
102107
- name: Initialize CodeQL
103-
uses: github/codeql-action/init@v3
104-
if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON')
108+
uses: github/codeql-action/init@v4
109+
if: startsWith(matrix.libtorrent.version, 2) && (matrix.qbt_gui == 'GUI=ON')
105110
with:
106111
config-file: ./.github/workflows/helper/codeql/cpp.yaml
107112
languages: cpp
@@ -123,11 +128,16 @@ jobs:
123128
cmake --build build --target qbt_update_translations
124129
cmake --build build
125130
cmake --build build --target check
131+
if [ "${{ matrix.qbt_gui }}" = "GUI=ON" ]; then
132+
QT_QPA_PLATFORM=offscreen build/qbittorrent -v
133+
else
134+
build/qbittorrent-nox -v
135+
fi
126136
DESTDIR="qbittorrent" cmake --install build
127137
128138
- name: Run CodeQL analysis
129-
uses: github/codeql-action/analyze@v3
130-
if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON')
139+
uses: github/codeql-action/analyze@v4
140+
if: startsWith(matrix.libtorrent.version, 2) && (matrix.qbt_gui == 'GUI=ON')
131141
with:
132142
category: ${{ github.base_ref || github.ref_name }}
133143

@@ -164,14 +174,15 @@ jobs:
164174
run: |
165175
rm -f "${{ runner.workspace }}/Qt/${{ matrix.qt_version }}/gcc_64/plugins/sqldrivers/libqsqlmimer.so"
166176
./linuxdeploy-x86_64.AppImage --appdir qbittorrent --plugin qt
167-
rm qbittorrent/apprun-hooks/*
177+
mkdir -p qbittorrent/apprun-hooks
178+
rm -f qbittorrent/apprun-hooks/*
168179
cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh
169180
NO_APPSTREAM=1 \
170181
OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
171182
./linuxdeploy-x86_64.AppImage --appdir qbittorrent --output appimage
172183
173184
- name: Upload build artifacts
174-
uses: actions/upload-artifact@v4
185+
uses: actions/upload-artifact@v6
175186
with:
176-
name: qBittorrent-CI_Ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
187+
name: qBittorrent-CI_Ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libtorrent.version }}_Qt-${{ matrix.qt_version }}
177188
path: upload

0 commit comments

Comments
 (0)