From 997dd25accb87ca23a554327460c181268112d2d Mon Sep 17 00:00:00 2001 From: "Foad S. Farimani" Date: Tue, 16 Jul 2024 07:43:19 +0000 Subject: [PATCH 1/2] Add MSYS2 Mingw-w64 job to GitHub Actions workflow - 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 https://github.com/ElmerCSC/elmerfem/issues/494 --- .github/workflows/build.yaml | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 5ed1a98725..346c78f26a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -94,3 +94,51 @@ jobs: echo "::group::Log from these tests" [ ! -f Testing/Temporary/LastTest.log ] || cat Testing/Temporary/LastTest.log echo "::endgroup::" + + + windows-mingw: + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + + steps: + - uses: actions/checkout@v4 + + - uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: >- + git + mingw-w64-x86_64-gcc + mingw-w64-x86_64-gcc-fortran + mingw-w64-x86_64-cmake + mingw-w64-x86_64-openblas + mingw-w64-x86_64-openmpi + mingw-w64-x86_64-parmetis + make + + - name: Configure + run: | + mkdir build + cd build + cmake .. -G "MSYS Makefiles" \ + -DCMAKE_BUILD_TYPE="Release" \ + -DBLA_VENDOR="OpenBLAS" \ + -DWITH_OpenMP=ON \ + -DWITH_LUA=ON \ + -DWITH_Zoltan=OFF \ + -DWITH_Mumps=OFF \ + -DCREATE_PKGCONFIG_FILE=ON \ + -DWITH_MPI=ON + + - name: Build + run: | + cd build + cmake --build . + + - name: Test + run: | + cd build + ctest -L quick \ No newline at end of file From 8b0e6b63e52d7efd211e545a920416eaa5a60979 Mon Sep 17 00:00:00 2001 From: "Foad S. Farimani" Date: Tue, 16 Jul 2024 07:51:56 +0000 Subject: [PATCH 2/2] Update MSYS2 job in GitHub Actions workflow - 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 https://github.com/ElmerCSC/elmerfem/issues/494 --- .github/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 346c78f26a..7f2cd2130c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -115,7 +115,6 @@ jobs: mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-cmake mingw-w64-x86_64-openblas - mingw-w64-x86_64-openmpi mingw-w64-x86_64-parmetis make @@ -131,7 +130,7 @@ jobs: -DWITH_Zoltan=OFF \ -DWITH_Mumps=OFF \ -DCREATE_PKGCONFIG_FILE=ON \ - -DWITH_MPI=ON + -DWITH_MPI=OFF - name: Build run: |