Skip to content
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 MSYS2 job in GitHub Actions workflow #496

Closed
wants to merge 3 commits into from

Conversation

Foadsf
Copy link
Contributor

@Foadsf Foadsf commented Jul 16, 2024

  • Remove unavailable mingw-w64-x86_64-openmpi package
  • Disable MPI in CMake configuration

This change allows the MSYS2 Mingw-w64 build to proceed without
errors, though it disables MPI support. Future work may be needed
to re-enable MPI using an alternative package or build method.

relevant to #494

- Create new 'windows-mingw' job in build.yaml
- Set up MSYS2 environment using msys2/setup-msys2 action
- Install necessary packages including MinGW-w64 GCC, Fortran, CMake
- Configure build with MSYS Makefiles generator
- Build and run quick tests

This change improves Windows support by enabling builds with MSYS2 Mingw-w64,
making Elmer more accessible to Windows users without WSL or admin rights.

relevant to #494
- Remove unavailable mingw-w64-x86_64-openmpi package
- Disable MPI in CMake configuration

This change allows the MSYS2 Mingw-w64 build to proceed without
errors, though it disables MPI support. Future work may be needed
to re-enable MPI using an alternative package or build method.

relevant to #494
mingw-w64-x86_64-cmake
mingw-w64-x86_64-openblas
mingw-w64-x86_64-parmetis
make
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd probably be a good idea to install the base-devel group instead of only make.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmuetzel thanks for the comment. Do you want to share a patch or send a PR to this specific branch? I think it should be possible to give you write access to this specific branch. But I rather core devs to do that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't you make that change yourself? It shouldn't be hard.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mmuetzel fair point. But I did not explain myself properly. Given your experience it would be great if we could give you write access on some of the MSYS2 / Mingw-w64 / Windows-related branches. Of course, if you are interested.

Improve MSYS2 setup in GitHub Actions workflow

- Replace 'make' with 'base-devel' group in package installation
- This change provides a more comprehensive set of development tools,
  including make and other essential utilities for building
-DWITH_Zoltan=OFF \
-DWITH_Mumps=OFF \
-DCREATE_PKGCONFIG_FILE=ON \
-DWITH_MPI=ON
Copy link
Contributor

@mmuetzel mmuetzel Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accidentally commented on the commit instead of on the PR. So, repeating here. Sorry for the noise.

Suggested change
-DWITH_MPI=ON
-DWITH_MPI=ON \
-DMPIEXEC_EXECUTABLE="C:/Program Files/Microsoft MPI/Bin/mpiexec.exe" \

But for this to actually pass in CI, you'd need a new step to install MSMPI.
To install it locally, you can get the installer from here: https://www.microsoft.com/en-us/download/details.aspx?id=105289 (The MS server seems to be down currently.)

I haven't looked into how that could be installed in CI though...

PS: In any case, you are missing a line continuation here.

@Foadsf
Copy link
Contributor Author

Foadsf commented Jul 16, 2024

I hard reset the latest two commits on the feat/windows-msys2-build branch, moving them to fix/fortran-boz-compatibility. Sorry for the messy try and error folks.

@mmuetzel
Copy link
Contributor

I hard reset the latest two commits on the feat/windows-msys2-build branch, moving them to fix/fortran-boz-compatibility. Sorry for the messy try and error folks.

If you wait for another day or two, you'll no longer need these Fortran flags. MSYS2 should have updated the mingw-w32-*-msmpi packages by then. The update is already in their staging repository:
https://packages.msys2.org/queue

@mmuetzel
Copy link
Contributor

mmuetzel commented Jul 16, 2024

Do you know why this PR triggers the action four times each time you push a change?

msedge_EUO9i9jKkz

One is probably because it triggers on a push on your branch, the other one is for the pull request (i.e., for a merge to the base branch).
But why are there two more?

P.S. by Foad follow-up discussions here on Discord.

@raback
Copy link
Contributor

raback commented Jul 31, 2024

Great developmemts! I wonder if this would deserve its own .yaml file? See the comment here: #487 (comment)

@raback
Copy link
Contributor

raback commented Aug 1, 2024

The content of this PR has been manually copied to here:
https://github.com/ElmerCSC/elmerfem/blob/devel/.github/workflows/build-windows-mingw.yaml
Now each platform has its own .yaml file and they may be triggered independently.

The build action can be seen here:
https://github.com/ElmerCSC/elmerfem/actions/workflows/build-windows-mingw.yaml

@raback
Copy link
Contributor

raback commented Aug 2, 2024

Closing this one as the msys2 build is now successfully in the CI.

@raback raback closed this Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants