summaryrefslogtreecommitdiffstats
path: root/.github/workflows/netcdf.yml
blob: 37041d6966e7b78a32199c59ecfa6ccbeb5e9c88 (plain)
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
name: netCDF

on:
  workflow_dispatch:
  push:
  pull_request:
    branches: [ develop ]
    paths-ignore:
      - '.github/CODEOWNERS'
      - '.github/FUNDING.yml'
      - 'doc/**'
      - 'release_docs/**'
      - 'ACKNOWLEDGEMENTS'
      - 'COPYING**'
      - '**.md'

permissions:
  contents: read

# Using concurrency to cancel any in-progress job or run
concurrency:
  group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Install System dependencies
      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 doxygen openssl libtool libtool-bin
    - name: Checkout HDF5
      uses: actions/checkout@v3
    - name: Install HDF5
      run: |
        ./autogen.sh
        ./configure --prefix=/usr/local --disable-static --enable-shared --enable-hl --with-szlib
        make -j
        sudo make install -j
    - name: Checkout netCDF
      uses: actions/checkout@v3
      with:
        repository: unidata/netcdf-c
        path: netcdf-c
    - name: Test netCDF
      run: |
        cd netcdf-c
        autoreconf -if
        CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure --enable-hdf5 --enable-dap --disable-dap-remote-tests  --enable-doxygen  --enable-external-server-tests
        cat config.log
        cat libnetcdf.settings
        CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make -j
        CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check TESTS="" -j
        LD_LIBRARY_PATH="/home/runner/work/hdf5/hdf5/netcdf-c/liblib/.libs:/usr/local/lib:${LD_LIBRARY_PATH}"
        CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} make check -j