Open newhoggy opened 1 year ago
If the program is running in msys2 shell it would not require to add paths manually.
Thanks for this tip!
This is curious. I have in my Github Actions workflow the following:
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }}
I didn't write this myself, but this used to work - but maybe it doesn't do what I hope it is meant to do?
The trouble I have is I'd like to write the steps in a way that works across platforms (Linux, MacOS Windows), but if I have to specify shell: msys2
, this won't work for non-Windows OSes, which forces me to duplicate all my steps so they work between Windows and POXIS CIs.
Is there a way to toggle the shell globally depending on my CI matrix?
@newhoggy you can use a "Params" job to generate outputs, to then be used in the matrix
, which you can consume in the defaults
.
For instance, in pyTooling/Actions:
icon
, runs-on
and shell
are defined in: `https://github.com/pyTooling/Actions/blob/main/.github/workflows/Parameters.yml#L102-L107jobs
is the expanded matrix, which is used as-is: https://github.com/pyTooling/Actions/blob/main/.github/workflows/UnitTesting.yml#L71runs-on
, shell
, etc. are consumed from the matrix:
I'm getting new behaviour where the
ghc
the compiler we are using are unable to find installed packages where it used to be able to do so.I have a work around for the problem, but feel that this should work out of the box with the work around.
I have documented my findings here: https://github.com/input-output-hk/cardano-node/issues/4614
The work around we are using is here: https://github.com/input-output-hk/cardano-node/pull/4590
I have raised this issue to start a conversation about what recent change might have occurred that would cause this change in behaviour and discuss if there are any options to make the work around unnecessary.