conan-io / conan-package-tools

Conan Package Tools. Helps with massive package creation and CI integration (Travis CI, Appveyor...)
MIT License
166 stars 71 forks source link

Optional username/channel treated differently on different OSes #479

Closed Artalus closed 3 years ago

Artalus commented 4 years ago

We attempt to use Github Actions + CPT in Conan-Center-Index fork. Most of recipes there use new convention with optional username and channel for packages, and it seems CPT is not quite ready for this:

The current working solution for us is to specify CONAN_REFERENCE for Linux builds and CONAN_CHANNEL+_USERNAME for Mac builds, but this is rather cumbersome.

Environment Details

Artalus commented 4 years ago

On a side note, it also seems that when no CONAN_STABLE_CHANNEL is provided, CPT will substitute it for stable. I am unsure if this needs any correction, since omitting username and channel have not yet become a widespread practice.

Artalus commented 4 years ago

Also, with CONAN_STABLE_BRANCH_PATTERN=... + CONAN_STABLE_CHANNEL=_ one will also get an error saying

 >> Branch detected
   >> trassir-ci
 >> Info
   >> Redefined channel by CI branch matching with 'trassir-ci', setting CONAN_CHANNEL to '_'
Traceback (most recent call last):
...
conans.errors.InvalidNameException: Specify the 'user' and the 'channel' or neither of them
Artalus commented 4 years ago

So I did some more digging and turns out the problem is not Linux-specific, but Docker-specific. The issue was CONAN_USERNAME being discarded instead of forwarding to Docker. I made a PR fixing this.

uilianries commented 3 years ago

Fixed by #522

Should be available on CPT 0.35.1