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

CI/CD: Add ccache to native builds #1670

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

CI/CD: Add ccache to native builds #1670

wants to merge 1 commit into from

Conversation

Flole998
Copy link
Member

No description provided.

Copy link

@prplex prplex bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. Posted 3 comments.

@@ -189,6 +189,11 @@ jobs:
if: startsWith(matrix.container, 'i386') || matrix.container == 'debian:stretch'
- name: Workaround safe directory
run: git config --global --add safe.directory /__w/tvheadend/tvheadend
- name: ccache
uses: hendrikmuhs/[email protected]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that ccache is being used to improve build times. This is a good addition, but the 'save' option is set to 'false' here. If we don't save the ccache after a build, the cache won't persist after this job, thus missing the very purpose of ccache. Please consider setting 'save: true' to leverage ccache effectively.

@@ -221,6 +226,11 @@
- uses: actions/checkout@v1
- name: Workaround safe directory
run: git config --global --add safe.directory /__w/tvheadend/tvheadend
- name: ccache
uses: hendrikmuhs/[email protected]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, the 'save' option in ccache is set to 'false'. Consider setting it to 'true' for better utilization of ccache.

- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.container }}
- name: build
run: AUTOBUILD_CONFIGURE_EXTRA=--enable-ccache\ --enable-ffmpeg_static\ --enable-hdhomerun_static\ --python=python3 ./Autobuild.sh ${{ (startsWith(matrix.container, 'i386') && '-a i386') || '' }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For better maintainability, consider moving such complex commands into a script file instead of having them inline.

Be aware that enabling ccache in the project might not result in build speed improvements if the nature of the project results in a low ccache hit rate.

@Flole998 Flole998 added the CI label Mar 10, 2024
Copy link

sonarcloud bot commented Mar 15, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

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

Successfully merging this pull request may close these issues.

None yet

1 participant