29.05.2020 11:26, Sumit Jamgade пишет:
Hello,
Long running compilation can now leverage ccache[1] to speed up the build process. This feature can be enabled per package in the project config:
BuildFlags: useccahe:<packagename> example: https://build.opensuse.org/projects/home:sjamgade:branches:science:machinele...
Hello, What does happen if I branch the package with ccache enabled?
Once enabled per package, it will be enabled for all architectures and repositories. https://openbuildservice.org/help/manuals/obs-user-guide/cha.obs.prjconfig.h... (grep ccache)
--- The ccache tar file is collected only on *successful builds with changed result*. It is extracted for every build at /.ccache/ if enabled. This build artifact is not versioned and only the latest tar is stored. It can be downloaded from the webui or osc.
https://build.opensuse.org/package/binaries/home:sjamgade:branches:science:m...
osc getbinaries --ccache -M standard home:sjamgade:branches:science:machinelearning tensorflow openSUSE_Tumbleweed x86_64 _ccache.tar
osc getbinaries --ccache $prj $pkg $repo $arch _ccache.tar
This archive can be further used for local builds too.
osc build --pkg-ccache /full/path/to/_ccache.tar
(please use the latest osc) --- Ccache config file is stored in /.ccache/ccache.conf and is writable by the build user. So, it could also be disabled (or configured as per package requirements)
echo "disable = true" >> /.ccache/ccache.conf
For possible build time comparisons: https://build.opensuse.org/packages/tensorflow:standard/job_history/home:sja...
Thank you, Sumit Jamgade and OBS Team
[1] - https://ccache.dev/
PS: Some packages (eg: tensorflow) need extra plumbing in spec file to enable access to /.ccache and use of ccache cmd:
export CC_PREFIX=ccache; ln -s /.ccache/ ~/.ccache
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org