setup-cpp for c++11, c++14 and c++17

I’m trying to get my head around how to do this. I got it working, but I’m not sure it’s right.

So, I created https://github.com/kurocha/setup-cpp which was pretty complicated for what basically amounts to two shell commands.

  1. Can it be improved? Why can’t I just write shell commands? e.g. using: shell or something in actions.yml.

  2. It seemed to fail when I just used “kurocha/setup-cpp” rather than “kurocha/setup-cpp@master”. But the documentation seems to imply the former should be okay (and the same as the latter?).

  3. How do you export environment variables to subsequent steps?

Then, I used it here: https://github.com/kurocha/images/runs/242576250

For the most part, it seems to be working. However, I wanted to roll all the setup steps into a single action/package to avoid duplication as I roll this out over ~50 other repos. Can you make a meta-action that includes other actions? Or should I just make a template and live with that?

  1. Is there any way to save and access meta-data from the build run? I’d love to store coverage and timing information in a YAML artefact which I could aggregate and/or check over time.

  2. The badge uses the Verdana font which isn’t available by default on Linux and looks weird. Maybe a bug?

Okay, I did some more digging and found some answers to my own questions:

  1. I used @actions/exec for executing commands which is a bit simpler but still kind of heavy. I didn’t know I needed to commit node_modules which seemed weird at first.

For the rest, I’m still interested in answers/feedback.

1 Like