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

CI examples #7

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
Draft

CI examples #7

wants to merge 10 commits into from

Conversation

memsharded
Copy link
Member

No description provided.

Copy link
Member Author

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is failing, because it needs the changes in conan-io/conan#10744 first

Copy link
Contributor

@lasote lasote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic

Comment on lines 15 to 90
// ARCHITECTURES
#ifdef _M_X64
std::cout << " ai/" << PKG_VERSION << ": _M_X64 defined\n";
#endif

#ifdef _M_IX86
std::cout << " ai/" << PKG_VERSION << ": _M_IX86 defined\n";
#endif

#if __i386__
std::cout << " ai/" << PKG_VERSION << ": __i386__ defined\n";
#endif

#if __x86_64__
std::cout << " ai/" << PKG_VERSION << ": __x86_64__ defined\n";
#endif

// Libstdc++
#if defined _GLIBCXX_USE_CXX11_ABI
std::cout << " ai/" << PKG_VERSION << ": _GLIBCXX_USE_CXX11_ABI "<< _GLIBCXX_USE_CXX11_ABI << "\n";
#endif

// COMPILER VERSIONS
#if _MSC_VER
std::cout << " ai/" << PKG_VERSION << ": _MSC_VER" << _MSC_VER<< "\n";
#endif

#if _MSVC_LANG
std::cout << " ai/" << PKG_VERSION << ": _MSVC_LANG" << _MSVC_LANG<< "\n";
#endif

#if __cplusplus
std::cout << " ai/" << PKG_VERSION << ": __cplusplus" << __cplusplus<< "\n";
#endif

#if __INTEL_COMPILER
std::cout << " ai/" << PKG_VERSION << ": __INTEL_COMPILER" << __INTEL_COMPILER<< "\n";
#endif

#if __GNUC__
std::cout << " ai/" << PKG_VERSION << ": __GNUC__" << __GNUC__<< "\n";
#endif

#if __GNUC_MINOR__
std::cout << " ai/" << PKG_VERSION << ": __GNUC_MINOR__" << __GNUC_MINOR__<< "\n";
#endif

#if __clang_major__
std::cout << " ai/" << PKG_VERSION << ": __clang_major__" << __clang_major__<< "\n";
#endif

#if __clang_minor__
std::cout << " ai/" << PKG_VERSION << ": __clang_minor__" << __clang_minor__<< "\n";
#endif

#if __apple_build_version__
std::cout << " ai/" << PKG_VERSION << ": __apple_build_version__" << __apple_build_version__<< "\n";
#endif

// SUBSYSTEMS

#if __MSYS__
std::cout << " ai/" << PKG_VERSION << ": __MSYS__" << __MSYS__<< "\n";
#endif

#if __MINGW32__
std::cout << " ai/" << PKG_VERSION << ": __MINGW32__" << __MINGW32__<< "\n";
#endif

#if __MINGW64__
std::cout << " ai/" << PKG_VERSION << ": __MINGW64__" << __MINGW64__<< "\n";
#endif

#if __CYGWIN__
std::cout << " ai/" << PKG_VERSION << ": __CYGWIN__" << __CYGWIN__<< "\n";
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May we remove all this code for the libraries?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I thought so, didn't do it yet, because it could be useful for users running this example in other platforms. But sure, maybe better to simplify.

# Just create a project with a cool dependency graph, and
# and 2 consuming applications, everything with version ranges
print("- Part 1: Setup the project initial state -")
run('conan remove "*" -f') # Make sure no packages from last run
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just remove the libraries that take part in this example? One can run this example locally and accidentally removing all the conan cache

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a good approach could be to setup a CONAN_HOME to run this, to keep things clean too.
I still need to figure out a few things, like uploading the packages, and the final build->develop package promotion in Artifactory, this would be related, maybe I need to figure out a couple of different CONAN_HOMEs to really mimic a distributed environment.

@czoido
Copy link
Contributor

czoido commented Mar 10, 2022

I think the set of operations done in this example is enough to start to understand the basic tools you have in Conan to setup your ci flows. Just some comments if you consider they could be useful:

  • Could we rename matrix to math and physx that is an actual sdk to physics? Also I had sometimes difficulties figuring the connections between the different libraries... for me it was not so natural that gameserver dependend on physx, maybe if it was on network or something like that...
  • Could we add for each step a more detailed explanation and also what the person that executes those steps should have learned while doing it? Also an ASCII graph of the dependencies and applications would be nice.
  • Before we merge I think we should put the example in a more meaningful location or at least less generic than examples/ci/game

@memsharded
Copy link
Member Author

memsharded commented Mar 10, 2022

Could we rename matrix to math and physx that is an actual sdk to physics? Also I had sometimes difficulties figuring the connections between the different libraries... for me it was not so natural that gameserver dependend on physx, maybe if it was on network or something like that...

I started using math and it was very problematic because it was colliding with the system math.h. Then I could start renaming the files and libraries inside the math package for something different, but it didn't look great. I am fine with renaming "physics", or using any other package name. The thing is that "network" depending on "matrix" didn't have much sense either, and I wanted to have that diamond. So suggestion welcome

Could we add for each step a more detailed explanation and also what the person that executes those steps should have learned while doing it? Also an ASCII graph of the dependencies and applications would be nice.

Yes, the documentation, slides, graph, etc will follow. I wanted to make sure the proposed CI flow makes sense first. I don't think the docs in the run_example.py should be more exhaustive, but in the main Conan docs.

Before we merge I think we should put the example in a more meaningful location or at least less generic than examples/ci/game

Agree, to discuss where.

@czoido
Copy link
Contributor

czoido commented Mar 10, 2022

Could we rename matrix to math and physx that is an actual sdk to physics? Also I had sometimes difficulties figuring the connections between the different libraries... for me it was not so natural that gameserver dependend on physx, maybe if it was on network or something like that...

I started using math and it was very problematic because it was colliding with the system math.h. Then I could start renaming the files and libraries inside the math package for something different, but it didn't look great. I am fine with renaming "physics", or using any other package name. The thing is that "network" depending on "matrix" didn't have much sense either, and I wanted to have that diamond. So suggestion welcome

Oh, I see... Let's keep it as is for the moment and take a moment to do some brainstorming before merging and see if we come up with something very intuitive.

Could we add for each step a more detailed explanation and also what the person that executes those steps should have learned while doing it? Also an ASCII graph of the dependencies and applications would be nice.

Yes, the documentation, slides, graph, etc will follow. I wanted to make sure the proposed CI flow makes sense first. I don't think the docs in the run_example.py should be more exhaustive, but in the main Conan docs.

Yes, I meant to make it easier to review this kind of PR, just some basics of what you are trying to teach for each step would be very helpful when reviewing at least.

@czoido
Copy link
Contributor

czoido commented Mar 11, 2022

What about a dumb/simplegame that does not depend on the AI, just have some graphics? Like this:

image

Maybe it's a bit more intuitive?

@franramirez688
Copy link
Contributor

Great job @memsharded
About the discussion of the names, what about this diagram? Perhaps, it's a bit more intuitive:

image

@czoido
Copy link
Contributor

czoido commented Mar 11, 2022

Great job @memsharded About the discussion of the names, what about this diagram? Perhaps, it's a bit more intuitive:

image

I like the simpleplot idea, but I would keep mathlib that is a typical one for this kind of applications

@franramirez688
Copy link
Contributor

I like the simpleplot idea, but I would keep mathlib that is a typical one for this kind of applications

As discussed before:

image

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 this pull request may close these issues.

None yet

4 participants