Skip to content

Fix: equal_iterator_gt infinite loop #601

Fix: equal_iterator_gt infinite loop

Fix: equal_iterator_gt infinite loop #601

Workflow file for this run

name: Pre-Release
on:
push:
branches: ["main-dev"]
pull_request:
branches: ["main-dev"]
env:
BUILD_TYPE: Release
GH_TOKEN: ${{ secrets.SEMANTIC_RELEASE_TOKEN }}
PYTHONUTF8: 1
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
jobs:
test_cpp_c_ubuntu_gcc:
name: Test C++ Ubuntu (GCC)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main-dev
- run: git submodule update --init --recursive
- name: Install Dependencies
run: sudo apt update && sudo apt install -y cmake build-essential libjemalloc-dev libomp-dev g++-12
- name: Build
run: |
export CC=gcc-12
export CXX=g++-12
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_USE_OPENMP=1 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1
cmake --build build --config Debug
- name: Run C++ tests
run: ./build/test_cpp
- name: Run C tests
run: ./build/test_c
test_cpp_c_ubuntu_clang:
name: Test C++ Ubuntu (Clang)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main-dev
- run: git submodule update --init --recursive
- name: Install Dependencies
run: sudo apt update && sudo apt install -y cmake build-essential libjemalloc-dev clang-15
- name: Build
run: |
export CC=clang-15
export CXX=clang++-15
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1 -DUSEARCH_USE_SIMSIMD=1 -DUSEARCH_USE_JEMALLOC=1
cmake --build build --config Debug
- name: Run C++ tests
run: ./build/test_cpp
- name: Run C tests
run: ./build/test_c
test_cpp_c_macos:
name: Test C++ MacOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
ref: main-dev
- run: git submodule update --init --recursive
- name: Install Dependencies
run: |
brew update
brew install cmake
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1
cmake --build build --config Debug
- name: Run C++ tests
run: ./build/test_cpp
- name: Run C tests
run: ./build/test_c
test_cpp_c_windows:
name: Test C++ Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: main-dev
- run: git submodule update --init --recursive
- name: Install Dependencies
run: choco install cmake
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DUSEARCH_BUILD_TEST_CPP=1 -DUSEARCH_BUILD_TEST_C=1
cmake --build build --config Debug
- name: Run C++ tests
run: .\build\test_cpp
- name: Run C tests
run: .\build\test_c
test_python_311:
name: Test Python
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macOS-11, windows-2022]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest numpy
- name: Build locally
run: python -m pip install .
- name: Test with PyTest
run: pytest python/scripts/ -s -x
test_python_37:
name: Test Python 3.7
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
python-version: ["3.7"]
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest numpy
- name: Build locally
run: python -m pip install .
- name: Test with PyTest
run: pytest python/scripts/ -s -x
test_javascript:
name: Test JavaScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: npm ci
- run: npm test
test_rust:
name: Test Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
test_java:
name: Test Java
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive
- uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/[email protected]
- name: Execute Gradle build
run: gradle clean build
test_swift:
name: Test ObjC & Swift
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive
- name: Build
run: swift build
- name: Run tests
run: swift test
test_csharp:
name: Test C#
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
dotnet-version: ['7.0.x']
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive
- name: Setup .NET ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Ubuntu/macOS build native lib
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: ./build_lib.sh
shell: bash
working-directory: ${{ github.workspace }}/csharp/eng/
# Use cl.exe https://www.appveyor.com/docs/lang/cpp/#visual-studio-2017
# There is no support for c++11
- name: Windows MSVC build
if: matrix.os == 'windows-latest'
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
where cl
cl /EHsc /std:c++14 /O2 /LD /Fe:libusearch_c.dll lib.cpp /I. /I../include/ /I../fp16/include/
working-directory: ${{ github.workspace }}/c
shell: cmd
- name: Windows move dll to lib dir
if: matrix.os == 'windows-latest'
run: |
mkdir -p "${GITHUB_WORKSPACE}/csharp/lib/runtimes/win-x64/native"
mv "${GITHUB_WORKSPACE}/c/libusearch_c.dll" "${GITHUB_WORKSPACE}/csharp/lib/runtimes/win-x64/native"
shell: bash
- name: Build and test
run: dotnet test -c Release
shell: bash
working-directory: ${{ github.workspace }}/csharp/
test_golang:
name: Test Golang
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
ref: 'main-dev'
- run: git submodule update --init --recursive
- name: Prepare environment
run: |
sudo apt update &&
sudo apt install -y build-essential
- name: Build library
run: |
cd golang/
make USEARCH_USE_OPENMP=0 USEARCH_USE_NATIVE_F16=0 USEARCH_USE_SIMSIMD=1 -C ../c libusearch_c.so
sudo cp ../c/libusearch_c.so /usr/local/lib/libusearch_c.a
sudo cp ../c/usearch.h /usr/local/include/usearch.h
- name: Run test
run: |
cd golang
go test -v
build_docker:
name: Test Docker Image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: git submodule update --init --recursive
- name: Build
uses: docker/build-push-action@v4
with:
context: .
load: true
push: false