Skip to content

CI: Set up a CMake run on Cygwin #105

CI: Set up a CMake run on Cygwin

CI: Set up a CMake run on Cygwin #105

name: Run Cygwin-based tests
on: [pull_request,workflow_dispatch]
concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true
env:
SHELLOPTS: igncr
CHERE_INVOKING: 1
CYGWIN_NOWINPATH: 1
jobs:
build-and-test-autotools:
runs-on: windows-latest
defaults:
run:
shell: bash -eo pipefail -o igncr "{0}"
name: Cygwin-based Autotools tests
strategy:
matrix:
plugin_dir_option: ["", "--without-plugin-dir"]
steps:
- name: Fix line endings
run: git config --global core.autocrlf input
- uses: actions/checkout@v3
- uses: cygwin/cygwin-install-action@v2
with:
platform: x86_64
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
- name: (Autotools) Run autoconf and friends
run: |
cp -f /bin/dash /bin/sh
mkdir m4
/bin/dash /usr/bin/libtoolize --force --copy --verbose
/usr/bin/autoreconf-2.69 --force --install --verbose --debug
- name: (Autotools) Configure in-tree build
run: >-
/bin/dash ./configure --enable-hdf5 --enable-shared
--disable-static --enable-dap --disable-dap-remote-tests
--enable-plugins ${{ matrix.plugin_dir_option }}
--disable-nczarr --disable-nczarr-filters
--disable-s3 --with-s3-testing=no
- name: Look at config.log if error
if: ${{ failure() }}
run: cat config.log
- name: Print summary
run: cat libnetcdf.settings
- name: (Autotools) Build library and utilities
run: make -j8 SHELL=/bin/dash
- name: (Autotools) Test DESTDIR install
run: |
make install DESTDIR=/tmp/pretend-root SHELL=/bin/dash
if [ -d "/tmp/pretend-root/$(pwd)" ];
then
find /tmp/pretend-root/$(pwd)
if [ $(find /tmp/pretend-root/$(pwd) -type f | wc -l) -gt 0 ]; then exit 1; fi
fi
- name: (Autotools) Build and run tests
timeout-minutes: 30
run: |
make check -j8 SHELL=/bin/dash
build-and-test-autotools:

Check failure on line 82 in .github/workflows/run_tests_win_cygwin.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/run_tests_win_cygwin.yml

Invalid workflow file

You have an error in your yaml syntax on line 82
runs-on: windows-latest
defaults:
run:
shell: bash -eo pipefail -o igncr "{0}"
name: Cygwin-based Autotools tests
strategy:
matrix:
build_dir: [".", "build"]
steps:
- name: Fix line endings
run: git config --global core.autocrlf input
- uses: actions/checkout@v3
- uses: cygwin/cygwin-install-action@v2
with:
platform: x86_64
packages: >-
git cmake ninja 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
- name: (CMake) Configure in-tree build
run: >-
cmake -B ${{ matrix.build_dir }} -S . -DCMAKE_INSTALL_PREFIX=/usr
-DENABLE_NETCDF_4=ON -DENABLE_DAP=ON -DBUILD_UTILITIES=ON
-DBUILD_SHARED_LIBS=ON -DENABLE_TESTS=ON -DENABLE_DAP=TRUE
-DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -DENABLE_DAP_LONG_TESTS=TRUE
- name: Look at config.log if error
if: ${{ failure() }}
run: cat config.log
- name: Print summary
run: cat libnetcdf.settings
- name: (CMake) Build library and utilities
run: cmake --build -B ${{ matrix.build_dir }} -j8 SHELL=/bin/dash
- name: (CMake) Test DESTDIR install
run: |
cmake --build -B ${{ matrix.build_dir }} --target install DESTDIR=/tmp/pretend-root SHELL=/bin/dash
if [ -d "/tmp/pretend-root/$(pwd)" ];
then
find /tmp/pretend-root/$(pwd)
if [ $(find /tmp/pretend-root/$(pwd) -type f | wc -l) -gt 0 ]; then exit 1; fi
fi
- name: (CMake) Build and run tests
timeout-minutes: 30
run: |
ctest -B ${{ matrix.build_dir }} -j8 SHELL=/bin/dash