netcdf-c/.github/workflows/run_tests_win_mingw.yml

98 lines
2.4 KiB
YAML
Raw Normal View History

###
# Build hdf4, hdf5 dependencies and cache them in a combined directory.
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
# for information related to github runners.
###
name: Run MSYS2, MinGW64-based Tests
on: [ push ]
jobs:
2022-01-25 04:18:05 +08:00
build-and-test:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip
2022-01-25 07:09:39 +08:00
- name: Find HDF5 Libraries
- run: |
2022-01-25 07:10:51 +08:00
ls /
cd /mingw64
find . -name "*hdf5*cmake"
2022-01-25 07:09:39 +08:00
#####
# One-Off CMake-based tests.
#####
- name: (CMake) Perform out-of-directory build
run: |
mkdir build
cd build
2022-01-25 07:02:45 +08:00
cmake .. -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D ENABLE_DAP_LONG_TESTS=TRUE -DCMAKE_PREFIX_PATH=/mingw64 -DHDF5_DIR=/mingw64/lib/cmake/hdf5 -DCMAKE_C_COMPILER=gcc -G "Unix Makefiles"
- name: (CMake) Print Summary
run: |
cd build
cat libnetcdf.settings
- name: (CMake) Build All
run: |
cd build
2022-01-25 02:38:21 +08:00
make -j 12
if: ${{ success() }}
- name: (CMake) Run Tests
run: |
cd build
2022-01-25 02:38:21 +08:00
ctest --output-on-failure -j 12 .
if: ${{ success() }}
- name: (CMake) Verbose Output if CTest Failure
run: |
cd build
2022-01-25 02:38:21 +08:00
ctest -j 12 --rerun-failed --output-on-failure -VV
if: ${{ failure() }}
###
# Configure and build
###
- name: (Autotools) Run autoconf
run: autoreconf -if
- name: (Autotools) Configure Build
run: ./configure --enable-hdf5 --enable-dap --disable-dap-remote-tests --disable-static --disable-plugins --disable-byterange --disable-dap-remote-tests --disable-logging
if: ${{ success() }}
- name: (Autotools) Look at config.log if error
run: cat config.log
if: ${{ failure() }}
- name: (Autotools) Print Summary
run: cat libnetcdf.settings
- name: (Autotools) Build Library and Utilities
run: make -j 8 LDFLAGS="-no-undefined -Wl,--export-all-symbols"
if: ${{ success() }}
- name: (Autotools) Build and Run Tests
run: make check -j 8
if: ${{ success() }}