Skip to content

Commit

Permalink
CI: Create an MSYS2/MinGW CMake run.
Browse files Browse the repository at this point in the history
  • Loading branch information
MehdiChinoune committed May 7, 2024
1 parent 7c100f6 commit c72360e
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/run_tests_win_mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,67 @@ jobs:
path: |
*/*.log
*/*.trs
build-and-test-cmake:

runs-on: windows-latest
strategy:
matrix:
msystem: [ MINGW64, UCRT64] #, CLANG64 ]
defaults:
run:
shell: msys2 {0}

steps:

- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
pacboy: cc:p cmake:p hdf5:p curl:p libxml2:p zlib:p blosc:p bzip2:p
install: make m4 diffutils git unzip

###
# Configure and build
###

- name: (CMake) Configure Build
run: |
LDFLAGS="-Wl,--export-all-symbols" \
cmake \
-G"MSYS Makefiles" \
-B build \
-S . \
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
-DBUILD_SHARED_LIBS=ON \
-DNETCDF_ENABLE_NETCDF_4=ON \
-DNETCDF_ENABLE_DAP=ON \
-DNETCDF_BUILD_UTILITIES=ON \
-DNETCDF_ENABLE_TESTS=ON \
-DNETCDF_ENABLE_HDF5=ON \
-DNETCDF_ENABLE_DAP=TRUE \
-DNETCDF_ENABLE_NCZARR=TRUE \
-DNETCDF_ENABLE_DAP_LONG_TESTS=TRUE \
-DNETCDF_ENABLE_PLUGINS=ON
if: ${{ success() }}

- name: (CMake) Look at CMakeCache.txt if error
run: cat build/CMakeCache.txt
if: ${{ failure() }}

- name: (CMake) Print Summary
run: cat build/libnetcdf.settings

- name: (CMake) Build All
run: cmake --build build -j$(nproc)
if: ${{ success() }}

- name: (CMake) Run Tests
run: PATH=$PWD/build:$PATH ctest --test-dir build
if: ${{ success() }}

- name: (CMake) Verbose output of CTest failures
run: >-
PATH=$PWD/build:$PATH ctest --test-dir build --output-on-failure -j$(nproc) --rerun-failed -VV
if: ${{ failure() }}

0 comments on commit c72360e

Please sign in to comment.