CI: Build with MINGW64 and CLANG64 environments of MSYS2. #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-windows-mingw | ||
on: | ||
workflow_dispatch: | ||
push: | ||
pull_request: | ||
concurrency: ci-windows-mingw-${{ github.ref }} | ||
jobs: | ||
windows-mingw: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
strategy: | ||
# Allow other runners in the matrix to continue if some fail | ||
fail-fast: false | ||
matrix: | ||
msystem: [MINGW64, CLANG64] | ||
steps: | ||
- name: checkout repository | ||
uses: actions/checkout@v4 | ||
- name: install dependencies | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: ${{ matrix.msystem }} | ||
update: true | ||
install: >- | ||
base-devel | ||
git | ||
pacboy: >- | ||
cc:p | ||
fc:p | ||
cmake:p | ||
openblas:p | ||
parmetis:p | ||
- name: configure | ||
run: | | ||
mkdir ${GITHUB_WORKSPACE}/build | ||
cd ${GITHUB_WORKSPACE}/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=OFF \ | ||
.. | ||
- name: build | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/build | ||
cmake --build . -j$(nproc) | ||
- name: install | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/build | ||
cmake --install . | ||
- name: check | ||
id: run-ctest | ||
timeout-minutes: 150 | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/build | ||
ctest -L quick -j$(nproc) | ||
- name: re-run tests | ||
if: always() && (steps.run-ctest.outcome == 'failure') | ||
timeout-minutes: 60 | ||
run: | | ||
cd ${GITHUB_WORKSPACE}/build | ||
echo "::group::Re-run failing tests" | ||
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::" |