Skip to content

Add support for where_knn via string (#29) #45

Add support for where_knn via string (#29)

Add support for where_knn via string (#29) #45

name: Upload Release package
on:
push:
branches:
- master
jobs:
build:
name: Build project (ubuntu)
runs-on: ubuntu-22.04
env:
DEPLOY_BUILD_PYTHON_VERSION: '3.13'
defaults:
run:
shell: bash
steps:
- name: Checkout PyReindexer repo
uses: actions/checkout@v4
- name: Checkout Reindexer repo
uses: actions/checkout@v4
with:
repository: Restream/reindexer
path: reindexer
- name: Install dependencies
run: |
sudo apt-get update -y
cd reindexer
sudo bash dependencies.sh
- name: Build Reindexer
run: |
cd reindexer
mkdir -p build && cd build
cmake ..
make -j4
sudo make install
- name: Set up Python ${{ env.DEPLOY_BUILD_PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEPLOY_BUILD_PYTHON_VERSION }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip build
- name: Build PyReindexer
run: python -m build --sdist
- name: Store build artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: dist/*
deploy:
name: Upload to PyPI (ubuntu)
runs-on: ubuntu-22.04
needs: build
environment:
name: pypi
url: https://pypi.org/p/pyreindexer/
steps:
- name: Fetch build artifacts
uses: actions/download-artifact@v4
with:
name: build
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
# user: __token__ ## used as default
password: pypi-${{ secrets.PYPI_TOKEN }}
attestations: false
test:
strategy:
fail-fast: false
matrix:
python:
- "3.13"
platform:
- ubuntu-22.04
- ubuntu-24.04
- macos-14
runs-on: ${{ matrix.platform }}
needs: deploy
defaults:
run:
shell: bash
steps:
- name: Checkout PyReindexer
uses: actions/checkout@v4
- name: Install Reindexer (MacOS)
if: startsWith(matrix.platform, 'macos')
run: |
brew tap restream/reindexer
brew install reindexer
- name: Install Reindexer-Dev\Server (Ubuntu)
if: startsWith(matrix.platform, 'ubuntu')
run: |
curl https://repo.reindexer.io/RX-KEY.GPG | sudo apt-key add
if [[ ${{matrix.platform}} == ubuntu-22.04 ]]; then
echo 'deb https://repo.reindexer.io/ubuntu-jammy /' | sudo tee -a /etc/apt/sources.list
elif [[ ${{matrix.platform}} == ubuntu-24.04 ]]; then
echo 'deb https://repo.reindexer.io/ubuntu-noble /' | sudo tee -a /etc/apt/sources.list
else
echo "${{matrix.platform}} not supported"
exit 1
fi
sudo apt-get update -y
sudo apt-get install -y libunwind-dev
sudo apt-get install -y reindexer-dev
sudo apt-get install -y reindexer-server
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
with:
python-version: ${{ matrix.python }}
- name: Install PyReindexer
run: |
python -m pip install --upgrade --disable-pip-version-check pip importlib_metadata setuptools wheel
python -m pip install -vvv pyreindexer
- name: Prepare Test Environment
run: python -m pip install -r requirements.txt
- name: Test
run: |
cd $(python -c "import sysconfig; print(sysconfig.get_path('purelib'))")/pyreindexer
$GITHUB_WORKSPACE/.github/workflows/test.sh