-
Notifications
You must be signed in to change notification settings - Fork 129
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
Update Github Action template #590
Comments
This should be equivalent: jobs:
industrial_ci:
strategy:
matrix:
ros_distro: [ melodic ]
ros_repo: [ main, testing ]
...
steps:
- ...
- uses: ros-industrial/industrial_ci@master
env:
ROS_DISTRO: ${{ matrix.ros_distro }}
ROS_REPO: ${{ matrix.ros_repo }}
- ... I haven't really found a way yet to provide 'defaults' in the Could set |
Yes, this is what I had in mind. We could extend the action to read the matrix variable and then deal with the defaults (from |
How do you like this option (#591)? jobs:
industrial_ci:
strategy:
matrix:
ROS_DISTRO: [ melodic ]
ROS_REPO: [ main, testing ]
...
steps:
- ...
- uses: ros-industrial/industrial_ci@master
with:
matrix: ${{ toJSON(matrix) }}
- ... |
Hm. I actually liked the fact you have to explicitly tell each step (and in this case the It's really obvious reading the With your proposal, you have to understand how That's of course OK, but if we can get something equivalent (and I believe the default way to do this is) and it's easier to grok, it may be preferable over saving a line (or two, or three ..). Do we expect the |
You can still do this: jobs:
industrial_ci:
strategy:
matrix:
include:
- { ROS_DISTRO: melodic }
- { ROS_DISTRO: melodic, ROS_REPO: main }
...
steps:
- ...
- uses: ros-industrial/industrial_ci@master
with
matrix: ${{ toJSON(matrix) }}
- ... Or even a mix of both. And the
The My intention was to support - uses: ros-industrial/industrial_ci@master
with
matrix: ${{ toJSON(matrix) }}
env:
CCACHE_DIR: ...
It would be great to avoid |
I'm wondering how I would create this sort of configuration with the examples above:
I only want to run clang-tidy on one of them because it takes a long time to run. |
This is not possible with a matrix, but you can include them individually. |
@tylerjw: I believe that may actually be possible using |
@ipa-mdl, @gavanderhoorn do you have a "recommended" approach in the future? I would then proceed with it. I like to keep all my configurations in line to reduce thinking when looking at them after a year or so 😄 If no and you accept votes I am for the one from the second comment. |
It depends a bit on the size of the configuration I believe. Explicitly passing all entries as env vars to your The configurations I've used and created so far were not too extensive, so what I showed in #590 (comment) still worked. I could imagine larger nrs of env vars getting unwieldy pretty quickly though, so passing the complete dict could be more efficient then. |
@destogl: That's exactly what we want to figure out in this issue ;) For IMHO for simpler cases (normal repositories) @gavanderhoorn's solution is better, because it is states exactly what's happening. |
The current matrix expansion approach works, but it is not the intended usage and results in a warning.
The text was updated successfully, but these errors were encountered: