|
57 | 57 |
|
58 | 58 | nc-autotools: |
59 | 59 |
|
60 | | - needs: build-deps |
| 60 | + needs: [ nc-cmake-tests-oneoff, nc-ac-tests-oneoff ] |
61 | 61 | runs-on: ubuntu-latest |
62 | 62 |
|
63 | 63 | strategy: |
@@ -164,7 +164,7 @@ jobs: |
164 | 164 |
|
165 | 165 | nc-cmake: |
166 | 166 |
|
167 | | - needs: build-deps |
| 167 | + needs: [ nc-cmake-tests-oneoff, nc-ac-tests-oneoff ] |
168 | 168 | runs-on: ubuntu-latest |
169 | 169 |
|
170 | 170 | strategy: |
@@ -250,3 +250,172 @@ jobs: |
250 | 250 | cd build |
251 | 251 | LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 . |
252 | 252 | if: ${{ success() }} |
| 253 | + |
| 254 | + - name: Verbose Output if CTest Failure |
| 255 | + shell: bash -l {0} |
| 256 | + run: | |
| 257 | + cd build |
| 258 | + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV |
| 259 | + if: ${{ failure() }} |
| 260 | + |
| 261 | + |
| 262 | +##### |
| 263 | +# One-Off Autotools-based tests. |
| 264 | +##### |
| 265 | + nc-ac-tests-oneoff: |
| 266 | + |
| 267 | + needs: build-deps |
| 268 | + runs-on: ubuntu-latest |
| 269 | + |
| 270 | + strategy: |
| 271 | + matrix: |
| 272 | + hdf5: [ 1.10.7 ] |
| 273 | + steps: |
| 274 | + |
| 275 | + - uses: actions/checkout@v2 |
| 276 | + |
| 277 | + - name: Install System dependencies |
| 278 | + shell: bash -l {0} |
| 279 | + run: sudo apt update && sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev |
| 280 | + |
| 281 | +### |
| 282 | +# Set Environmental Variables |
| 283 | +### |
| 284 | + |
| 285 | + - run: echo "CFLAGS=-I${HOME}/environments/${{ matrix.hdf5 }}/include" >> $GITHUB_ENV |
| 286 | + - run: echo "LDFLAGS=-L${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV |
| 287 | + - run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV |
| 288 | + |
| 289 | + |
| 290 | +### |
| 291 | +# Fetch Cache |
| 292 | +### |
| 293 | + |
| 294 | + - name: Fetch HDF Cache |
| 295 | + id: cache-hdf |
| 296 | + uses: actions/cache@v2 |
| 297 | + with: |
| 298 | + path: ~/environments/${{ matrix.hdf5 }} |
| 299 | + key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }} |
| 300 | + |
| 301 | + - name: Check Cache |
| 302 | + shell: bash -l {0} |
| 303 | + run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib |
| 304 | + |
| 305 | +### |
| 306 | +# Configure and build |
| 307 | +### |
| 308 | + |
| 309 | + - name: Run autoconf |
| 310 | + shell: bash -l {0} |
| 311 | + run: autoreconf -if |
| 312 | + |
| 313 | + - name: Configure |
| 314 | + shell: bash -l {0} |
| 315 | + run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure --enable-hdf4 --enable-hdf5 --enable-dap --enable-dap-long-tests |
| 316 | + if: ${{ success() }} |
| 317 | + |
| 318 | + - name: Look at config.log if error |
| 319 | + shell: bash -l {0} |
| 320 | + run: cat config.log |
| 321 | + if: ${{ failure() }} |
| 322 | + |
| 323 | + - name: Print Summary |
| 324 | + shell: bash -l {0} |
| 325 | + run: cat libnetcdf.settings |
| 326 | + |
| 327 | + - name: Build Library and Utilities |
| 328 | + shell: bash -l {0} |
| 329 | + run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j |
| 330 | + if: ${{ success() }} |
| 331 | + |
| 332 | + - name: Build Tests |
| 333 | + shell: bash -l {0} |
| 334 | + run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check TESTS="" -j |
| 335 | + if: ${{ success() }} |
| 336 | + |
| 337 | + - name: Run Tests |
| 338 | + shell: bash -l {0} |
| 339 | + run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j |
| 340 | + if: ${{ success() }} |
| 341 | + |
| 342 | +##### |
| 343 | +# One-Off CMake-based tests. |
| 344 | +##### |
| 345 | + |
| 346 | + nc-cmake-tests-oneoff: |
| 347 | + |
| 348 | + needs: build-deps |
| 349 | + runs-on: ubuntu-latest |
| 350 | + |
| 351 | + strategy: |
| 352 | + matrix: |
| 353 | + hdf5: [ 1.10.7] |
| 354 | + |
| 355 | + steps: |
| 356 | + |
| 357 | + - uses: actions/checkout@v2 |
| 358 | + |
| 359 | + - name: Install System dependencies |
| 360 | + shell: bash -l {0} |
| 361 | + run: sudo apt update && sudo apt install -y libaec-dev zlib1g-dev automake autoconf libcurl4-openssl-dev libjpeg-dev wget curl bzip2 m4 flex bison cmake libzip-dev |
| 362 | + |
| 363 | +### |
| 364 | +# Set Environmental Variables |
| 365 | +### |
| 366 | + |
| 367 | + - run: echo "CMAKE_PREFIX_PATH=${HOME}/environments/${{ matrix.hdf5 }}/" >> $GITHUB_ENV |
| 368 | + - run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV |
| 369 | + |
| 370 | +### |
| 371 | +# Fetch Cache |
| 372 | +### |
| 373 | + |
| 374 | + - name: Fetch HDF Cache |
| 375 | + id: cache-hdf5 |
| 376 | + uses: actions/cache@v2 |
| 377 | + with: |
| 378 | + path: ~/environments/${{ matrix.hdf5 }} |
| 379 | + key: hdf5-${{ runner.os }}-${{ matrix.hdf5 }} |
| 380 | + |
| 381 | + - name: Check Cache |
| 382 | + shell: bash -l {0} |
| 383 | + run: ls ${HOME}/environments && ls ${HOME}/environments/${{ matrix.hdf5 }} && ls ${HOME}/environments/${{ matrix.hdf5}}/lib |
| 384 | + |
| 385 | +### |
| 386 | +# Configure and build |
| 387 | +### |
| 388 | + |
| 389 | + - name: Perform out-of-directory build |
| 390 | + shell: bash -l {0} |
| 391 | + run: | |
| 392 | + mkdir build |
| 393 | + cd build |
| 394 | + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DENABLE_HDF4=TRUE -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=TRUE -DENABLE_HDF5=TRUE -DENABLE_NCZARR=TRUE -D ENABLE_DAP_LONG_TESTS=TRUE |
| 395 | +
|
| 396 | + - name: Print Summary |
| 397 | + shell: bash -l {0} |
| 398 | + run: | |
| 399 | + cd build |
| 400 | + cat libnetcdf.settings |
| 401 | +
|
| 402 | + - name: Build All |
| 403 | + shell: bash -l {0} |
| 404 | + run: | |
| 405 | + cd build |
| 406 | + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j 12 |
| 407 | + if: ${{ success() }} |
| 408 | + |
| 409 | + - name: Run Tests |
| 410 | + shell: bash -l {0} |
| 411 | + run: | |
| 412 | + cd build |
| 413 | + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 . |
| 414 | + if: ${{ success() }} |
| 415 | + |
| 416 | + - name: Verbose Output if CTest Failure |
| 417 | + shell: bash -l {0} |
| 418 | + run: | |
| 419 | + cd build |
| 420 | + LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ctest -j 12 --rerun-failed --output-on-failure -VV |
| 421 | + if: ${{ failure() }} |
0 commit comments