-
Notifications
You must be signed in to change notification settings - Fork 262
144 lines (115 loc) · 3.94 KB
/
run_tests_win_mingw.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
###
# 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 (Not Visual Studio)
env:
CPPFLAGS: "-D_BSD_SOURCE"
REMOTETESTDOWN: ${{ vars.REMOTETESTDOWN }}
on: [pull_request,workflow_dispatch]
concurrency:
group: ${{ github.workflow}}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build-and-test-autotools:
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 autotools:p hdf5:p curl:p libxml2:p zlib:p blosc:p bzip2:p
install: diffutils m4 git unzip
###
# 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-byterange --disable-dap-remote-tests --disable-logging --enable-plugins --disable-nczarr-filters --disable-s3
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="-Wl,--export-all-symbols"
if: ${{ success() }}
- name: Check for plugins
run: |
dir ./plugins
if test -f ./plugins/.libs ; then dir ./plugins/.libs; fi
- name: (Autotools) Build and Run Tests
run: make check -j 8 LDFLAGS="-Wl,--export-all-symbols"
if: ${{ success() }}
id: tests
- name: Upload test failures
if: ${{ failure() && steps.tests.conclusion == 'failure' }}
uses: actions/upload-artifact@v3
with:
name: mingw-autotools-test-logs
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() }}