Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI scripts #22351

Merged
merged 2 commits into from
Mar 3, 2025
Merged

Improve CI scripts #22351

merged 2 commits into from
Mar 3, 2025

Conversation

Chocobo1
Copy link
Member

@Chocobo1 Chocobo1 commented Mar 1, 2025

  • GHA CI: tweak cache size
    It seems ~500MB is enough to cache all the build artifacts but we still make it a bit larger to avoid thrashing.
  • GHA CI: shorten Windows CI build time
    Now vcpkg caches b2 tool. Boost doesn't need the exact b2 version to generate the cmake files.

Chocobo1 added 2 commits March 1, 2025 16:12
It seems ~500MB is enough to cache all the build artifacts but we still
make it a bit larger to avoid thrashing.
Now vcpkg caches b2 tool. Boost doesn't need the exact b2 version to generate the cmake files.
@Chocobo1 Chocobo1 added the CI Issues/PRs related to CI label Mar 1, 2025
@Chocobo1 Chocobo1 requested a review from a team March 1, 2025 08:17
@xavier2k6
Copy link
Member

xavier2k6 commented Mar 1, 2025

@Chocobo1 Just thought of something If microsoft/vcpkg#42678 gets merged, then that may be problematic for RC_1_2 libtorrent builds due to the deprecations contained in Boost 1.87.0

I've tried to limit macOS in libtorrent RC_1_2 to Boost 1.85.0 but boost-build from homebrew will download 1.87.0 versions leading to issues.
See: arvidn/libtorrent#7896 (WIP)

More context on Boost issue: arvidn/libtorrent#7875

Perhaps a stand-alone release can be used from https://github.com/bfgroup/b2/releases ?

@Chocobo1
Copy link
Member Author

Chocobo1 commented Mar 1, 2025

Just thought of something If microsoft/vcpkg#42678 gets merged, then that may be problematic for RC_1_2 libtorrent builds due to the deprecations contained in Boost 1.87.0

Don't worry, it won't affect us. This is like using a newer cmake.exe to run an older CMakeLists.txt which should be compatible.

I've tried to limit macOS in libtorrent RC_1_2 to Boost 1.85.0 but boost-build from homebrew will download 1.87.0 versions leading to issues.
See: arvidn/libtorrent#7896 (WIP)

The PR is different to qbt CI so we won't face the same problem. You could try to limit boost-build to 1.85 in that PR.

More context on Boost issue: arvidn/libtorrent#7875

It will probably never be resolved IMO. Despite the code changes there might be ABI compatibility concerns that comes along.

Perhaps a stand-alone release can be used from https://github.com/bfgroup/b2/releases ?

I checked their releases and they didn't provide a pre-built b2.exe which we required.

@glassez
Copy link
Member

glassez commented Mar 1, 2025

I checked their releases and they didn't provide a pre-built b2.exe which we required.

I wonder why we need b2 at all. After all, we use header-only Boost libraries.

@Chocobo1
Copy link
Member Author

Chocobo1 commented Mar 2, 2025

I wonder why we need b2 at all. After all, we use header-only Boost libraries.

It is required to generate cmake files.
As for why we need those cmake files from boost source, see: https://cmake.org/cmake/help/latest/policy/CMP0167.html

@userdocs
Copy link
Contributor

userdocs commented Mar 2, 2025

As far as I understood this, the header files are in the archive/boost directory and are just copied to a created include when you generate headers and the only time I need to generate headers is when cloning from Github, which I avoid doing unless there is no fallback.

Here is me building with no header generation qbittorrent desktop and nox on Debian based using latest cmake with no issue.

https://github.com/userdocs/qbittorrent-crossbuild/blob/main/.github/workflows/qbittorrent_crossbuild.yml#L247-L248

None of my builds require me to use b2 unless 1: i'm using b2 to build libtorrent or 2: i cloned boost from github.

As far as I can see you do neither of those and could just link to the boost folder. Unless i'm missing something here as to why header are generated.

@Chocobo1 Chocobo1 merged commit 96295ad into qbittorrent:master Mar 3, 2025
15 checks passed
@Chocobo1 Chocobo1 deleted the ci_tweak branch March 3, 2025 13:28
@Chocobo1
Copy link
Member Author

Chocobo1 commented Mar 3, 2025

Here is me building with no header generation qbittorrent desktop and nox on Debian based using latest cmake with no issue.
https://github.com/userdocs/qbittorrent-crossbuild/blob/main/.github/workflows/qbittorrent_crossbuild.yml#L247-L248

BOOST_INCLUDEDIR is from FindBoost module so it will have the same problem as #22315.

@userdocs
Copy link
Contributor

userdocs commented Mar 3, 2025

I build with this

https://github.com/userdocs/cmake-crossbuild/releases/tag/3.31.5_1.12.1

If it was removed in 3.30 how can it be the same issue?

@userdocs
Copy link
Contributor

userdocs commented Mar 3, 2025

So I removed the BOOST_INCLUDEDIR and set it like this. Without the CMAKE_PREFIX_PATH to the extracted boost archive dir it will fail

https://github.com/userdocs/qbittorrent-crossbuild/blob/main/.github/workflows/qbittorrent_crossbuild.yml#L247

It builds ok https://github.com/userdocs/qbittorrent-crossbuild/actions/runs/13640403413

This would be using policy CMP0167 new, right, and not using FindBoost ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Issues/PRs related to CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants