Skip to content

Conversation

@pinam45
Copy link
Contributor

@pinam45 pinam45 commented Aug 27, 2020

Fixing #84, here is a pretty complete CI config for Windows / Linux / macOS with Visual Studio / Xcode / gcc / clang in most versions, feel free to comment or remove any system in the configs that you are not interested in.

In every configurations the main steps are:

  • Install build tools (cmake, ninja, ccache, gcc, clang, ...) depending on the config
  • Install SFML dependencies (Linux only, SFML repository embed all dependencies for Windows and macOS)
  • Download, configure, build, install SFML
  • Download Dear ImGui
  • Configure imgui-sfml
  • Build imgui-sfml

Except for Visual Studio on AppVeyor, every build uses ccache and a cache system depending on the provider to keep the cache between builds, it is especially usefull for SFML as most of the source files doesn't change most of the time.

Yeah I wanted the Github Actions build config to work on Windows, Linux and macOS at the same time so I made the scripts in cmake to havoid aving to do it in bash and then again in Powershell.

@eliasdaler
Copy link
Contributor

This is pretty incredible, thank you. I'll take a deeper look into it soon
Did you use any "template" configuration for this which I can diff with so that I can only check the specifics?

@pinam45
Copy link
Contributor Author

pinam45 commented Aug 28, 2020

Not really, I took the config of my dynamic_bitset which I made through a lot of experimentations, adapted it for imgui-sfml and added "older" C++11 compliant compiler versions as my original config was for C++17. I made a lot of improvements to the GitHub Actions config and added the cache system to the Travis config, I think I will also implement them in my dynamic_bitset configs.

If I remember well when I made the original config I found a lot of good ideas for the Github Actions config in this article: https://cristianadam.eu/20191222/using-github-actions-with-c-plus-plus-and-cmake/ and started the AppVeyor and Travis config with parts of the ones from https://github.com/nlohmann/json.

I enabled the 3 CI services on my fork (up-to-date with the main repository), so you can see what should happen If you merge the modification here:

  • GitHub Actions: Build status
  • Travis: Build status
  • AppVeyor: Build status

You can even see my most recent trial and error if you dig in the build history.

@eliasdaler
Copy link
Contributor

Okay, I see, thanks a lot!
After looking at it, this looks great. Merging...

@eliasdaler eliasdaler merged commit 5ab660a into SFML:master Sep 1, 2020
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.

2 participants