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

Conan recipe for Catch project #926

Closed
uilianries opened this issue Jun 12, 2017 · 9 comments · Fixed by #1443
Closed

Conan recipe for Catch project #926

uilianries opened this issue Jun 12, 2017 · 9 comments · Fixed by #1443

Comments

@uilianries
Copy link
Contributor

Description

I have written Conan recipes for Catch, since version 1.4.1, you can see here. However, would be nice if Catch provides its own recipe in the project.

I can help with this, starting to write the recipe.

@philsquared
Copy link
Collaborator

That's awesome - thanks @uilianries.
It's been on my list of things to do to look into automating getting Catch onto Conan.
Ideally I'd like it to be automated as part of our release scripts - do you think that's possible?

@uilianries
Copy link
Contributor Author

uilianries commented Jun 12, 2017

Sure! Conan Package Tools checks the branch name and submits to target channel. e.g. master branch is used as stable channel. So, we can use the same rule to create new releases in the recipe.

philsquared pushed a commit that referenced this issue Jun 28, 2017
Signed-off-by: Uilian Ries <uilianries@gmail.com>
@philsquared
Copy link
Collaborator

So now the recipe is in, do we need to do anything else on each release for Conan to get it?

@uilianries
Copy link
Contributor Author

Each new release will update your conan recipe, but won't create and push Catch package to Conan remote.
For each new release you need to create the package after provide the single_header and push to Conan repository.
You will need create a Bintray account.
See here for more information about Conan + Bintray.
Anyway, you could use CI (Travis/AppVeyor/Gitlab) to automate each package push. I can help to develop this feature.

@philsquared
Copy link
Collaborator

Thanks. Yes I suspected there was still an extra step.
I'd appreciate any help with that!

@uilianries
Copy link
Contributor Author

Nice!
Should I use the same issue? I could close this issue and open a new, with a appropriated description. (one issue = one feature)

@memsharded
Copy link

HI @philsquared
I think the best would be to create a "catch" organization in bintray, so you can easily bring people in it to collaborate (though in this case maintenance will be absolutely straightforward), then a repo inside the organization. Also, publishing to this repo can be done with just one CI, no need to upload from all of them, as header-only package will always be the same).

Which release approach to bintray would you like? Do you want to upload conan packages to bintray for "master", or just the tagged releases? How do you identify your releases in CI? Thanks!

@philsquared
Copy link
Collaborator

@uilianries creating a new issue is probably "how it should be done" - but I'm fine with just continuing here.

@memsharded Thanks for the guidance. A Catch "release" really just consists of updating some version numbers (which, thanks to @uilianries now updates the conanFile.py, too), "building" the single include and tagging the commit (with the form vX.X.X).
Currently the CI scripts make no distinction between a normal code change commit and a "release". If we're going to push to Conan from the CI we'd a way to identify that (for example seeing if the version file has been changed in this commit).

@uilianries
Copy link
Contributor Author

By default, Conan uses a branch pattern to identify the stable channel, we could use release tag, e.g. CONAN_STABLE_BRANCH_PATTERN=v\d+\.\d+\.\d+. So, when a new tag is created, the package will be pushed to Conan remote by Travis build.

Okay, I'll use the same issue to develop.

uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 16, 2018
- Apply new conventions introduced on Conan 1.8
- Removed outdated settings
- Update license to follow SPDX format
- Update author name

Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 16, 2018
- Add new Travis job to execute CPT when running Travis CI

Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 16, 2018
- Test package can moved to insternal conan dir
- Fix sources required for Catch2 build

Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 16, 2018
- Build and Upload Conan package when running on Travis CI
- Update gcc version on Travis
- Ignore cmake and all binaries created by test package
- Add simple test package including factorial example

Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 16, 2018
- When creating Conan package, the project license
  must be copied together

Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 16, 2018
- When building non-stable stable branch the package channel name
  could be used as testing to differ from stable one.

Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 16, 2018
- Set reference channel based on Conan channel var

Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 16, 2018
Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 16, 2018
Signed-off-by: Uilian Ries <uilianries@gmail.com>
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 17, 2018
- Update Conan recipe with Catch2 homepage -- use same address from URL
- Fix CMake project order for test package
- Remove explicit compiler version from Conan build script

Signed-off-by: Uilian Ries <uilianries@gmail.com>
horenmar pushed a commit to uilianries/Catch2 that referenced this issue Nov 19, 2018
- Apply new conventions introduced on Conan 1.8
- Removed outdated settings
- Update license to follow SPDX format

Closes catchorg#926
Closes catchorg#943
uilianries added a commit to uilianries/Catch2 that referenced this issue Nov 27, 2018
- Package channel should be changed automatically when
  matching the stable branch pattern
- Update Bintray upload address

Signed-off-by: Uilian Ries <uilianries@gmail.com>
horenmar pushed a commit that referenced this issue Nov 28, 2018
- Package channel should be changed automatically when
  matching the stable branch pattern
- Update Bintray upload address

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants