Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build dependencies as external projects #497

Merged
merged 25 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e77acdb
Move build of external dependencies to CMAKE as external projects
ashao Jun 15, 2024
a11b64f
Remove make dep stage from setup.py
ashao Jun 17, 2024
1d6ea7f
Update changelog
ashao Jun 17, 2024
7f0a5e4
Fix build for Docker images
ashao Jun 17, 2024
f0b78a3
Fixed visibility of libhiredis and redis++
ashao Jun 18, 2024
7ec7a57
Restore accidental deletion of test dependencies
ashao Jun 18, 2024
aea6b39
Add linking of external libraries to python client
ashao Jun 18, 2024
7eaa44f
Shallow clone of external dependencies
ashao Jun 18, 2024
9e6f51b
Create install configs and update CMakeLists
ashao Jun 20, 2024
001b34c
Replace smartredis target with variable
ashao Jun 21, 2024
8f532a4
Simplify the CMakeLists
ashao Jun 21, 2024
610d2eb
Fight with object files again
ashao Jun 21, 2024
6972d4a
Resolve dependencies for static build
ashao Jun 24, 2024
7feca48
Rename old variables in testing infrastructure
ashao Jun 24, 2024
1fdf02e
Fix docker tests
ashao Jun 24, 2024
66c60af
fix some errors in testing
ashao Jun 25, 2024
ba5dd0a
Fix test running directories
ashao Jun 25, 2024
cdef9ce
Fix install locations in Github Actions
ashao Jun 25, 2024
77baa72
Disable pedantic
ashao Jun 25, 2024
30a7ff6
fix errant continuation marker
ashao Jun 26, 2024
83a74d6
Update TEST_PATH definition
ashao Jun 26, 2024
e9032db
Fix last errors with tests
ashao Jun 27, 2024
ecbc59c
Final changes
ashao Jun 28, 2024
854199d
Add hint for linker in examples and tests
ashao Jul 2, 2024
72b4d71
Cleanup merge
ashao Jul 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ jobs:
rai_v: [1.2.7] # versions of RedisAI
py_v: ['3.9.x', '3.10.x', '3.11.x'] # versions of Python
compiler: [nvhpc-23-11, intel-2024.0, gcc-11, gcc-12] # intel compiler, and versions of GNU compiler
link_type: [Static, Shared]
link_type: [shared, static]
env:
COMPILER: ${{ matrix.compiler }} # used when the compiler is gcc/gfortran
LINK_TYPE: ${{ matrix.link_type }}


steps:
# Maximize the space in this image
- name: Maximize build space
Expand Down Expand Up @@ -171,26 +170,33 @@ jobs:
if: contains(matrix.os, 'ubuntu')
run: sudo apt-get -y install cmake

- name: Build and install SmartRedis library
run: |
make test-lib INSTALL_PREFIX=$PWD/install/$LINK_TYPE \
BUILD_FORTRAN=ON BUILD_PYTHON=ON LINK_TYPE=$LINK_TYPE
echo LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/install/$LINK_TYPE/lib >> $GITHUB_ENV

- name: Build SmartRedis python and install
run: python -m pip install -e .[dev,xarray]

- name: Build and install test dependencies
run: |
make test-deps &&
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/install/lib" >> $GITHUB_ENV
make test-deps

# Make sure the examples work
- name: Run examples
run: |
make test-examples SR_FORTRAN=ON SR_PYTHON=ON SR_LINK=$LINK_TYPE \
SR_TEST_PORT=7000 SR_TEST_REDISAI_VER=v${{ matrix.rai_v }}
make test-examples INSTALL_PREFIX=$PWD/install/$LINK_TYPE \
BUILD_FORTRAN=ON BUILD_PYTHON=ON LINK_TYPE=$LINK_TYPE \
SR_TEST_PORT=7000 SR_TEST_REDISAI_VER=v${{ matrix.rai_v }} \
INSTALL_PREFIX=$PWD/install/$LINK_TYPE

# Run the tests using various DB deployments
- name: Run tests
run: |
make test-verbose-with-coverage \
make test-verbose-with-coverage INSTALL_PREFIX=$PWD/install/$LINK_TYPE \
COV_FLAGS="--cov=./src/python/module/smartredis/ --cov-report=xml --cov-append" \
SR_FORTRAN=ON SR_PYTHON=ON SR_TEST_REDIS_MODE=All SR_TEST_PORT=7000 SR_LINK=$LINK_TYPE \
BUILD_FORTRAN=ON BUILD_PYTHON=ON SR_TEST_REDIS_MODE=All SR_TEST_PORT=7000 LINK_TYPE=$LINK_TYPE \
SR_TEST_REDISAI_VER=v${{ matrix.rai_v }}

# Process and upload code coverage (Python was collected during pytest)
Expand Down
Loading
Loading