Commit Graph

90 Commits

Author SHA1 Message Date
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
Yat Ho
c36a62e171 ci: automatically regenerate package.json.buildonly (#7198) 2024-10-28 15:45:29 -05: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
Dzmitry Neviadomski
b565e076a9 chore: update older macos build verification workflow to macos-12 (#6883)
* chore: update older macos build verification workflow to macos-12

Manually set Xcode to the version was used in macos-11 runner.

See:
https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md#xcode
https://github.com/actions/runner-images/blob/main/images/macos/macos-11-Readme.md#xcode

* chore: re-enable macos-12 build verification action

* chore: disable gtk and qt clients explicitly with macos build verification

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-06-03 21:47:51 +01:00
Charles Kerr
c465575dab build: temporarily disable macos-11 sanity checks (#6858)
re-enable when brew is fixed
2024-05-25 15:59:52 -05:00
Cœur
1be53ac139 removing temporary workaround for sanitizer crashes (#6802) 2024-05-24 10:16:46 -05:00
Cœur
ded869974c ci: support macos-14 universal builds (#6626)
* support macos-14 universal builds

* Apply suggestions from code review

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

* add the arch to the job's name

* revert support macos-14 universal builds

---------

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-03-31 16:31:30 -05:00
Cœur
764f2ad85a ci: re-enable ubuntu tests (#6715)
* re-enabling ubuntu tests

* official GitHub workaround
2024-03-31 15:32:58 -05:00
Cœur
2917374159 add macos-11 to actions.yml (#6617) 2024-03-25 20:46:11 -05:00
Yat Ho
0c466b4137 ci: trigger CI when changing CI definitions (#6688)
* fix: build tests for `ubuntu-20-04-from-tarball`

* fix: build tests for `macos-12`

* feat: build apps when `actions.yml` changed

* Revert "fix: build tests for `ubuntu-20-04-from-tarball`"

This reverts commit 2925e9fa72.
2024-03-16 13:17:31 -05:00
Cœur
6a9727efc7 build: run sanitizer-tests on macOS in CI 2024-03-15 17:18:27 -05:00
Mike Gelfand
991b0f0d3d Support WiX toolset versions other than 3.11 (#6689)
Version 3.14 was recently released with security fixes, and GitHub
runners have been updated to use it. Don't hardcode the version in
Program Files directory name to support any 3.x. Since 3.x support will
be dropped within a year, need to plan migration to 5.x when it's
released (4.x isn't suitable because of missing heat replacement).
2024-03-13 16:40:41 +03:00
Mike Gelfand
52d1c1f34b Support CMake 3.28+ in CI jobs on Windows (#6668)
* Support building Qt using CMake 3.28+

CMake 3.28 dropped support for deriving installation prefix(es) based on
PATH environment variable on Windows. Since all the other built packages
already pass necessary prefix path(s) explicitly via CMAKE_PREFIX_PATH
and it works for them, do the same for Qt 6 as well. Building Qt 5 isn't
affected as it doesn't use CMake.

* Fix environment variable name in `windows` build job

Using wrong name resulted in empty `CMAKE_PREFIX_PATH` CMake setting
value, which showed the effects of CMake 3.28 changes yet again.
2024-03-05 02:53:59 +00:00
Cœur
04956c35b4 build: target clang-format version 17 (#6631) 2024-03-04 17:49:39 -06:00
Yat Ho
7a4677ebd2 ci: bump CI actions (#6666)
* chore: bump `peter-evans/create-pull-request`

* chore: bump `actions/checkout`

Breaking changes:
- Bump Node.js runtime to version 20

* chore: bump `actions/*-artifact`

Breaking changes: See https://github.com/actions/download-artifact/releases/tag/v4.0.0

* chore: bump `actions/cache`

Breaking changes:
- Bump Node.js runtime to version 20

* chore: bump `actions/setup-java`

Breaking changes:
- Bump Node.js runtime to version 20

* chore: bump `gradle/gradle-build-action`

Breaking changes:
- Remove the gradle-executable input parameter

* chore: trigger CI

* Revert "chore: trigger CI"

This reverts commit 9f9987f201.
2024-03-04 08:45:37 -06:00
Cœur
7f029acf6e remove duplicate path: Transmission.xcodeproj (#6625) 2024-02-19 00:11:34 -06:00
Geoffrey Bonneville
7030b53e2e android patches for ndk (#6024)
* android patches for ndk

* Update libtransmission/file-capacity.cc

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* TrMacros: Move common & android vars

* Build android in CI

* Use vcpkg packages for curl & openssl

* Update CI for android

* Fix ndkVersion used with gradle

* Restore actions triggers events

* CMakeLists: Remove cond where curl is not found

* Use vcpkg tag instead of commit hash

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* TrMacros.cmake: clean unused variables & add vcpkg cond

* Remove quotes around VcpkgAndroid inclusion

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* actions: split steps to install vcpkg packages

* Build for android arm64

* actions: add make-android condition

* Revert "Use vcpkg tag instead of commit hash"

This reverts commit 65819026b1.

* build.gradle: use cmake version 3.22.1

* actions: use vcpkg 2024.01.12

* actions: Add ninja-build dependency

---------

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2024-01-21 15:27:24 +00:00
Mike Gelfand
1de6e93fec Bump CodeQL to v3 (v2 is to be deprecated) (#6521) 2024-01-12 14:00:10 +00:00
Charles Kerr
b9d1b33939 build: use esbuild to bundle the web app (#6280) 2023-11-27 19:23:40 -06:00
Charles Kerr
036725df42 refactor: prefer css vars over sass (#6287)
* chore: prefer calc() over sass math module

* chore: remove unused mixins

* refactor: use css variables for symbolic color names

* refactor: use range syntax for media queries

* refactor: use css variables for symbolic dimensions, units

* refactor: use css variables for symbolic url names

* refactor: use css variables for mime icon urls

* fixup! refactor: use css variables for symbolic dimensions, units

* refactor: replace mime-icon mixin with css variables

* ci: run apt-update before apt-install
2023-11-24 11:01:00 -06:00
Julien
69ab6a07de chore: automated copyright update with GitHub Actions (#6195) 2023-11-10 14:24:16 -06:00
FX Coudert
9cadcbdb86 ci: update workflow to Qt 6 on macOS (#6206)
* Remove brew lines on Linux

* Switch to Qt 6 on macOS
2023-11-04 14:17:45 -05:00
Charles Kerr
089c438512 ci: bump macos-11 to macos-12 in github actions (#6203) 2023-11-04 12:33:25 -05:00
Mike Gelfand
c0ee65578c Bump 3rd-party deps versions used on Windows (#6192) 2023-11-01 15:09:45 +03:00
Dzmitry Neviadomski
d273e0f90e chore: fix warnings in CodeQL workflow (#6106)
- Use separate init config for JavaScript.
 - Update checkout action to v3 for node16 support.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2023-10-14 21:05:30 -05:00
Mike Gelfand
586cff9506 Switch to list view for torrents list (GTK 4) (#5858)
* Add compat operator* for RefPtr

* Rename `*_tree_view_*` button handling helpers to `*_item_view_*`

* Move torrent item colors to CSS

* Switch to list view for torrents list (GTK 4)

* Bump Fedora image to 39 (current rawhide) for GTK 4.11

Enable deprecations as there're lots of them in 4.11 and I'm not keen on
fixing them all right now. Disable warnings as errors due to
-Warray-bounds issue somewhere in libfmt.
2023-08-06 04:26:29 +01:00
tearfur
ec0567e09f fix: fix ci web cmake option (#5835) 2023-07-29 10:24:13 -05:00
Dzmitry Neviadomski
dae1bb123c fix: CI: Do not use nproc on macOS hosts. (#5833)
This is not an error, but a warning when building/running tests
with CMake/GoogleTest.
Use `sysctl -n hw.logicalcpu` to get parallelization number.

See: https://github.com/memkind/memkind/issues/33#issuecomment-540614162

No changes affecting users, so no `Notes:` here.

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2023-07-29 08:21:30 -05:00
Charles Kerr
ed3f6c2ec8 fixup! perf: use small::max_size_vector in tr_torrentGetMetadataPiece (#5830)
* fixup! perf: use small::max_size_vector in tr_torrentGetMetadataPiece() (#5768)

* enable tests for alpine CI

---------

Co-authored-by: tearfur <46261767+tearfur@users.noreply.github.com>
2023-07-28 09:53:10 -05:00
Charles Kerr
c8e84f870b ci: remove "brew update" step (#5606) 2023-06-11 16:28:43 -05:00
Charles Kerr
15c3298211 ci: do not install homebrew libnatpmp on macos 11 (#5461) 2023-04-26 22:10:42 -05:00
Mike Gelfand
ac4a793816 Uninstall preinstalled OpenSSL on Windows GHA builder (#5376) 2023-04-12 20:55:49 +01:00
Charles Kerr
74262a65c2 ci: fix Sanity/Windows GitHub Actions (#5371) 2023-04-11 18:16:16 -05:00
Charles Kerr
58ce7bd437 fix: 4.0.2 wishlist CPU perf regression pt. 1 (#5266) 2023-03-20 21:08:16 -05:00
Charles Kerr
f5a24862db fix: FTBFS in Ubuntu 20.04 / Qt 5.13 (#5238) 2023-03-16 18:59:31 -05:00
Charles Kerr
b354337720 ci: check for clang tidy errors in libtransmission (#5188) 2023-03-10 00:23:22 -06:00