2022-01-25 01:51:19 +08:00
|
|
|
###
|
|
|
|
# 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:
|
2022-01-25 01:51:19 +08:00
|
|
|
|
|
|
|
runs-on: windows-latest
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: msys2 {0}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: msys2/setup-msys2@v2
|
|
|
|
with:
|
|
|
|
msystem: MINGW64
|
|
|
|
update: true
|
2022-01-25 02:05:33 +08:00
|
|
|
install: git mingw-w64-x86_64-toolchain automake libtool autoconf make cmake mingw-w64-x86_64-hdf5 unzip
|
2022-01-25 01:51:19 +08:00
|
|
|
###
|
|
|
|
# Configure and build
|
|
|
|
###
|
|
|
|
|
2022-01-25 04:18:05 +08:00
|
|
|
- name: (Autotools) Run autoconf
|
2022-01-25 01:51:19 +08:00
|
|
|
run: autoreconf -if
|
|
|
|
|
2022-01-25 04:18:05 +08:00
|
|
|
- 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
|
2022-01-25 01:51:19 +08:00
|
|
|
if: ${{ success() }}
|
|
|
|
|
2022-01-25 04:18:05 +08:00
|
|
|
- name: (Autotools) Look at config.log if error
|
2022-01-25 01:51:19 +08:00
|
|
|
run: cat config.log
|
|
|
|
if: ${{ failure() }}
|
|
|
|
|
2022-01-25 04:18:05 +08:00
|
|
|
- name: (Autotools) Print Summary
|
2022-01-25 01:51:19 +08:00
|
|
|
run: cat libnetcdf.settings
|
|
|
|
|
2022-01-25 04:18:05 +08:00
|
|
|
- name: (Autotools) Build Library and Utilities
|
2022-01-25 03:20:04 +08:00
|
|
|
run: make -j LDFLAGS="-no-undefined -Wl,--export-all-symbols"
|
2022-01-25 01:51:19 +08:00
|
|
|
if: ${{ success() }}
|
|
|
|
|
2022-01-25 06:11:58 +08:00
|
|
|
- name: (Autotools) Build and Run Tests
|
2022-01-25 02:38:21 +08:00
|
|
|
run: make check -j
|
2022-01-25 01:51:19 +08:00
|
|
|
if: ${{ success() }}
|
|
|
|
|
|
|
|
#####
|
|
|
|
# One-Off CMake-based tests.
|
|
|
|
#####
|
|
|
|
###
|
|
|
|
# Configure and build
|
|
|
|
###
|
|
|
|
|
|
|
|
- name: Perform out-of-directory build
|
|
|
|
shell: bash -l {0}
|
|
|
|
run: |
|
|
|
|
mkdir build
|
|
|
|
cd build
|
2022-01-25 02:38:21 +08:00
|
|
|
cmake .. -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D ENABLE_DAP_LONG_TESTS=TRUE
|
2022-01-25 01:51:19 +08:00
|
|
|
|
|
|
|
- name: Print Summary
|
|
|
|
run: |
|
|
|
|
cd build
|
|
|
|
cat libnetcdf.settings
|
|
|
|
|
|
|
|
- name: Build All
|
|
|
|
run: |
|
|
|
|
cd build
|
2022-01-25 02:38:21 +08:00
|
|
|
make -j 12
|
2022-01-25 01:51:19 +08:00
|
|
|
if: ${{ success() }}
|
|
|
|
|
|
|
|
- name: Run Tests
|
|
|
|
run: |
|
|
|
|
cd build
|
2022-01-25 02:38:21 +08:00
|
|
|
ctest --output-on-failure -j 12 .
|
2022-01-25 01:51:19 +08:00
|
|
|
if: ${{ success() }}
|
|
|
|
|
|
|
|
- name: 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
|
2022-01-25 01:51:19 +08:00
|
|
|
if: ${{ failure() }}
|