-
From:
From my perspective, #1 is helpful, but if I have a choice between #1 and !#2, I’d prefer !#2. One can get around it, but often it requires either an additional workflow file, or a large number of excludes. Neither is particularly dry. Two examples: Ruby gems (especially compiled gems) often test on multiple versions of Ruby, and often on Ubuntu, macOS, & Windows. There are publically available builds of Ruby master, but not for all OS’s, and some require additional software installation. With other CI systems, one could simple add another job via include. This cannot be done due to #2. Also, starting with Ruby 2.6, JIT is available. With other CI, one could have 2.6 in the matrix, and add an additional JIT job via include. IOW, one job without JIT, one job with. Again, can’t easily be done… |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Since a change allowing one to add to the matrix using ‘include’ would be a breaking change, maybe add the functionality using a name like ‘additions’? |
Beta Was this translation helpful? Give feedback.
-
How about ignoring includes and writing matrix as a list? This is my old matrix for compiling application as 32 and 64 bit on linux (with gcc/clang) and windows (with VS2017/VS2019):
Other than what’s above, there was quite few ifs around to select proper compiler. And as you can guess, it was horrible. And here is current matrix:
They both do same thing and compile everything like described above. There’s even a space to add job name and platform-specific path to compiled program. And most importantly, it’s much easier to read. So yeah, nothing stops you from including configuration for steps inside matrix:
Nothing stops you from packing several steps into one either:
Sure, matrix won’t be as elegant as it is in documentation examples, steps most likely will be longer too… But instead of fighting with includes (which probably won’t change so close to end of beta anyway), or writing exclude sonets, spotted problems with build preparations have a chance to be solved inside steps, with just few ifs and ${{ }} (well… maybe more than just few…) as you can apply all kinds of crazy logic in there. And from your description of Ruby setup, it seems you need that :slight_smile: |
Beta Was this translation helpful? Give feedback.
-
The current include/exclude behavior is symmetric. It is reasonable for me. But it is different meaning from travis-ci’s include. travis-ci’s include is very usuful for me. If GithubActions add the new feature that behaves as travis-ci’s include, it’s nice. I propose the feature name |
Beta Was this translation helpful? Give feedback.
-
I believe this has been solved in actions/runner#343 |
Beta Was this translation helpful? Give feedback.
I believe this has been solved in actions/runner#343