Closed noctera closed 3 years ago
I found out that the conanfile is lying in /home/runner/work/vocascan-server/vocascan-server/conanfile.txt
but Conan is searching it in /home/runner/work/vocascan-server/conanfile.txt
Does anybody know how to specify the path of the file when executing the command?
First a warning: read the warning. The default profile is using libstdc++, not libstdc++11 which is likely your default. You might want to run $ conan profile update settings.compiler.libcxx=libstdc++11 default
, but the recommended way for production is to use your own profiles (maybe managed in a git repo and installed with conan config install
)
The path when you execute the command
conan install -s compiler.libcxx=libstdc++11 .. --build=missing
Is the two dots ..
, which means the parent folder of the current folder in which the command is being executed. That parent folder must contain either a conanfile.py
or a conanfile.txt
, otherwise it will error.
That is a path to the folder or conanfile, you can do things like:
conan install /absolute/path/to/folder -s compiler.libcxx=libstdc++11 --build=missing
conan install /absolute/path/to/folder/conanfile.txt -s compiler.libcxx=libstdc++11 --build=missing
conan install /absolute/path/to/folder/myconanfile.txt -s compiler.libcxx=libstdc++11 --build=missing
conan install ../relative/to/folder -s compiler.libcxx=libstdc++11 --build=missing
conan install ../relative/to/folder/conanfile.txt -s compiler.libcxx=libstdc++11 --build=missing
Please let me know if this helps, doesn't seem a bug, but a confusion with the folders and current working directory.
Sorry for labelling it as a bug, it was totally my fault. Github Actions is always returning to the root directory after every executed command. So I have to write cd build && conan install .....
(together with &&) instead of separated.
Thanks for your help and the tipp with the profiles :)
Oh, yes, I see, indeed, I didn't realize that Github actions don't keep the cwd, so yes, you would need to do that.
If that is solved, please close the issue, and don't hesitate to open new ones for further questions. Thanks!
I want to setup a workflow with Github Actions, but unfortunately conan is telling me that it didn't find my conanfile.txt although it is showing up when executing ls
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
I'm using this Github Action script
As you can see I'm installing conan with
pip install
, create a build folder, cd into it and callconan install
as the introduction page in the Documentation tells. This works when running it on my lokal machine, but when executing these commands in Github Actions conanfile.txt can't be foundLogs (Executed commands with output) (Include/Attach if Applicable)
The output of
- run: conan install -s compiler.libcxx=libstdc++11 .. --build=missing
is:Or if you want to see the whole Github Actions Log see this I hope someone can help me with my problem. Thanks in advance :)