diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index ef8cb4f..6dd1edf 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -13,8 +13,24 @@ permissions: jobs: test: - name: Run tests + name: Build (${{ matrix.name }}) runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - name: default + make_flags: "" + run_tests: "true" + - name: zarr-only + make_flags: "WITH_ZARR=1" + run_tests: "false" + - name: grib-only + make_flags: "WITH_GRIB=1" + run_tests: "false" + - name: zarr-and-grib + make_flags: "WITH_ZARR=1 WITH_GRIB=1" + run_tests: "false" steps: - name: Checkout repository @@ -23,7 +39,24 @@ jobs: - name: Install system dependencies run: | sudo apt-get update - sudo apt-get install -y libnetcdf-dev pkg-config + sudo apt-get install -y \ + libnetcdf-dev \ + libblosc-dev \ + liblz4-dev \ + libeccodes-dev \ + libx11-dev \ + libxt-dev \ + libxaw7-dev \ + libxmu-dev \ + libxext-dev \ + libxpm-dev \ + pkg-config - - name: Build and run tests - run: make test + - name: Build + run: | + make clean + make ${{ matrix.make_flags }} -j"$(nproc)" + + - name: Run tests + if: matrix.run_tests == 'true' + run: make ${{ matrix.make_flags }} test diff --git a/src/uterm.c b/src/uterm.c index 5412c9b..a82fd22 100644 --- a/src/uterm.c +++ b/src/uterm.c @@ -836,6 +836,7 @@ static void cleanup_all(void) { current_dim_info = NULL; n_current_dims = 0; } +#ifdef HAVE_GRIB if (fileset && fileset->files[0]->file_type == FILE_TYPE_GRIB) { for (int i = 0; i < n_variables; i++) { if (var_array && var_array[i]) { @@ -843,6 +844,7 @@ static void cleanup_all(void) { } } } +#endif free(var_array); var_array = NULL;