diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 334c39d7..e5b3e288 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,13 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 - - run: npm install --save-dev --prefix ./package-ci @semantic-release/exec @semantic-release/git conventional-changelog-eslint semantic-release && npx --prefix ./package-ci semantic-release + - name: Set up Cargo + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Bump version + run: npm install --save-dev --prefix ./package-ci @semantic-release/exec @semantic-release/git conventional-changelog-eslint semantic-release && npx --prefix ./package-ci semantic-release rebase: name: Rebase Dev. Branch @@ -75,10 +81,12 @@ jobs: target: aarch64-linux-gnu steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Get version id: set_version @@ -137,15 +145,18 @@ jobs: matrix: arch: [x64, x86] steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Setup CMake uses: jwlawson/actions-setup-cmake@v1.13 - - uses: actions/setup-go@v4 + - name: Set up Go + uses: actions/setup-go@v4 with: go-version: "^1.19.0" @@ -185,12 +196,15 @@ jobs: matrix: arch: [arm64, x86_64] steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - - uses: actions/setup-go@v4 + - name: Set up Go + uses: actions/setup-go@v4 with: go-version: "^1.21.0" @@ -238,10 +252,12 @@ jobs: matrix: os: [ubuntu-22.04, macOS-11, windows-2022] steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Get version id: set_version @@ -252,12 +268,9 @@ jobs: - name: Build library on Ubuntu run: | - export WASI_VERSION=20 - export WASI_VERSION_FULL=${WASI_VERSION}.0 wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz tar xf wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz rm -rf wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz - export WASI_SDK_PATH=/home/runner/work/usearch/usearch/wasi-sdk-${WASI_VERSION_FULL} archs=("x86_64" "arm64") cd ./c for arch in "${archs[@]}" @@ -333,8 +346,8 @@ jobs: "https://api.github.com/repos/${{ github.repository }}/releases/latest") echo "last_release_id=$(echo "$response" | jq -r '.id')" >> $GITHUB_OUTPUT - - uses: robinraju/release-downloader@v1.8 - name: Download release assets + - name: Download release assets + uses: robinraju/release-downloader@v1.8 with: latest: true fileName: "*" @@ -388,7 +401,8 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["37", "38", "39", "310", "311", "312"] steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - name: Setup Docker @@ -451,13 +465,13 @@ jobs: - x86 os: - macos-latest - - ubuntu-22.04 + - ubuntu-latest - windows-latest exclude: - arch: x86 os: macos-latest - arch: x86 - os: ubuntu-22.04 + os: ubuntu-latest runs-on: ${{ matrix.os }} env: CC: gcc-12 @@ -468,7 +482,8 @@ jobs: uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Set up Node.js uses: actions/setup-node@v4 @@ -477,13 +492,14 @@ jobs: architecture: ${{ matrix.arch }} - name: Update compilers - if: matrix.os == 'ubuntu-22.04' + if: matrix.os == 'ubuntu-latest' run: | sudo apt update sudo apt install -y cmake build-essential libjemalloc-dev libomp-dev gcc-12 g++-12 sudo apt install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu g++-aarch64-linux-gnu - - run: npm ci --ignore-scripts + - name: Install dependencies + run: npm ci --ignore-scripts - run: npm run prebuild-single if: matrix.os != 'macos-latest' - run: npm run prebuild-darwin-x64+arm64 @@ -493,8 +509,8 @@ jobs: if: matrix.os == 'macos-latest' - run: file prebuilds/*/* if: matrix.os == 'macos-latest' - - name: Extra for cross build - if: matrix.os == 'ubuntu-22.04' + - name: Build (Linux) + if: matrix.os == 'ubuntu-latest' run: | export CC=aarch64-linux-gnu-gcc export CXX=aarch64-linux-gnu-g++ @@ -504,7 +520,8 @@ jobs: export STRIP=aarch64-linux-gnu-strip npm run prebuild-arm64 aarch64-linux-gnu-strip prebuilds/linux-arm64/*node - - uses: actions/upload-artifact@v3 + - name: Upload prebuilds + uses: actions/upload-artifact@v3 with: name: prebuilds path: prebuilds @@ -516,17 +533,20 @@ jobs: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: 20 - - uses: actions/download-artifact@v3 + - name: Download prebuilds + uses: actions/download-artifact@v3 - name: Look for links run: find . -type f -links +1 @@ -554,15 +574,18 @@ jobs: needs: versioning runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Hide submodule Crates run: | mv simsimd/Cargo.toml simsimd/Cargo.toml.bak mv stringzilla/Cargo.toml stringzilla/Cargo.toml.bak - - uses: actions-rs/toolchain@v1 + - name: Set up Rust + uses: actions-rs/toolchain@v1 with: toolchain: stable override: true @@ -585,11 +608,14 @@ jobs: ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }} steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive - - uses: actions/setup-java@v3 + - name: Pull Git submodules + run: git submodule update --init --recursive + - name: Set up Java + uses: actions/setup-java@v3 with: java-version: "11" distribution: "adopt" @@ -605,10 +631,12 @@ jobs: needs: versioning runs-on: macos-12 steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Build run: swift build - name: Run tests @@ -624,10 +652,12 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Login to Docker Hub uses: docker/login-action@v2 with: @@ -669,10 +699,12 @@ jobs: shell: bash steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Build C library for Linux if: matrix.os == 'ubuntu-22.04' @@ -723,10 +755,12 @@ jobs: NUGET_SOURCE: https://api.nuget.org/v3/index.json GITHUB_PACKAGES_SOURCE: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json steps: - - uses: actions/checkout@v4 + - name: Check out refreshed version + uses: actions/checkout@v4 with: ref: "main" - - run: git submodule update --init --recursive + - name: Pull Git submodules + run: git submodule update --init --recursive - name: Download usearch libs artifact uses: actions/download-artifact@v3 diff --git a/.github/workflows/update_version.sh b/.github/workflows/update_version.sh index f7523195..17b2321a 100755 --- a/.github/workflows/update_version.sh +++ b/.github/workflows/update_version.sh @@ -13,3 +13,7 @@ echo $1 > VERSION && sed -i "s/>[0-9]\+\.[0-9]\+\.[0-9]\+<\/Version>/>$1<\/Version>/" ./csharp/nuget/nuget-package.props && sed -i "s/VERSION [0-9]\+\.[0-9]\+\.[0-9]\+/VERSION $1/" CMakeLists.txt && sed -i "s/version=\".*\"/version=\"$1\"/" wasmer.toml + +# Update the version in the Cargo.lock file, but don't report an error if it fails... +# as `cargo` may not be available in the current environment. +cargo update || true diff --git a/build.rs b/build.rs index 5b6be2ce..f7d59e45 100644 --- a/build.rs +++ b/build.rs @@ -26,7 +26,8 @@ fn main() { if cfg!(feature = "simsimd") { build .define("USEARCH_USE_SIMSIMD", "1") - .define("SIMSIMD_DYNAMIC_DISPATCH", "1"); + .define("SIMSIMD_DYNAMIC_DISPATCH", "1") + .define("SIMSIMD_NATIVE_F16", "0"); } else { build.define("USEARCH_USE_SIMSIMD", "0"); } diff --git a/include/usearch/index_plugins.hpp b/include/usearch/index_plugins.hpp index a5539a3a..41cecf67 100644 --- a/include/usearch/index_plugins.hpp +++ b/include/usearch/index_plugins.hpp @@ -46,7 +46,9 @@ #if USEARCH_USE_SIMSIMD // Propagate the `f16` settings +#if !defined(SIMSIMD_NATIVE_F16) #define SIMSIMD_NATIVE_F16 !USEARCH_USE_FP16LIB +#endif #define SIMSIMD_DYNAMIC_DISPATCH 0 // No problem, if some of the functions are unused or undefined #pragma GCC diagnostic push diff --git a/simsimd b/simsimd index 127ead1d..18d17686 160000 --- a/simsimd +++ b/simsimd @@ -1 +1 @@ -Subproject commit 127ead1da7c39957b30a50dd85e74814edb022d6 +Subproject commit 18d17686124ddebd9fe55eee56b2e0273a613d4b diff --git a/stringzilla b/stringzilla index c2848c1b..1a4b05d8 160000 --- a/stringzilla +++ b/stringzilla @@ -1 +1 @@ -Subproject commit c2848c1ba777c541af2903501f3d6344d711638b +Subproject commit 1a4b05d8d6b7bc617b8e857d36b5dc1869685a7d