Skip to content

Commit

Permalink
Merge pull request Unidata#1939 from DennisHeimbigner/actionzarr.dmh
Browse files Browse the repository at this point in the history
Enable nczarr testing in github actions.
  • Loading branch information
WardF authored Jan 27, 2021
2 parents 025fb7b + 480f00b commit f23fe5f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Install System dependencies
shell: bash -l {0}
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
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

###
# Installing libhdf4 and libhdf5
Expand Down Expand Up @@ -65,13 +65,14 @@ jobs:
hdf5: [ 1.8.21, 1.10.7 ]
use_nc4: [ nc3, nc4 ]
use_dap: [ dap_off, dap_on ]
use_nczarr: [ nczarr_off, nczarr_on ]
steps:

- uses: actions/checkout@v2

- name: Install System dependencies
shell: bash -l {0}
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
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

###
# Set Environmental Variables
Expand All @@ -82,16 +83,20 @@ jobs:
- run: echo "LD_LIBRARY_PATH=${HOME}/environments/${{ matrix.hdf5 }}/lib" >> $GITHUB_ENV
- run: |
echo "ENABLE_HDF4=--disable-hdf4" >> $GITHUB_ENV
echo "ENABLE_NC4=--disable-netcdf-4" >> $GITHUB_ENV
echo "ENABLE_NC4=--disable-hdf5" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc3'
- run: |
echo "ENABLE_HDF4=--enable-hdf4" >> $GITHUB_ENV
echo "ENABLE_NC4=--enable-netcdf-4" >> $GITHUB_ENV
echo "ENABLE_NC4=--enable-hdf5" >> $GITHUB_ENV
if: matrix.use_nc4 == 'nc4'
- run: echo "ENABLE_DAP=--disable-dap" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_off'
- run: echo "ENABLE_DAP=--enable-dap" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_on'
- run: echo "ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_off'
- run: echo "ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_on'

###
# Fetch Cache
Expand All @@ -118,7 +123,7 @@ jobs:

- name: Configure
shell: bash -l {0}
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure ${ENABLE_HDF4} ${ENABLE_NC4} ${ENABLE_DAP}
run: CFLAGS=${CFLAGS} LDFLAGS=${LDFLAGS} LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ./configure ${ENABLE_HDF4} ${ENABLE_NC4} ${ENABLE_DAP} ${ENABLE_NCZARR}

- name: Look at config.log if error
shell: bash -l {0}
Expand Down Expand Up @@ -158,13 +163,14 @@ jobs:
hdf5: [ 1.8.21, 1.10.7 ]
use_nc4: [ nc3, nc4 ]
use_dap: [ dap_off, dap_on ]
use_nczarr: [ nczarr_off, nczarr_on ]
steps:

- uses: actions/checkout@v2

- name: Install System dependencies
shell: bash -l {0}
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
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

###
# Set Environmental Variables
Expand All @@ -184,6 +190,10 @@ jobs:
if: matrix.use_dap == 'dap_off'
- run: echo "ENABLE_DAP=ON" >> $GITHUB_ENV
if: matrix.use_dap == 'dap_on'
- run: echo "ENABLE_NCZARR=--disable-nczarr" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_off'
- run: echo "ENABLE_NCZARR=--enable-nczarr" >> $GITHUB_ENV
if: matrix.use_nczarr == 'nczarr_on'
- run: echo "CTEST_OUTPUT_ON_FAILURE=1" >> $GITHUB_ENV

###
Expand All @@ -210,7 +220,7 @@ jobs:
run: |
mkdir build
cd build
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DENABLE_HDF4=${ENABLE_HDF4} -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=${ENABLE_DAP} -DENABLE_NETCDF_4=${ENABLE_NC4}
LD_LIBRARY_PATH=${LD_LIBRARY_PATH} cmake .. -DENABLE_HDF4=${ENABLE_HDF4} -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DENABLE_DAP=${ENABLE_DAP} -DENABLE_HDF5=${ENABLE_NC4} -DENABLE_NCZARR=${ENABLE_NCZARR}
- name: Print Summary
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions nczarr_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ IF(ENABLE_TESTS)
BUILD_BIN_TEST(tst_zchunks2 ${COMMONSRC})
BUILD_BIN_TEST(tst_zchunks3 ${COMMONSRC})
BUILD_BIN_TEST(tst_fillonlyz)
BUILD_BIN_TEST(tst_chunkcases ${TSTCOMMONSRC})

TARGET_INCLUDE_DIRECTORIES(ut_map PUBLIC ../libnczarr)
TARGET_INCLUDE_DIRECTORIES(ut_mapapi PUBLIC ../libnczarr)
Expand All @@ -51,7 +50,6 @@ IF(ENABLE_TESTS)
TARGET_INCLUDE_DIRECTORIES(tst_zchunks PUBLIC ../libnczarr)
TARGET_INCLUDE_DIRECTORIES(tst_zchunks2 PUBLIC ../libnczarr)
TARGET_INCLUDE_DIRECTORIES(tst_zchunks3 PUBLIC ../libnczarr)
TARGET_INCLUDE_DIRECTORIES(tst_chunkcases PUBLIC ../libnczarr)

# Helper programs for testing
BUILD_BIN_TEST(zmapio ${COMMONSRC})
Expand Down Expand Up @@ -81,6 +79,8 @@ IF(ENABLE_TESTS)
add_sh_test(nczarr_test run_ncgen4)

IF(FALSE) # Suppress for now
BUILD_BIN_TEST(tst_chunkcases ${TSTCOMMONSRC})
TARGET_INCLUDE_DIRECTORIES(tst_chunkcases PUBLIC ../libnczarr)
add_sh_test(nczarr_test run_chunkcases)
ENDIF()

Expand Down
3 changes: 3 additions & 0 deletions nczarr_test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,12 @@ endif

TESTS += run_ncgen4.sh

# Temporarily disable
if AX_IGNORE
check_PROGRAMS += tst_chunkcases
tst_chunkcases_SOURCES = tst_chunkcases.c ${tstcommonsrc}
TESTS += run_chunkcases.sh
endif

endif

Expand Down

0 comments on commit f23fe5f

Please sign in to comment.