From 8d58c1ac1d104d96af0ea1ed5acd14a7779786f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Fri, 21 Jun 2024 18:27:17 +0200 Subject: [PATCH 1/3] CI: Setup workflow for MSYS2 CLANG64 --- .github/workflows/jobs.yml | 54 ++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 8 deletions(-) diff --git a/.github/workflows/jobs.yml b/.github/workflows/jobs.yml index a1c05f34..1abf502f 100644 --- a/.github/workflows/jobs.yml +++ b/.github/workflows/jobs.yml @@ -251,6 +251,16 @@ jobs: make check windows_latest_cmake: runs-on: windows-latest + name: MinGW-w64 ${{ matrix.msystem }} INTERFACE64=${{ matrix.int64 }}/MPI=${{ matrix.mpi }} + strategy: + fail-fast: false + matrix: + msystem: [UCRT64, CLANG64] + int64: [ON, OFF] + mpi: [ON, OFF] + exclude: + - int64: ON + mpi: ON defaults: run: # Use MSYS2 as default shell @@ -260,15 +270,27 @@ jobs: uses: msys2/setup-msys2@v2 with: update: true - msystem: MINGW64 + msystem: ${{ matrix.msystem }} install: >- base-devel git - mingw-w64-x86_64-cmake - mingw-w64-x86_64-ninja - mingw-w64-x86_64-gcc-fortran - mingw-w64-x86_64-openblas - mingw-w64-x86_64-msmpi + pacboy: >- + cmake:p + ninja:p + cc:p + fc:p + - name: Install OpenBLAS and MS-MPI from MSYS2 + run: | + if [[ ${{ matrix.int64 }} != ON ]]; then + pacboy -S openblas:p --noconfirm + else + pacboy -S openblas64:p --noconfirm + fi + if [[ ${{ matrix.mpi }} = ON ]]; then + # This installs only the link library. + # The actual library will be installed in the next step. + pacboy -S msmpi:p --noconfirm + fi - name: Install MS-MPI (for mpiexec) uses: mpi4py/setup-mpi@v1 - name: Clone and check out repository code @@ -283,10 +305,26 @@ jobs: - name: Run job run: | mkdir -p build && cd build - cmake -GNinja -DICB=ON -DEXAMPLES=ON -DMPI=ON .. + echo "::group::Configure" + if [[ ${{ matrix.int64 }} == ON ]]; then + _blas_lib_flag="-DBLAS_LIBRARIES=openblas_64" + fi + cmake \ + -GNinja \ + -DICB=ON \ + -DEXAMPLES=ON \ + -DMPI=${{ matrix.mpi }} \ + -DINTERFACE64=${{ matrix.int64 }} \ + ${_blas_lib_flag} \ + .. + echo "::endgroup::" + echo "::group::Build" cmake --build . -v + echo "::endgroup::" - name: Run tests run: | - export PATH="/c/Program Files/Microsoft MPI/Bin":$PATH # add mpiexec to msys2 path + if [[ ${{ matrix.mpi }} == ON ]]; then + export PATH="/c/Program Files/Microsoft MPI/Bin":$PATH # add mpiexec to msys2 path + fi cd build ctest --output-on-failure From ca979855b41f09f5fcf3b86ae866fef5b2edfe36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Fri, 21 Jun 2024 18:36:03 +0200 Subject: [PATCH 2/3] CI: Install Eigen on MSYS2 runners --- .github/workflows/jobs.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/jobs.yml b/.github/workflows/jobs.yml index 1abf502f..3120515a 100644 --- a/.github/workflows/jobs.yml +++ b/.github/workflows/jobs.yml @@ -279,6 +279,7 @@ jobs: ninja:p cc:p fc:p + eigen3:p - name: Install OpenBLAS and MS-MPI from MSYS2 run: | if [[ ${{ matrix.int64 }} != ON ]]; then @@ -312,6 +313,7 @@ jobs: cmake \ -GNinja \ -DICB=ON \ + -DEIGEN=ON \ -DEXAMPLES=ON \ -DMPI=${{ matrix.mpi }} \ -DINTERFACE64=${{ matrix.int64 }} \ @@ -326,5 +328,6 @@ jobs: if [[ ${{ matrix.mpi }} == ON ]]; then export PATH="/c/Program Files/Microsoft MPI/Bin":$PATH # add mpiexec to msys2 path fi + export PATH="${GITHUB_WORKSPACE}/build":$PATH # add libarpack.dll to msys2 path for tests that run in different directory cd build ctest --output-on-failure From aea67a34268e4cb1119d98c7b36b71a9bb82a2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=BCtzel?= Date: Fri, 21 Jun 2024 18:44:23 +0200 Subject: [PATCH 3/3] CI: Re-run tests on error with more output for debugging --- .github/workflows/jobs.yml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.github/workflows/jobs.yml b/.github/workflows/jobs.yml index 3120515a..e21fb4f7 100644 --- a/.github/workflows/jobs.yml +++ b/.github/workflows/jobs.yml @@ -324,10 +324,29 @@ jobs: cmake --build . -v echo "::endgroup::" - name: Run tests + id: run-ctest run: | if [[ ${{ matrix.mpi }} == ON ]]; then export PATH="/c/Program Files/Microsoft MPI/Bin":$PATH # add mpiexec to msys2 path fi export PATH="${GITHUB_WORKSPACE}/build":$PATH # add libarpack.dll to msys2 path for tests that run in different directory cd build - ctest --output-on-failure + ctest + - name: Re-run tests + if: always() && (steps.run-ctest.outcome == 'failure') + timeout-minutes: 60 + run: | + if [[ ${{ matrix.mpi }} == ON ]]; then + export PATH="/c/Program Files/Microsoft MPI/Bin":$PATH # add mpiexec to msys2 path + fi + export PATH="${GITHUB_WORKSPACE}/build":$PATH # add libarpack.dll to msys2 path for tests that run in different directory + cd build + echo "::group::Re-run ctest" + ctest --rerun-failed --output-on-failure || true + echo "::endgroup::" + echo "::group::Log from these tests" + [ ! -f Testing/Temporary/LastTest.log ] || cat Testing/Temporary/LastTest.log + echo "::endgroup::" + echo "::group::Content of arpackmm.run.log" + [ ! -f EXAMPLES/MATRIX_MARKET/arpackmm.run.log ] || cat EXAMPLES/MATRIX_MARKET/arpackmm.run.log + echo "::endgroup::"