-
Notifications
You must be signed in to change notification settings - Fork 946
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
[question] How can I not export sources when creating a package and publishing it #16218
Comments
Hi @midhun1998 Thanks for your question. We'd need to know more about the Note that the local flow (source + build + export-pkg) is more a development flow, but not that intended for CI. The reproducibility will be lower and the possibility of doing more efficient CI is lost too. Also, the recommended approach for having recipes that can build for authorized users and avoid code access for non-authorized users is https://docs.conan.io/en/1.64/reference/conanfile/tools/scm/git.html#example-implementing-the-scm-feature. Using the "scm" approach, the recipe captures the "url+commit" of the source, so authorized users can actually build new binaries from source when they want, while not authorized ones will only be able to use binaries, without code access. |
Thanks for quick reply, @memsharded !
I double-checked and I don't see
So, Does this mean the right flow is to run
Thanks for pointing me in the right direction! 🙂 Here is a redacted version of
To give more clarity, Here is the log of
|
Yes,
You can add the specific tests in the
Yes, the "scm" approach is for packages that the recipe and the sources are in the same repository, still don't want to
Just to make sure, this is only valid if you are using
There is some detail missing in your recipe. The logs clearly indicate that your recipe has an |
What is your question?
Hi @memsharded ,
I'm currently using Conan
1.64
and I would like to understand how can I not export the sources when creating a package?Background and Requirement
Currently, We have a CI pipeline that leverages workspace-specific
CONAN_USER_HOME
and this is passed on as an artifact to other steps. We noticed that afterconan export-pkg
the local conan cache size increases significantly due to sources and object files being copied to the local cache. We would like to prevent building from sources in our packages due to 2 main reasons:Here are the steps done in our CI pipeline to build and publish the package to Artifactory:
conan source
conan install --profile CUSTOM_PROFILE
conan build
conan export-pkg
conan test
conan upload
I believe as part of
conan export-pkg
the sources are also being exported. I tried addingbuild_policy=never
. I also don't haveexport_sources()
function defined explicitly. I read through the docs and couldn't figure out how I could prevent the sources from being exported.Your help is appreciated! 😇
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: