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

Add compiler cache and fix CMake deprecation warnings #2132

Merged
merged 8 commits into from
Jan 5, 2025

Conversation

Caellian
Copy link
Collaborator

@Caellian Caellian commented Jan 4, 2025

  • Fix use of deprecated exec_program.
  • Reformat 'UninstallConky.cmake.in' file.
  • Separate BUILD_TESTS (now BUILD_TESTING to shadow CTest variable) from MAINTAINER_MODE flag.
    • Remove BUILD_TESTS flag from CI, default it already true.
  • Add support for (s)ccache, enable it by default.
  • Add REPRODUCIBLE_BUILD to disable (s)ccache default.
    • Set REPRODUCIBLE_BUILD=ON in nix flake.
  • Add CI detection for possible future use, stored in ENV_IS_CI variable.
  • Minor formatting tweaks.

This commit addresses some issues raised in #2131. Namely, CMake will now produce warnings when building with MAINTAINER_MODE. And I added comments saying package maintainers shouldn't be using the MAINTAINER_MODE flag, as well as making the description more clear.

- Fix use of deprecated `exec_program`.
- Reformat 'UninstallConky.cmake.in' file.
- Separate BUILD_TESTS (now BUILD_TESTING to shadow CTest variable) from
  MAINTAINER_MODE flag.
  - Remove BUILD_TESTS flag from CI, default it already true.
- Add support for (s)ccache, enable it by default.
- Add REPRODUCIBLE_BUILD to disable (s)ccache default.
  - Set REPRODUCIBLE_BUILD=ON in nix flake.
- Add CI detection for possible future use, stored in ENV_IS_CI variable.
- Minor formatting tweaks.

Signed-off-by: Tin Švagelj <[email protected]>
@github-actions github-actions bot added sources PR modifies project sources tests related to project tests 3rdparty suggests changes to 3rd party dependencies gh-actions suggest changing GitHub actions dependencies adds or removes dependencies, or suggests alternatives build system related to build system (CMake) and/or building process/assumptions labels Jan 4, 2025
Copy link

netlify bot commented Jan 4, 2025

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit 678d130
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/677a1932ae49470008b1b381

@Caellian Caellian added the enhancement suggests alteration of existing functionality to better support different use cases label Jan 4, 2025
@Caellian Caellian force-pushed the dev/cmake-improvements branch 5 times, most recently from 23abead to 9f8a172 Compare January 5, 2025 00:10
Signed-off-by: Tin Švagelj <[email protected]>
@Caellian Caellian force-pushed the dev/cmake-improvements branch from 9f8a172 to 8b2700b Compare January 5, 2025 00:20
- Add cache action to compiler to pass cache across runs.

Signed-off-by: Tin Švagelj <[email protected]>
@Caellian Caellian force-pushed the dev/cmake-improvements branch 5 times, most recently from 00d5aa4 to 905d3ff Compare January 5, 2025 01:42
@Caellian Caellian force-pushed the dev/cmake-improvements branch 7 times, most recently from 71c0519 to 296b899 Compare January 5, 2025 02:28
Signed-off-by: Tin Švagelj <[email protected]>
@Caellian Caellian force-pushed the dev/cmake-improvements branch from 296b899 to 815c539 Compare January 5, 2025 02:31
- Print sometimes useful cache hit stats after build.

Signed-off-by: Tin Švagelj <[email protected]>
@Caellian Caellian force-pushed the dev/cmake-improvements branch from 8918ac6 to 344be5d Compare January 5, 2025 03:06
In theory, if 10 PRs make a whole bunch of pushes, it's possible one
might lose cache history and have to build from scratch.
Compression makes that less likely, but binary data is being compressed
anyway so... not that much less likely.

Signed-off-by: Tin Švagelj <[email protected]>
@Caellian Caellian force-pushed the dev/cmake-improvements branch 13 times, most recently from 4dc2e1d to e0cd00e Compare January 5, 2025 05:23
Signed-off-by: Tin Švagelj <[email protected]>
@Caellian Caellian force-pushed the dev/cmake-improvements branch from e0cd00e to 678d130 Compare January 5, 2025 05:31
@Caellian Caellian merged commit 5ee7bd1 into main Jan 5, 2025
38 checks passed
@Caellian Caellian deleted the dev/cmake-improvements branch January 5, 2025 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rdparty suggests changes to 3rd party dependencies build system related to build system (CMake) and/or building process/assumptions dependencies adds or removes dependencies, or suggests alternatives enhancement suggests alteration of existing functionality to better support different use cases gh-actions suggest changing GitHub actions sources PR modifies project sources tests related to project tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants