Skip to content

Commit

Permalink
Start HSDS in windows workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Apr 19, 2024
1 parent b2299d6 commit 08bbd44
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 15 deletions.
77 changes: 62 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ env:
HSDS_PASSWORD: test
HSDS_PATH: /home/test_user1/
HDF5_API_TEST_PATH_PREFIX: /home/test_user1/
HSDS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock
HDF5_VOL_CONNECTOR: REST
ROOT_DIR: ${{github.workspace}}/hsdsdata
BUCKET_NAME: hsdstest
Expand All @@ -34,7 +33,8 @@ jobs:
os: [ubuntu-latest]
python-version: ["3.10"]
hdf5-branch: ["hdf5_1_14", "develop"]

env:
HSDS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
sleep 10
working-directory: ${{github.workspace}}/hsds

- name: Test HSDS
- name: Test HSDS + Setup Folders
run: |
python tests/integ/setup_test.py
working-directory: ${{github.workspace}}/hsds
Expand All @@ -150,7 +150,8 @@ jobs:
os: [ubuntu-latest]
python-version: ["3.10"]
hdf5-branch: ["hdf5_1_14", "develop"]

env:
HSDS_ENDPOINT: http+unix://%2Ftmp%2Fhs%2Fsn_1.sock
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -242,11 +243,9 @@ jobs:
- name: Start HSDS
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 &&
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
ROOT_DIR=${{github.workspace}}/hsdadata ./runall.sh --no-docker 1 &
sleep 10
Expand Down Expand Up @@ -280,7 +279,8 @@ jobs:
os: [windows-latest]
python-version: ["3.10"]
hdf5-branch: ["hdf5_1_14", "develop"]

env:
HSDS_ENDPOINT: http://127.0.0.1:5101
runs-on: ${{matrix.os}}
steps:
- name: Get HDF5
Expand All @@ -295,6 +295,47 @@ jobs:
with:
path: ${{github.workspace}}/vol-rest

- name: Get HSDS
uses: actions/checkout@v3
with:
repository: HDFGroup/hsds
path: ${{github.workspace}}/hsds

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install HSDS dependencies
working-directory: ${{github.workspace}}/hsds
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 HSDS package
working-directory: ${{github.workspace}}/hsds
shell: bash
run: |
pip install -e .
- name: Start HSDS
shell: bash
working-directory: ${{github.workspace}}/hsds
run: |
mkdir data
mkdir data/hsdstest
cp admin/config/groups.default admin/config/groups.txt
cp admin/config/passwd.default admin/config/passwd.txt
hsds --root_dir data --host localhost --port 5101 --password_file admin/config/passwd.txt --logfile hs.log --loglevel DEBUG --config_dir=admin/config --count=4 &
sleep 10
- name: Test HSDS + Setup Folders
run: |
python tests/integ/setup_test.py
working-directory: ${{github.workspace}}/hsds

- name: Get curl from source
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -357,16 +398,22 @@ jobs:
-DCURL_ROOT=${{github.workspace}}/curl/install/ -DCMAKE_C_FLAGS="/DCURL_STATICLIB" `
-DCURL_USE_STATIC_LIBRARIES=ON `
-DYAJL_ROOT=${{github.workspace}}/yajl/install/ `
-DBUILD_STATIC_LIBS=OFF -DBUILD_SHARED_LIBS=ON `
-DCMAKE_BUILD_TYPE=Release ..
cmake --build . -j --config Release
cmake --install . --config Release
- name: Set HDF5 Plugin path
- name: Set HDF5 library path
run: |
echo "HDF5_PLUGIN_PATH=${{github.workspace}}/vol-rest/build/bin/" >> $GITHUB_ENV
echo "HDF5_VOL_CONNECTOR=REST" >> $GITHUB_ENV
echo "TEMP_VAR=$env:PATH;${{github.workspace}}\vol-rest\install\bin;${{github.workspace}}\hdf5install\bin;${{github.workspace}}\yajl\install\lib" >> $env:GITHUB_ENV
- name: Test REST VOL
working-directory: ${{github.workspace}}/vol-rest/install/bin
working-directory: ${{github.workspace}}\vol-rest\build
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}\vol-rest\install\bin
# Manually append lib to PATH here, since env can change between steps on the runner
run: |
${{github.workspace}}/vol-rest/install/bin/test_rest_vol-shared.exe
$env:PATH=$env:TEMP_VAR
ctest . -C Release -VV --output-on-failure
4 changes: 4 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@ endif ()
if (BUILD_SHARED_LIBS)
foreach (test ${HDF5_VOL_REST_TESTS})
if (${test} STREQUAL "big" AND CYGWIN)
# TODO
message(AUTHOR_WARNING "Cygwin in use for tests")
add_test (
NAME RVTEST-shared-${test}
COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}-shared"
)
else (${test} STREQUAL "big" AND CYGWIN)
# TODO
message(AUTHOR_WARNING "Cygwin not in use for tests")
add_test (NAME RVTEST-shared-${test} COMMAND $<TARGET_FILE:${test}-shared>)
endif (${test} STREQUAL "big" AND CYGWIN)
set_tests_properties (RVTEST-shared-${test} PROPERTIES
Expand Down

0 comments on commit 08bbd44

Please sign in to comment.