setup-msys2
setup-msys2 copied to clipboard
export variables with msys environment path, and add options to append to PATH variable
Hi,
I would like to use this action to build the hdf5 rust crate against a msys2 package for HDF5.
Things I would like to request for this github action:
- I want to use the default shell, and extend the PATH environment variable with the bin folder in the msys2 installation. Is this possible to add to this action? So not using the msys2 shell, but having the PATH environment variable extended by the setup-msys2 action?
- An exported variable with the location of the msys2 installation. For now, I must manually specify a path to the installation to find HDF5. Specifically, I need to set
HDF5_DIR=D:\a\_temp\msys64\mingw64, for theD:\a\_temp\msys64\mingw64part I would like to be able to use some sort of variable.
Is not it possible to build the whole hdf5 rust crate in msys2's mingw environment? It may not require those path manipulation. We've rust package also.
You can get the location of the MSYS2 installation by executing cygpath -m /. See https://github.com/msys2/setup-msys2/runs/6554920729?check_suite_focus=true#step:5:7 and https://github.com/msys2/setup-msys2/blob/main/.github/workflows/Test.yml#L399.
As commented in https://github.com/msys2/setup-msys2/pull/228#issuecomment-1135896940, I added a couple of examples to show how to save the MSYS2 root location to a variable, either from powershell or from python: https://github.com/msys2/setup-msys2/blob/066de4c88c57fc6eab4f261ae558c6a567bbe372/.github/workflows/Test.yml#L400-L408