-
I just posted this to the setup-msys2 issue tracker, but I thought I’d bounce it off the folks here as well: So, I’m kind of banging my head against a wall with something, and I wanted to see if anyone has any clever solutions. I have a project which builds in CMake, and the So, I have a workflow written with build steps that are largely shared between all platforms in the matrix. (Each OS has its own dependency step, gated with an To differentiate the
The problem is, I can’t think of any way to do the same thing for the MSYS2 shell. If I wanted to take advantage of the “Default shell” option from the README, I’d end up setting it as the default for every shell, including the ones that run on Linux and macOS, which obviously won’t work! I’ve tried 100 different ways to conditionalize the setting, and they all failed:
At this point I feel like I’ve exhausted all possibilities. Any suggestions, or do I really have to take my nice, cross-platform workflows and duplicate all of the run steps, just so I can get Windows to run them using the correct shell? 😞 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Over at my setup-msys2 issue, we did some brainstorming and finally came up with this, which works unexpectedly well. It uses what appears to be undocumented syntax for the
|
Beta Was this translation helpful? Give feedback.
Over at my setup-msys2 issue, we did some brainstorming and finally came up with this, which works unexpectedly well.
It uses what appears to be undocumented syntax for the
matrix
context in the Actions yaml, and its contents will get flagged as containing syntax errors by Github’s web workflow editor. Nevertheless, it works exactly as you’d hope it would. All credit to @eine for coming up with the necessary matrix config wizardry.