Commit Graph

109 Commits

Author SHA1 Message Date
Yat Ho
e3853d9750 build: remove ENABLE_DEPRECATED (#8461) 2026-02-12 09:56:50 -06:00
Yat Ho
cd920a7bec ci(app): run clang-tidy (#8442)
* fix(app): clang-tidy warnings

* build(app): convert checks to list

* build(app): fix clang-tidy `HeaderFilterRegex`

* ci(app): run clang-tidy

* fix: ftbfs

* wtf
2026-02-12 00:23:00 -06:00
Yat Ho
5320fc1a49 ci: workaround system header warnings on macOS (#8384) 2026-02-05 22:31:33 -06:00
Yat Ho
39803eb0f0 build: support building with system sigslot (#8371) 2026-02-04 22:46:16 -06:00
Charles Kerr
90402fd97b refactor: move StatsMode to tr::app (#8330)
* refactor: add StatsMode to libtransmission-app

* test: add display-mode unit tests

* feat: add apicompat for StatsMode

* refactor: use StatsMode in Qt client

* refactor: add template method for gtr_set_pref()

* refactor: use StatsMode in GTK client

* ci: use the all-tests alias instead of hardcoding tests

* ci: copy runtime DLLS into test output directory for Windows test binaries
2026-02-03 09:52:49 -06:00
Yat Ho
e38ace6b0f fix: -DENABLE_UTP=OFF FTBFS (#8301) 2026-01-31 12:53:58 -06:00
Yat Ho
3d09c4df4e build: support building with system fast_float (#8206) 2026-01-30 15:20:21 -06:00
Yat Ho
754b295d2a chore(core, tests): fix modernize-loop-convert (#8235)
* chore(core, tests): fix `modernize-loop-convert`

* ci: bump sanitizer-tests-ubuntu to 24.04

Get newer clang to fix FTBFS.
2026-01-28 18:53:40 -06:00
Yat Ho
e687db8f26 build: support building with system utf8cpp (#8191) 2026-01-28 15:33:50 -06:00
Yat Ho
02ca4e3e2b build: support building with system gtest (#8196)
* build: support building with system gtest

* chore: include gtest headers with h-char include
2026-01-27 20:15:11 -06:00
Yat Ho
c738b9fe4d build: support building with system wide-integer (#8209) 2026-01-27 12:22:32 -06:00
Yat Ho
bcac3bd461 build: support building with system small (#8208) 2026-01-26 10:01:51 -06:00
Yat Ho
665f689e44 build: support building with system {fmt} (#8187) 2026-01-23 11:04:16 -06:00
Yat Ho
f319bc6bf6 ci: update and test more Debian versions (#8153) 2026-01-22 09:06:41 -06:00
Yat Ho
6327cc6c2e build: add USE_SYSTEM_DEFAULT option (#8176)
* build: add `USE_SYSTEM_DEFAULT` option

* ci: use `USE_SYSTEM_DEFAULT`
2026-01-21 09:08:04 -06:00
Charles Kerr
83d49b3c7f ci: add run-tests composite action (#8159)
* ci: add run-tests composite action

* fixup! ci: add run-tests composite action

send sanitizer log messages to stderr

otherwise, they will break transmission-show tests

* fixup! ci: add run-tests composite action

fix windows, alpine breakage

* fixup! ci: add run-tests composite action

fix: sanitizer logging to stderr

* fixup! ci: add run-tests composite action

disable asan leak detection on macOS: the feature is unsupported there

* fixup! refactor: extract platform detection into its own composite action (#8158)

ensure bash is installed on alpine linux
2026-01-21 08:24:46 -06:00
Yat Ho
7de5795cde ci: only setup nodejs if make-web == true (#8171) 2026-01-20 11:12:41 -06:00
Charles Kerr
6248b9d303 refactor: extract platform detection into its own composite action (#8158) 2026-01-16 12:59:30 -06:00
Charles Kerr
36ea62cf6e ci: add install-deps composite action (#8152) 2026-01-16 10:10:00 -06:00
Yat Ho
5f16036459 ci: update and test more Fedora versions (#8151) 2026-01-16 00:28:12 -06:00
Yat Ho
66a7dcff2e ci: use cmake --install (#8149) 2026-01-15 22:49:00 -06:00
Yat Ho
c0c3700ec2 ci: remove redundant QT_QPA_PLATFORM definitions (#8150) 2026-01-15 22:15:44 -06:00
Yat Ho
6ba8ec7e6f ci: bump actions and deps (#8141)
* ci: bump to `actions/checkout@v6`

* ci: bump to `actions/setup-node@v6`

* ci: bump to `actions/upload-artifact@v6`

* ci: bump to `actions/download-artifact@v7`

* ci: bump to `actions/cache@v5`

* ci: bump to `actions/setup-java@v5`

* ci: use gradle 8.13

* ci: bump to vcpkg `389d14fa0e0692f36967e9eb5499e909317644d5`

* ci: bump to `github/codeql-action@v4`

* ci: bump to ndk 27.3.13750724

* fix: define android namespace

* ci: don't pin ubuntu runner version for non-native builds
2026-01-15 14:15:47 -06:00
Charles Kerr
8dea0e863f fix: several CI errors (#8124)
* Revert "build(cmake): support building with (almost) all system 3rd-party libraries (#7554)"

This reverts commit a89ca4f2c9.

* fixup! refactor: use a map of getters, setters for `session_get` and `session_set` properties (#8024)

fix: capture-by-reference error in session_accessors()

* fix: 'Qt depends on a UTF-8 locale' CI warning

* fix: 'qt.qpa.xcb: could not connect to display' CI error
2026-01-13 13:16:40 -06:00
Yat Ho
a89ca4f2c9 build(cmake): support building with (almost) all system 3rd-party libraries (#7554)
* build: overhaul tr_add_external_auto_library

* build: use package-provided CMake config file libevent

* build: use package-provided CMake config file miniupnpc

* build: update libutp find module

* build: make LIBNAME an optional parameter

* build: use package-provided CMake config file libdeflate

* build: update libb64 find module

* build: update libnatpmp find module

* build: update libpsl find module

* build: support system fast_float library

* chore: reformat long brew commands

* build: support system fmt library

* build: support system rapidjson library

* build: support system small library

* build: support system library utf8cpp

* build: support system library WideInteger

* build: support system library gtest

* fix: incorrectly labeled test suites

* build: remove unused parameters from tr_add_external_auto_library

* build: update crc32c cmake script

* fix: dht system library

* fix: add libutp interface target

* code review: move TrGtest.cmake

* code review: move tr_get_fmt_version into Findfmt.cmake

* code review: use option() for gtest

* code review: move find_package(PkgConfig) out of loop

* build: delete FindCrc32c.cmake

Impossible to parse package version from distributed source files.

* code review: Finddht.cmake

* build: delete FindFastFloat.cmake

Impossible to parse package version from distributed source files.

* code review: Findfmt.cmake

* code review: Findlibb64.cmake

* code review: Findlibdeflate.cmake

* code review: Findlibevent.cmake

* code review: Findlibnatpmp.cmake

* code review: Findlibpsl.cmake

* code review: Findlibutp.cmake

* code review: Findlibminiupnpc.cmake

* code review: FindRapidJSON.cmake

* build: delete FindSmall.cmake

Impossible to parse package version from distributed source files.

* build: only accept cmake config package for utf8cpp

Impossible to parse package version from distributed source files.

* build: delete FindWideInteger.cmake

Impossible to parse package version from distributed source files.

* build: add `USE_SYSTEM_DEFAULT`

* ci: drop Fedora 40 and adopt Fedora 43

* ci: try to silence system header warnings

* ci: use `cmake --install`

* Revert "build: only accept cmake config package for utf8cpp"

This reverts commit 2158d631fd.

* build: harden utf8cpp find module

* chore: bump wide-integer

Pick up bf9398f9da and bcc726a30f

* refactor: gtest should be included with angled brackets

Now that gtest is built as a system library, it should be included with angled brackets instead of quotes.

* code review: fixup libutp variables before `find_package_handle_standard_args`

* code review: define `WIDE_INTEGER_HAS_LIMB_TYPE_UINT64` only for targets depending on WideInteger

* chore: bump wide-integer

Pickup 4b2258acac so that wide-integer tests won't run in Transmission project.
2026-01-12 09:04:47 -06:00
Charles Kerr
d177f9f903 test: add unit tests for Prefs (#8112)
* fix: hicpp-use-auto,modernize-use-auto

* refactor: make Prefs::getKey() a static method

refactor: make Prefs::isCore() a static method

refactor: make Prefs::type() a static method

* refactor: Application takes a Prefs& arg, not a std::unique_ptr<Prefs> arg

* fix: bugprone-exception-escape

save settings by calling prefs.save() from main()

* refactor: load settings by calling prefs.load() from main()

* refactor: use preferred declaration order in Prefs

* fixup! fix: bugprone-exception-escape

* refactor: add Prefs::current_values()

* refactor: clean up namespace use in Prefs.cc

* feat: add QString, QDateTime serializers

* test: add scaffolding for testing Qt code

test: add tests for Prefs

* refactor: remove unused #includes

* build: add clang-tidy rules to tests/qt/

* refactor: clean up the new test code a little

* chore: add missing copyright statement

* ci: ensure Qt6Test is installed

build: check for QTest when ENABLE_TESTS + ENABLE_QT are ON

* fixup! feat: add QString, QDateTime serializers

* fix: Wswitch warning

* build: do not disable tests in release/windows/build-qt5.psl, build-qt6.psl

* ci: set QT_QPA_PLATFORM for running new Qt tests

* test: build cleanly in Qt 5.15

* fixup! fixup! feat: add QString, QDateTime serializers

fix QDateTime serializer on macOS

* fixup! ci: set QT_QPA_PLATFORM for running new Qt tests

install xcb-util-cursor on alpine
2026-01-11 19:23:00 -06:00
namoen0301
398fe70b02 GHA CI: Add support for Windows arm64 (#7758) 2025-12-31 06:25:27 +00:00
Yat Ho
2ee411d222 ci: set ENABLE_TESTS to make-tests on alpine (#7914) 2025-12-10 11:48:48 -06:00
Charles Kerr
4bbc2e9c42 ci: use clang for alpine-musl build (#7879) 2025-12-05 18:26:35 -06:00
Yat Ho
9dd9aab902 build: bump clang tools to 20 (#7573)
* build: bump to clang-format-20

* build: bump to clang-tidy-20

* chore: revert edc59ba5d8
2025-12-01 23:18:02 -06:00
Yat Ho
78dd0242cf ci: disable fail-fast for new macOS runners (#7857) 2025-11-26 11:26:18 -06:00
Dzmitry Neviadomski
5a995aa335 Update macos actions (#7845)
* ci: move macos-13 actions to macos-14

We have some GitHub Actions which we try to run on the oldest version of
macOS available. That's currently macos-13, but GitHub is deprecating it:

> This is a scheduled macos-13 brownout.
> The macOS-13 based runner images > are being deprecated. For more details,
> see https://github.com/actions/runner-images/issues/13046.

We last bumped this from macos-12 to macos-13 in 43f5ca8 #7275

* ci: do not specify architectures in macOS CI builds

GitHub has is phasing out su pport for macOS x86_64 runners

* ci: fold the macos-X-from-tarball jobs into a single job

* ci: fold macos-26 and macos-14 jobs into a single job

* Use macos-15-intel runners instead of macos-14 (arm64).

If we test compilation two times, at least do it on different host
archs.
Also macOS 15 supports latest Xcode with macOS 26.1 SDK.

* Make job names more meaningful

* Fix indentation in macos-xcodebuild-universal

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-11-25 16:52:34 -06:00
Dzmitry Neviadomski
aa08c28cb1 Try out xcbeautify and fix missing artifacts (#7824) 2025-11-23 17:01:48 -06:00
Cœur
cd45c648a1 Updating actions to macos-26 (#7764) 2025-11-09 17:04:08 -05:00
Yat Ho
d31e77a494 chore: update transmission-web package (#7003)
* chore: update minor versions

* chore: bump to `style-loader@4`

major version change

* refactor: combine `#mainwin-toolbar:nth-last-child(2)` rule

* refactor: cleanup scss definitions

Notes: `.single-file` is no longer used in code

* chore: bump `esbuild-sass-plugin@3` `esbuild@0.25`

* chore: uninstall unused `stylelint-config-standard`

In fact, it was never used since added to `package.json`.

* chore: bump `stylelint@16` `stylelint-config-sass-guidelines@12`

* chore: bump `eslint@9` `eslint-plugin-sonarjs@1` `eslint-plugin-unicorn@61`

* chore: enable prettier for whole `transmission-web` package

* chore: bump `@primer/stylelint-config@13`

* chore: update minor versions

* build: remove lint config files from CMake dependency

* chore: bump minor versions

* chore: bump `eslint-plugin-sonarjs@3`

* ci: use `actions/setup-node@v4` to install Node.js

So that there's no risk of the OS package manager's Node.js version being too low.

Except in Alpine, which does not work with `actions/setup-node@v4`. Ref: https://github.com/actions/setup-node/issues/387

* chore: replace `lodash.isEqual` with `fast-deep-equal`

* chore: bump minor versions

* chore: re-generate package-lock.json

* chore: fix lint errors
2025-10-25 12:09:36 -05:00
Yat Ho
0715897fc8 feat: use canonical peer priority to decide which peers to keep (#6981)
* feat: CRC32-C

* feat: canonical peer priority calculation bep-40

* test: add test cases for IPv4 canonical peer priority

* refactor: compare by canonical priority

* fix: use network byte order for peer ports

* test: more cases

* build: xcode

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* ci: test system crc32c library

---------

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2025-10-25 12:05:20 -05:00
Yat Ho
894c0859aa ci: run clang-tidy for tests (#7526)
* ci: run clang-tidy for tests

* fix: clang-tidy warnings

* ci: run clang-tidy only when needed
2025-10-15 19:21:34 -05:00
Yat Ho
518816ccc5 ci: use qt6 in ci (#7627) 2025-10-14 12:48:02 -05:00
Mike Gelfand
1aebc3c0cb Simplify logic around gettext/libintl use (#7582)
* Simplify logic around gettext/libintl use

Use CMake-provided FindIntl module to look for the library and includes. Don't
check for functions existence, both `gettext()` and `ngettext()` are available
for ages now. Remove Windows- and Mac-specific logic, always use the functions
if found and ENABLE_NLS is set to ON; for rare cases where their use is
unwanted, one could set CMAKE_DISABLE_FIND_PACKAGE_Intl to ON.

* Don't install/use gettext from Homebrew for universal Mac builds

Homebrew doesn't support universal libraries/binaries, hence only an unsuitable
pure-arm64 library is being installed, leading to build failure as a result.

Since it seems that gettext is still being installed as a dependency for some
other package(s), pass CMAKE_DISABLE_FIND_PACKAGE_Intl to guarantee it's not
being used.
2025-05-02 14:31:58 +01:00
Dzmitry Neviadomski
7e87adcd91 Fix building transmission with C++23 (#6832)
* fix: operator== should return bool in tr_strbuf

Fixes build error with C++20/C++23

error: return type 'auto' of selected 'operator==' function for rewritten '!=' comparison is not 'bool'

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: explicitly specify Blocklist::size() return type as size_t

Fixes building with C++20/C++23
error: no matching function for call to 'size'
function 'size' with deduced return type cannot be used before it is defined

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: wrap runtime format strings with fmt::runtime in library, daemon and cli

fmt::format_string ctor is consteval with C++20
See https://github.com/fmtlib/fmt/issues/2438

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: wrap runtime format strings with fmt::runtime for GTK client

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: allow to override C and CXX standard via cmdline or env

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: add job to check if transmission compiles with C++23

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Address code review by mikedld

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix new found fmt build errors

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Address code review by tearfur

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: make tr_net_init_mgr singleton buildable with C++23

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

---------

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-10 13:08:57 -05:00
Charles Kerr
de782e4315 ci: use Ubuntu 22.04 runner instead of Ubuntu 20.04 runner (#7465)
the latter is deprecated; see https://github.com/actions/runner-images/issues/11101
2025-03-04 11:12:51 -06:00
Yat Ho
510286f419 ci: remove macos pkgconf workaround (#7273)
Xref: 1074c30e60
2024-12-09 16:32:14 -06:00
Cœur
43f5ca8e0c CI: updrading deprecated macOS 12 to macOS 13 (#7275) 2024-12-08 22:57:18 -06:00
Yat Ho
27955a9c8a fix: CI errors related to REBUILD_WEB (#7252)
* ci: bump debian image from 11 to 12

debian 11 has npm 7.5.2, which is lower than our minimum required version 8.0.307.

* build: find `npm.cmd` on Windows

* chore: trigger CI

* Revert "chore: trigger CI"

This reverts commit adc8f4ec981c94c4eab3c1499ea0c555f554a1d2.

* Revert "ci: bump debian image from 11 to 12"

This reverts commit 4730d350b3789ec8ab750ff57e713a59c3389831.

* ci: use `actions/setup-node` in debian 11

* ci: don't test `REBUILD_WEB` if only `libtransmission` changed

* ci: don't test `REBUILD_WEB` if only `third-party` changed
2024-11-24 19:51:13 -06:00
Cœur
1074c30e60 fix: macOS CI (#7254)
* fix macOS CI

* adding `--formulae`
2024-11-21 13:34:34 -06:00
Yat Ho
836e020853 ci: test REBUILD_WEB=ON (#7242) 2024-11-18 11:15:07 -06:00
Cœur
64cf3a236a ci: fix macos-12-x86_64-from-tarball from GitHub workflows (#7169) 2024-10-20 11:44:43 -05:00
Cœur
d9d87eddd8 Bumping MACOSX_DEPLOYMENT_TARGET to 11.0 (#6911)
* Bumping MACOSX_DEPLOYMENT_TARGET to 11.0

* removing obsolete code and resources

* Add a build action for Transmission.xcodeproj

* removing obsolete code
2024-08-22 15:07:17 -05:00
Mike Gelfand
c21ee87eea Add CI configuration for clang-tidy on Windows (#6997)
* Add CI configuration for clang-tidy on Windows

* Fix issues reported by clang-tidy on Windows

* Workaround clang-tidy defects on Windows

* Fix C-style casts (which clang-tidy didn't report)
2024-07-16 22:13:29 +01:00
Yat Ho
1f10c50979 ci: bump clang-tidy from 14 to 18 (#6923)
* ci: bump `clang-tidy` from 14 to 18

`clang-tidy-14` has been crashing when being run on `peer-mgr.cc` since 96de1706af.

According to https://github.com/llvm/llvm-project/issues/95631, upgrading to `clang-tidy-18` fixes this.

* chore: workaround clang-tidy false positives

* fix: limit nolint comment scope

* code review: try avoiding false positive without nolint
2024-06-15 21:06:37 +01:00