Skip to content

Implement H5Ovisit(_by_name) #129

Implement H5Ovisit(_by_name)

Implement H5Ovisit(_by_name) #129

Workflow file for this run

name: Test REST VOL with socket
on:
workflow_dispatch:
push:
pull_request:
branches: [ master ]
paths-ignore:
- '.github/CODEOWNERS'
- 'docs/**'
- 'COPYING'
- '**.md'
jobs:
build_and_test_rest_vol:
strategy:
fail-fast: false
matrix:
#os: [ubuntu-latest, mac-latest]
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"]
test-path: ["/rest-vol/build/bin/test_rest_vol-shared"]
#test-path: ["/rest-vol/build/bin/test_rest_vol-shared", "/rest-vol/build/bin/h5vl_test"]
endpoint: ["http+unix://%2Ftmp%2Fhs%2Fsn_1.sock"]
runs-on: ${{matrix.os}}
steps:
- name: Create environment variable setup script
working-directory: ${{github.workspace}}
run: |
printf '%s\n' 'echo "ADMIN_PASSWORD=admin" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export ADMIN_PASSWORD=admin' >> setup_env_vars.sh
printf '%s\n' 'echo "ADMIN_USERNAME=admin" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export ADMIN_USERNAME=admin' >> setup_env_vars.sh
printf '%s\n' 'echo "USER_NAME=test_user1" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export USER_NAME=test_user1' >> setup_env_vars.sh
printf '%s\n' 'echo "USER_PASSWORD=test" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export USER_PASSWORD=test' >> setup_env_vars.sh
printf '%s\n' 'echo "USER2_NAME=test_user2" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export USER2_NAME=test_user2' >> setup_env_vars.sh
printf '%s\n' 'echo "USER2_PASSWORD=test" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export USER2_PASSWORD=test' >> setup_env_vars.sh
printf '%s\n' 'echo "HSDS_USERNAME=test_user1" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export HSDS_USERNAME=test_user1' >> setup_env_vars.sh
printf '%s\n' 'echo "HSDS_PASSWORD=test" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export HSDS_PASSWORD=test' >> setup_env_vars.sh
printf '%s\n' 'echo "HSDS_PATH=/home/test_user1/" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export HSDS_PATH=/home/test_user1/' >> setup_env_vars.sh
printf '%s\n' 'echo "HSDS_ENDPOINT=${{matrix.endpoint}}" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export HSDS_ENDPOINT=${{matrix.endpoint}}' >> setup_env_vars.sh
printf '%s\n' 'echo "HDF5_VOL_CONNECTOR=REST" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export HDF5_VOL_CONNECTOR=REST ' >> setup_env_vars.sh
printf '%s\n' 'echo "HDF5_PLUGIN_PATH=${{github.workspace}}/rest-vol/build/bin/" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export HDF5_PLUGIN_PATH=${{github.workspace}}/rest-vol/build/bin/' >> setup_env_vars.sh
printf '%s\n' 'echo "ROOT_DIR=${{github.workspace}}/hsdsdata" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export ROOT_DIR=${{github.workspace}}/hsdsdata' >> setup_env_vars.sh
printf '%s\n' 'echo "BUCKET_NAME=hsdstest" >> $GITHUB_ENV' >> setup_env_vars.sh
printf '%s\n' 'export BUCKET_NAME=hsdstest' >> setup_env_vars.sh
chmod 777 setup_env_vars.sh
- uses: actions/cache/restore@v3
with:
key: hsds
path: ${{github.workspace}}/hsds
id: hsds-restore
- uses: actions/checkout@v3
if: ${{!steps.hsds-restore.outputs.cache-hit}}
with:
repository: HDFGroup/hsds
path: ${{github.workspace}}/hsds
- uses: actions/cache/save@v3
if: ${{!steps.hsds-restore.outputs.cache-hit}}
with:
key: hsds
path: ${{github.workspace}}/hsds
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install package
shell: bash
run: |
cd ${{github.workspace}}/hsds
pip install -e .
- name: Run unit tests
shell: bash
run: |
cd ${{github.workspace}}/hsds
pytest
- name: Install Autotools Dependencies (Linux, serial)
run: |
sudo apt update
sudo apt install automake autoconf libtool libtool-bin
sudo apt install gcc-11 g++-11 gfortran-11
echo "CC=gcc-11" >> $GITHUB_ENV
echo "CXX=g++-11" >> $GITHUB_ENV
echo "FC=gfortran-11" >> $GITHUB_ENV
sudo apt install libaec0 libaec-dev
- name: Get REST VOL
uses: actions/checkout@v3
with:
path: ${{github.workspace}}/rest-vol
- uses: actions/cache/restore@v3
id: hdf5-restore
with:
key: hdf5
path: ${{github.workspace}}/hdf5install
- uses: actions/checkout@v3
if: ${{!steps.hdf5-restore.outputs.cache-hit}}
with:
repository: HDFGroup/hdf5
path: ${{github.workspace}}/hdf5
- name: Get REST-VOL dependencies
run: |
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libyajl-dev
- name: Autotools Configure HDF5
if: ${{!steps.hdf5-restore.outputs.cache-hit}}
run: |
sh ./autogen.sh
${{github.workspace}}/hdf5/configure --enable-shared --prefix=${{github.workspace}}/hdf5install
shell: bash
working-directory: ${{github.workspace}}/hdf5
- name: Autotools Build HDF5
if: ${{!steps.hdf5-restore.outputs.cache-hit}}
run: make
working-directory: ${{ github.workspace }}/hdf5
- name: Autotools Install
if: ${{!steps.hdf5-restore.outputs.cache-hit}}
run: make install
working-directory: ${{ github.workspace }}/hdf5
- if: ${{!steps.hdf5-restore.outputs.cache-hit}}
name: Cache hdf5 install
uses: actions/cache/save@v3
with:
key: hdf5
path: ${{github.workspace}}/hdf5install
- name: Clone vol-tests repo
uses: actions/checkout@v3
with:
path: ${{github.workspace}}/rest-vol/test/vol-tests/
repository: mattjala/vol-tests
- name: Prepare directory contents
run: |
cd ${{github.workspace}}/rest-vol
mkdir ${{github.workspace}}/rest-vol/build
cd ${{github.workspace}}/rest-vol/src/hdf5
cp -r ${{github.workspace}}/hdf5install/* .
- name: Start HSDS
if: ${{ matrix.endpoint != 'http://127.0.0.1:5101'}}
run: |
cd ${{github.workspace}}/hsds
mkdir ${{github.workspace}}/hsdsdata &&
mkdir ${{github.workspace}}/hsdsdata/hsdstest &&
cp admin/config/groups.default admin/config/groups.txt &&
cp admin/config/passwd.default admin/config/passwd.txt &&
cp admin/config/groups.default admin/config/groups.txt &&
cp admin/config/passwd.default admin/config/passwd.txt &&
${{github.workspace}}/setup_env_vars.sh
ROOT_DIR=${{github.workspace}}/hsdadata ./runall.sh --no-docker 1 &
sleep 10
working-directory: ${{github.workspace}}/hsds
- name: Test HSDS
if: ${{matrix.endpoint != 'http://127.0.0.1:5101'}}
run: |
${{github.workspace}}/setup_env_vars.sh
python tests/integ/setup_test.py
working-directory: ${{github.workspace}}/hsds
- name: Build REST VOL (Cmake)
run: |
cd ${{github.workspace}}/rest-vol/build
sudo CFLAGS="-D_POSIX_C_SOURCE=199506L" cmake -DPREBUILT_HDF5_DIR=${{github.workspace}}/hdf5install -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/rest-vol/build/install ..
sudo make -j
sudo make install
- name: Tests at ${{matrix.test-path}}
run: |
${{github.workspace}}/setup_env_vars.sh
${{github.workspace}}${{matrix.test-path}}