Skip to content

Commit

Permalink
CI: Add Cygwin CMake run
Browse files Browse the repository at this point in the history
Copied from MehdiChinoune's MSYS CMake CI run.
  • Loading branch information
DWesl authored May 9, 2024
1 parent c72360e commit fbe383d
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/run_tests_win_cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,69 @@ jobs:
timeout-minutes: 30
run: |
make check -j8 SHELL=/bin/dash
build-and-test-cmake:

runs-on: windows-latest
defaults:
run:
shell: "C:/cygwin/bin/bash.exe" -eo pipefail -o igncr "{0}"

steps:

- run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- uses: cygwin/cygwin-install-action@v2
with:
platform: x86_64
install-dir: 'C:\cygwin'
packages: >-
git automake libtool autoconf2.5 make libhdf5-devel
libhdf4-devel zipinfo libxml2-devel perl zlib-devel
libzstd-devel libbz2-devel libaec-devel libzip-devel
libdeflate-devel gcc-core libcurl-devel libiconv-devel
libssl-devel libcrypt-devel cmake ninja make m4 diffutils unzip
###
# Configure and build
###

- name: (CMake) Configure Build
run: |
LDFLAGS="-Wl,--export-all-symbols" \
cmake \
-G"UNIX 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 fbe383d

Please sign in to comment.