From bd862242be76ba91b42c77e46af5597dac4f58aa Mon Sep 17 00:00:00 2001 From: ihb2032 Date: Wed, 15 Apr 2026 18:48:11 +0800 Subject: [PATCH 1/8] ci: Add RISE RISC-V runner Introduce the RISC-V CI runner provided by the RISE project. This enables automated testing and building for the RISC-V architecture. Signed-off-by: ihb2032 --- .github/workflows/01-ci-pipeline.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/01-ci-pipeline.yml b/.github/workflows/01-ci-pipeline.yml index ce9f8e2ef..f49772d51 100644 --- a/.github/workflows/01-ci-pipeline.yml +++ b/.github/workflows/01-ci-pipeline.yml @@ -97,6 +97,14 @@ jobs: os: ubuntu-24.04 compiler: clang + build-and-test-linux-riscv64: + name: Build & Test (linux-riscv64) + needs: lint + uses: ./.github/workflows/03-macos-linux-build.yml + with: + platform: linux-riscv64 + os: ubuntu-24.04-riscv + build-android: if: github.event_name != 'push' || github.ref != 'refs/heads/main' name: Build & Test (android) From c1cee98da5a2f78bc86453f01747ca6534896cf7 Mon Sep 17 00:00:00 2001 From: ihb2032 Date: Thu, 16 Apr 2026 21:24:21 +0800 Subject: [PATCH 2/8] ci: add RISC-V wheel cache Signed-off-by: ihb2032 --- .github/workflows/03-macos-linux-build.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/03-macos-linux-build.yml b/.github/workflows/03-macos-linux-build.yml index b396a9725..2b9a8a459 100644 --- a/.github/workflows/03-macos-linux-build.yml +++ b/.github/workflows/03-macos-linux-build.yml @@ -86,6 +86,22 @@ jobs: echo "$(python -c 'import site; print(site.USER_BASE)')/bin" >> $GITHUB_PATH shell: bash + - name: Get pip cache dir + if: ${{ contains(inputs.os, 'riscv') }} + id: pip-cache + run: | + echo "dir=$($PYTHON -m pip cache dir)" >> $GITHUB_OUTPUT + shell: bash + + - name: Cache pip dependencies for RISC-V + if: ${{ contains(inputs.os, 'riscv') }} + uses: actions/cache@v4 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-riscv-pip-${{ hashFiles('**/pyproject.toml') }} + restore-keys: | + ${{ runner.os }}-riscv-pip- + - name: Install dependencies run: | python -m pip install --upgrade pip From df1a4a4eec2a87996c283568f9ebc5069e6cafff Mon Sep 17 00:00:00 2001 From: ihb2032 Date: Fri, 17 Apr 2026 08:51:10 +0800 Subject: [PATCH 3/8] ci: use pre-built RISE numpy wheel to speed up riscv builds Signed-off-by: ihb2032 --- .github/workflows/03-macos-linux-build.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/03-macos-linux-build.yml b/.github/workflows/03-macos-linux-build.yml index 2b9a8a459..b396a9725 100644 --- a/.github/workflows/03-macos-linux-build.yml +++ b/.github/workflows/03-macos-linux-build.yml @@ -86,22 +86,6 @@ jobs: echo "$(python -c 'import site; print(site.USER_BASE)')/bin" >> $GITHUB_PATH shell: bash - - name: Get pip cache dir - if: ${{ contains(inputs.os, 'riscv') }} - id: pip-cache - run: | - echo "dir=$($PYTHON -m pip cache dir)" >> $GITHUB_OUTPUT - shell: bash - - - name: Cache pip dependencies for RISC-V - if: ${{ contains(inputs.os, 'riscv') }} - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache.outputs.dir }} - key: ${{ runner.os }}-riscv-pip-${{ hashFiles('**/pyproject.toml') }} - restore-keys: | - ${{ runner.os }}-riscv-pip- - - name: Install dependencies run: | python -m pip install --upgrade pip From befc85a034a64dda14e8a1220e837b7a9daf7a62 Mon Sep 17 00:00:00 2001 From: ihb2032 Date: Sat, 18 Apr 2026 17:38:04 +0800 Subject: [PATCH 4/8] ci: split RISC-V build and test into separate jobs Signed-off-by: ihb2032 --- .github/workflows/01-ci-pipeline.yml | 5 +- .github/workflows/07-linux-riscv-build.yml | 165 ++++++++++++++++++++- 2 files changed, 165 insertions(+), 5 deletions(-) diff --git a/.github/workflows/01-ci-pipeline.yml b/.github/workflows/01-ci-pipeline.yml index f49772d51..18980a52f 100644 --- a/.github/workflows/01-ci-pipeline.yml +++ b/.github/workflows/01-ci-pipeline.yml @@ -100,10 +100,7 @@ jobs: build-and-test-linux-riscv64: name: Build & Test (linux-riscv64) needs: lint - uses: ./.github/workflows/03-macos-linux-build.yml - with: - platform: linux-riscv64 - os: ubuntu-24.04-riscv + uses: ./.github/workflows/07-linux-riscv-build.yml build-android: if: github.event_name != 'push' || github.ref != 'refs/heads/main' diff --git a/.github/workflows/07-linux-riscv-build.yml b/.github/workflows/07-linux-riscv-build.yml index bd4fb3a16..ba8b34128 100644 --- a/.github/workflows/07-linux-riscv-build.yml +++ b/.github/workflows/07-linux-riscv-build.yml @@ -1,3 +1,4 @@ +<<<<<<< HEAD name: Nightly Linux RISC-V Build on: @@ -5,13 +6,22 @@ on: - cron: '0 16 * * *' workflow_dispatch: +======= +name: Linux RISC-V Build + +on: + workflow_call: +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) permissions: contents: read env: RISE_PYPI: https://gitlab.com/api/v4/projects/56254198/packages/pypi/simple +<<<<<<< HEAD PIP_BREAK_SYSTEM_PACKAGES: 1 +======= +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) jobs: build: @@ -22,11 +32,15 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: +<<<<<<< HEAD ref: main +======= +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) submodules: recursive - name: Install build dependencies run: | +<<<<<<< HEAD sudo mkdir -p /var/lib/dpkg/updates sudo mkdir -p /var/lib/apt/lists/ sudo mkdir -p /var/cache/apt/archives/ @@ -46,6 +60,12 @@ jobs: key: linux-riscv64-${{ runner.os }}-gcc max-size: 150M +======= + sudo apt-get update + sudo apt-get install -y python3-pybind11 pybind11-dev + shell: bash + +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) - name: Build from source run: | cd "$GITHUB_WORKSPACE" @@ -55,6 +75,7 @@ jobs: -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TOOLS=ON \ +<<<<<<< HEAD -DBUILD_PYTHON_BINDINGS=ON \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache @@ -76,10 +97,27 @@ jobs: cpp-tests: name: C++ Tests +======= + -DBUILD_PYTHON_BINDINGS=ON + make -C build -j"$NPROC" + shell: bash + + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: linux-riscv64-build + path: build + if-no-files-found: error + compression-level: 0 + + cpp-tests: + name: C++ Tests (linux-riscv64) +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) runs-on: ubuntu-24.04-riscv needs: build steps: +<<<<<<< HEAD - name: Download workspace artifacts uses: actions/download-artifact@v8 with: @@ -124,20 +162,46 @@ jobs: -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache shell: bash +======= + - name: Checkout code + uses: actions/checkout@v6 + with: + submodules: recursive + + - name: Set up environment variables + run: | + NPROC=$(nproc 2>/dev/null || echo 2) + echo "NPROC=$NPROC" >> "$GITHUB_ENV" + shell: bash + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: linux-riscv64-build + path: build +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) - name: Run C++ Tests run: | cd "$GITHUB_WORKSPACE/build" +<<<<<<< HEAD NPROC=$(nproc 2>/dev/null || echo 2) +======= +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) make unittest -j"$NPROC" shell: bash python-tests: +<<<<<<< HEAD name: Python Tests +======= + name: Python Tests (linux-riscv64) +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) runs-on: ubuntu-24.04-riscv needs: build steps: +<<<<<<< HEAD - name: Select Python run: | if command -v python3 >/dev/null 2>&1; then @@ -209,20 +273,59 @@ jobs: -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -Dpybind11_DIR="$($PYTHON -c 'import pybind11; print(pybind11.get_cmake_dir())')" +======= + - name: Checkout code + uses: actions/checkout@v6 + with: + submodules: recursive + + - name: Select Python + run: | + python3.10 --version + echo "PYTHON=python3.10" >> "$GITHUB_ENV" + shell: bash + + - name: Set up environment variables + run: | + NPROC=$(nproc 2>/dev/null || echo 2) + echo "NPROC=$NPROC" >> "$GITHUB_ENV" + echo "$($PYTHON -c 'import site; print(site.USER_BASE)')/bin" >> "$GITHUB_PATH" + shell: bash + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: linux-riscv64-build + path: build + + - name: Install dependencies + run: | + $PYTHON -m pip install --upgrade pip + $PYTHON -m pip install numpy==2.2.2 cmake==3.30.0 ninja==1.11.1.1 --index-url "$RISE_PYPI" + $PYTHON -m pip install pybind11==3.0 pytest scikit-build-core setuptools_scm +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) shell: bash - name: Install from existing build directory run: | cd "$GITHUB_WORKSPACE" +<<<<<<< HEAD NPROC=$(nproc 2>/dev/null || echo 2) +======= + +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) export SKBUILD_BUILD_DIR="$GITHUB_WORKSPACE/build" CMAKE_GENERATOR="Unix Makefiles" \ CMAKE_BUILD_PARALLEL_LEVEL="$NPROC" \ $PYTHON -m pip install -v . \ --no-build-isolation \ +<<<<<<< HEAD --config-settings='cmake.define.BUILD_TOOLS="ON"' \ --config-settings='cmake.define.CMAKE_C_COMPILER_LAUNCHER=ccache' \ --config-settings='cmake.define.CMAKE_CXX_COMPILER_LAUNCHER=ccache' +======= + --config-settings='cmake.define.BUILD_TOOLS="ON"' +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) shell: bash - name: Run Python Tests @@ -232,11 +335,16 @@ jobs: shell: bash cpp-examples: +<<<<<<< HEAD name: C++ Examples +======= + name: C++ Examples (linux-riscv64) +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) runs-on: ubuntu-24.04-riscv needs: build steps: +<<<<<<< HEAD - name: Download workspace artifacts uses: actions/download-artifact@v8 with: @@ -269,15 +377,38 @@ jobs: with: key: linux-riscv64-${{ runner.os }}-gcc max-size: 150M +======= + - name: Checkout code + uses: actions/checkout@v6 + with: + submodules: recursive + + - name: Set up environment variables + run: | + NPROC=$(nproc 2>/dev/null || echo 2) + echo "NPROC=$NPROC" >> "$GITHUB_ENV" + shell: bash + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: linux-riscv64-build + path: build +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) - name: Run C++ Examples run: | cd "$GITHUB_WORKSPACE/examples/c++" +<<<<<<< HEAD NPROC=$(nproc 2>/dev/null || echo 2) mkdir -p build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache +======= + mkdir build && cd build + cmake .. -DCMAKE_BUILD_TYPE=Release +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) make -j "$NPROC" ./db-example ./core-example @@ -285,11 +416,16 @@ jobs: shell: bash c-examples: +<<<<<<< HEAD name: C Examples +======= + name: C Examples (linux-riscv64) +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) runs-on: ubuntu-24.04-riscv needs: build steps: +<<<<<<< HEAD - name: Download workspace artifacts uses: actions/download-artifact@v8 with: @@ -322,15 +458,38 @@ jobs: with: key: linux-riscv64-${{ runner.os }}-gcc max-size: 150M +======= + - name: Checkout code + uses: actions/checkout@v6 + with: + submodules: recursive + + - name: Set up environment variables + run: | + NPROC=$(nproc 2>/dev/null || echo 2) + echo "NPROC=$NPROC" >> "$GITHUB_ENV" + shell: bash + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: linux-riscv64-build + path: build +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) - name: Run C Examples run: | cd "$GITHUB_WORKSPACE/examples/c" +<<<<<<< HEAD NPROC=$(nproc 2>/dev/null || echo 2) mkdir -p build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache +======= + mkdir build && cd build + cmake .. -DCMAKE_BUILD_TYPE=Release +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) make -j "$NPROC" ./c_api_basic_example ./c_api_collection_schema_example @@ -338,4 +497,8 @@ jobs: ./c_api_field_schema_example ./c_api_index_example ./c_api_optimized_example - shell: bash \ No newline at end of file +<<<<<<< HEAD + shell: bash +======= + shell: bash +>>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) From 76ec70f20e3786d5021e2f3cf3c1057aa9eb75cb Mon Sep 17 00:00:00 2001 From: ihb2032 Date: Sun, 19 Apr 2026 07:56:13 +0800 Subject: [PATCH 5/8] ci: fix Signed-off-by: ihb2032 --- .github/workflows/07-linux-riscv-build.yml | 300 +-------------------- 1 file changed, 12 insertions(+), 288 deletions(-) diff --git a/.github/workflows/07-linux-riscv-build.yml b/.github/workflows/07-linux-riscv-build.yml index ba8b34128..33a05109c 100644 --- a/.github/workflows/07-linux-riscv-build.yml +++ b/.github/workflows/07-linux-riscv-build.yml @@ -1,27 +1,14 @@ -<<<<<<< HEAD -name: Nightly Linux RISC-V Build - -on: - schedule: - - cron: '0 16 * * *' - - workflow_dispatch: -======= name: Linux RISC-V Build on: workflow_call: ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) permissions: contents: read env: RISE_PYPI: https://gitlab.com/api/v4/projects/56254198/packages/pypi/simple -<<<<<<< HEAD PIP_BREAK_SYSTEM_PACKAGES: 1 -======= ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) jobs: build: @@ -32,40 +19,14 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: -<<<<<<< HEAD - ref: main -======= ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) submodules: recursive - name: Install build dependencies run: | -<<<<<<< HEAD - sudo mkdir -p /var/lib/dpkg/updates - sudo mkdir -p /var/lib/apt/lists/ - sudo mkdir -p /var/cache/apt/archives/ - sudo touch /var/lib/dpkg/status - sudo apt-get purge -y byobu || true - sudo apt-get update -o Dpkg::Lock::Timeout=300 - sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ - -o Dpkg::Options::="--force-confdef" \ - -o Dpkg::Options::="--force-confold" \ - -o Dpkg::Lock::Timeout=300 \ - ccache python3-pybind11 pybind11-dev - shell: bash - - - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: linux-riscv64-${{ runner.os }}-gcc - max-size: 150M - -======= sudo apt-get update sudo apt-get install -y python3-pybind11 pybind11-dev shell: bash ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) - name: Build from source run: | cd "$GITHUB_WORKSPACE" @@ -75,10 +36,7 @@ jobs: -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TOOLS=ON \ -<<<<<<< HEAD - -DBUILD_PYTHON_BINDINGS=ON \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache + -DBUILD_PYTHON_BINDINGS=ON make -C build -j"$NPROC" shell: bash @@ -97,27 +55,16 @@ jobs: cpp-tests: name: C++ Tests -======= - -DBUILD_PYTHON_BINDINGS=ON - make -C build -j"$NPROC" - shell: bash - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: linux-riscv64-build - path: build - if-no-files-found: error - compression-level: 0 - - cpp-tests: - name: C++ Tests (linux-riscv64) ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) runs-on: ubuntu-24.04-riscv needs: build steps: -<<<<<<< HEAD + - name: Install test dependencies + run: | + sudo apt-get update + sudo apt-get install -y python3-pybind11 pybind11-dev libgtest-dev liburing-dev + shell: bash + - name: Download workspace artifacts uses: actions/download-artifact@v8 with: @@ -130,27 +77,6 @@ jobs: tar -xf linux-riscv64-workspace.tar shell: bash - - name: Install test dependencies - run: | - sudo mkdir -p /var/lib/dpkg/updates - sudo mkdir -p /var/lib/apt/lists/ - sudo mkdir -p /var/cache/apt/archives/ - sudo touch /var/lib/dpkg/status - sudo apt-get purge -y byobu || true - sudo apt-get update -o Dpkg::Lock::Timeout=300 - sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ - -o Dpkg::Options::="--force-confdef" \ - -o Dpkg::Options::="--force-confold" \ - -o Dpkg::Lock::Timeout=300 \ - ccache python3-pybind11 pybind11-dev libgtest-dev liburing-dev - shell: bash - - - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: linux-riscv64-${{ runner.os }}-gcc - max-size: 150M - - name: Reconfigure build directory run: | cd "$GITHUB_WORKSPACE" @@ -158,50 +84,22 @@ jobs: -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TOOLS=ON \ - -DBUILD_PYTHON_BINDINGS=ON \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache - shell: bash -======= - - name: Checkout code - uses: actions/checkout@v6 - with: - submodules: recursive - - - name: Set up environment variables - run: | - NPROC=$(nproc 2>/dev/null || echo 2) - echo "NPROC=$NPROC" >> "$GITHUB_ENV" + -DBUILD_PYTHON_BINDINGS=ON shell: bash - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: linux-riscv64-build - path: build ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) - - name: Run C++ Tests run: | cd "$GITHUB_WORKSPACE/build" -<<<<<<< HEAD NPROC=$(nproc 2>/dev/null || echo 2) -======= ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) make unittest -j"$NPROC" shell: bash python-tests: -<<<<<<< HEAD name: Python Tests -======= - name: Python Tests (linux-riscv64) ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) runs-on: ubuntu-24.04-riscv needs: build steps: -<<<<<<< HEAD - name: Select Python run: | if command -v python3 >/dev/null 2>&1; then @@ -229,39 +127,15 @@ jobs: echo "$($PYTHON -c 'import site; print(site.USER_BASE)')/bin" >> "$GITHUB_PATH" shell: bash - - name: Cache pip - uses: actions/cache@v4 - with: - path: ~/.cache/pip - key: linux-riscv64-${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} - restore-keys: | - linux-riscv64-${{ runner.os }}-pip- - - name: Install dependencies run: | - sudo mkdir -p /var/lib/dpkg/updates - sudo mkdir -p /var/lib/apt/lists/ - sudo mkdir -p /var/cache/apt/archives/ - sudo touch /var/lib/dpkg/status - sudo apt-get purge -y byobu || true - sudo apt-get update -o Dpkg::Lock::Timeout=300 - sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ - -o Dpkg::Options::="--force-confdef" \ - -o Dpkg::Options::="--force-confold" \ - -o Dpkg::Lock::Timeout=300 \ - ccache libgtest-dev liburing-dev - + sudo apt-get update + sudo apt-get install -y libgtest-dev liburing-dev $PYTHON -m pip install --upgrade pip $PYTHON -m pip install numpy==2.2.2 cmake==3.30.0 ninja==1.11.1.1 --index-url "$RISE_PYPI" - $PYTHON -m pip install pybind11==3.0 pytest scikit-build-core setuptools_scm pytest-xdist + $PYTHON -m pip install pybind11==3.0 pytest scikit-build-core setuptools_scm shell: bash - - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: linux-riscv64-${{ runner.os }}-gcc - max-size: 150M - - name: Reconfigure build directory run: | cd "$GITHUB_WORKSPACE" @@ -269,63 +143,19 @@ jobs: -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TOOLS=ON \ - -DBUILD_PYTHON_BINDINGS=ON \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ - -Dpybind11_DIR="$($PYTHON -c 'import pybind11; print(pybind11.get_cmake_dir())')" -======= - - name: Checkout code - uses: actions/checkout@v6 - with: - submodules: recursive - - - name: Select Python - run: | - python3.10 --version - echo "PYTHON=python3.10" >> "$GITHUB_ENV" - shell: bash - - - name: Set up environment variables - run: | - NPROC=$(nproc 2>/dev/null || echo 2) - echo "NPROC=$NPROC" >> "$GITHUB_ENV" - echo "$($PYTHON -c 'import site; print(site.USER_BASE)')/bin" >> "$GITHUB_PATH" - shell: bash - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: linux-riscv64-build - path: build - - - name: Install dependencies - run: | - $PYTHON -m pip install --upgrade pip - $PYTHON -m pip install numpy==2.2.2 cmake==3.30.0 ninja==1.11.1.1 --index-url "$RISE_PYPI" - $PYTHON -m pip install pybind11==3.0 pytest scikit-build-core setuptools_scm ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) + -DBUILD_PYTHON_BINDINGS=ON shell: bash - name: Install from existing build directory run: | cd "$GITHUB_WORKSPACE" -<<<<<<< HEAD NPROC=$(nproc 2>/dev/null || echo 2) -======= - ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) export SKBUILD_BUILD_DIR="$GITHUB_WORKSPACE/build" CMAKE_GENERATOR="Unix Makefiles" \ CMAKE_BUILD_PARALLEL_LEVEL="$NPROC" \ $PYTHON -m pip install -v . \ --no-build-isolation \ -<<<<<<< HEAD - --config-settings='cmake.define.BUILD_TOOLS="ON"' \ - --config-settings='cmake.define.CMAKE_C_COMPILER_LAUNCHER=ccache' \ - --config-settings='cmake.define.CMAKE_CXX_COMPILER_LAUNCHER=ccache' -======= --config-settings='cmake.define.BUILD_TOOLS="ON"' ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) shell: bash - name: Run Python Tests @@ -335,16 +165,11 @@ jobs: shell: bash cpp-examples: -<<<<<<< HEAD name: C++ Examples -======= - name: C++ Examples (linux-riscv64) ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) runs-on: ubuntu-24.04-riscv needs: build steps: -<<<<<<< HEAD - name: Download workspace artifacts uses: actions/download-artifact@v8 with: @@ -357,58 +182,12 @@ jobs: tar -xf linux-riscv64-workspace.tar shell: bash - - name: Install ccache - run: | - sudo mkdir -p /var/lib/dpkg/updates - sudo mkdir -p /var/lib/apt/lists/ - sudo mkdir -p /var/cache/apt/archives/ - sudo touch /var/lib/dpkg/status - sudo apt-get purge -y byobu || true - sudo apt-get update -o Dpkg::Lock::Timeout=300 - sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ - -o Dpkg::Options::="--force-confdef" \ - -o Dpkg::Options::="--force-confold" \ - -o Dpkg::Lock::Timeout=300 \ - ccache - shell: bash - - - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: linux-riscv64-${{ runner.os }}-gcc - max-size: 150M -======= - - name: Checkout code - uses: actions/checkout@v6 - with: - submodules: recursive - - - name: Set up environment variables - run: | - NPROC=$(nproc 2>/dev/null || echo 2) - echo "NPROC=$NPROC" >> "$GITHUB_ENV" - shell: bash - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: linux-riscv64-build - path: build ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) - - name: Run C++ Examples run: | cd "$GITHUB_WORKSPACE/examples/c++" -<<<<<<< HEAD NPROC=$(nproc 2>/dev/null || echo 2) mkdir -p build && cd build - cmake .. -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -======= - mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) make -j "$NPROC" ./db-example ./core-example @@ -416,16 +195,11 @@ jobs: shell: bash c-examples: -<<<<<<< HEAD name: C Examples -======= - name: C Examples (linux-riscv64) ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) runs-on: ubuntu-24.04-riscv needs: build steps: -<<<<<<< HEAD - name: Download workspace artifacts uses: actions/download-artifact@v8 with: @@ -438,58 +212,12 @@ jobs: tar -xf linux-riscv64-workspace.tar shell: bash - - name: Install ccache - run: | - sudo mkdir -p /var/lib/dpkg/updates - sudo mkdir -p /var/lib/apt/lists/ - sudo mkdir -p /var/cache/apt/archives/ - sudo touch /var/lib/dpkg/status - sudo apt-get purge -y byobu || true - sudo apt-get update -o Dpkg::Lock::Timeout=300 - sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ - -o Dpkg::Options::="--force-confdef" \ - -o Dpkg::Options::="--force-confold" \ - -o Dpkg::Lock::Timeout=300 \ - ccache - shell: bash - - - name: Setup ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: linux-riscv64-${{ runner.os }}-gcc - max-size: 150M -======= - - name: Checkout code - uses: actions/checkout@v6 - with: - submodules: recursive - - - name: Set up environment variables - run: | - NPROC=$(nproc 2>/dev/null || echo 2) - echo "NPROC=$NPROC" >> "$GITHUB_ENV" - shell: bash - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: linux-riscv64-build - path: build ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) - - name: Run C Examples run: | cd "$GITHUB_WORKSPACE/examples/c" -<<<<<<< HEAD NPROC=$(nproc 2>/dev/null || echo 2) mkdir -p build && cd build - cmake .. -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER_LAUNCHER=ccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -======= - mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) make -j "$NPROC" ./c_api_basic_example ./c_api_collection_schema_example @@ -497,8 +225,4 @@ jobs: ./c_api_field_schema_example ./c_api_index_example ./c_api_optimized_example -<<<<<<< HEAD - shell: bash -======= shell: bash ->>>>>>> 2079ced (ci: split RISC-V build and test into separate jobs) From f0fd810854fa8f7f4a4fa4e6444ebe0e204517d1 Mon Sep 17 00:00:00 2001 From: ihb2032 Date: Sat, 25 Apr 2026 10:09:37 +0800 Subject: [PATCH 6/8] ci: fix Signed-off-by: ihb2032 --- .github/workflows/07-linux-riscv-build.yml | 153 ++++++++++++++++++--- 1 file changed, 133 insertions(+), 20 deletions(-) diff --git a/.github/workflows/07-linux-riscv-build.yml b/.github/workflows/07-linux-riscv-build.yml index 33a05109c..bd4fb3a16 100644 --- a/.github/workflows/07-linux-riscv-build.yml +++ b/.github/workflows/07-linux-riscv-build.yml @@ -1,7 +1,10 @@ -name: Linux RISC-V Build +name: Nightly Linux RISC-V Build on: - workflow_call: + schedule: + - cron: '0 16 * * *' + + workflow_dispatch: permissions: contents: read @@ -19,14 +22,30 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: + ref: main submodules: recursive - name: Install build dependencies run: | - sudo apt-get update - sudo apt-get install -y python3-pybind11 pybind11-dev + sudo mkdir -p /var/lib/dpkg/updates + sudo mkdir -p /var/lib/apt/lists/ + sudo mkdir -p /var/cache/apt/archives/ + sudo touch /var/lib/dpkg/status + sudo apt-get purge -y byobu || true + sudo apt-get update -o Dpkg::Lock::Timeout=300 + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + -o Dpkg::Lock::Timeout=300 \ + ccache python3-pybind11 pybind11-dev shell: bash + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: linux-riscv64-${{ runner.os }}-gcc + max-size: 150M + - name: Build from source run: | cd "$GITHUB_WORKSPACE" @@ -36,7 +55,9 @@ jobs: -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TOOLS=ON \ - -DBUILD_PYTHON_BINDINGS=ON + -DBUILD_PYTHON_BINDINGS=ON \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache make -C build -j"$NPROC" shell: bash @@ -59,12 +80,6 @@ jobs: needs: build steps: - - name: Install test dependencies - run: | - sudo apt-get update - sudo apt-get install -y python3-pybind11 pybind11-dev libgtest-dev liburing-dev - shell: bash - - name: Download workspace artifacts uses: actions/download-artifact@v8 with: @@ -77,6 +92,27 @@ jobs: tar -xf linux-riscv64-workspace.tar shell: bash + - name: Install test dependencies + run: | + sudo mkdir -p /var/lib/dpkg/updates + sudo mkdir -p /var/lib/apt/lists/ + sudo mkdir -p /var/cache/apt/archives/ + sudo touch /var/lib/dpkg/status + sudo apt-get purge -y byobu || true + sudo apt-get update -o Dpkg::Lock::Timeout=300 + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + -o Dpkg::Lock::Timeout=300 \ + ccache python3-pybind11 pybind11-dev libgtest-dev liburing-dev + shell: bash + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: linux-riscv64-${{ runner.os }}-gcc + max-size: 150M + - name: Reconfigure build directory run: | cd "$GITHUB_WORKSPACE" @@ -84,7 +120,9 @@ jobs: -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TOOLS=ON \ - -DBUILD_PYTHON_BINDINGS=ON + -DBUILD_PYTHON_BINDINGS=ON \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache shell: bash - name: Run C++ Tests @@ -127,15 +165,39 @@ jobs: echo "$($PYTHON -c 'import site; print(site.USER_BASE)')/bin" >> "$GITHUB_PATH" shell: bash + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: linux-riscv64-${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} + restore-keys: | + linux-riscv64-${{ runner.os }}-pip- + - name: Install dependencies run: | - sudo apt-get update - sudo apt-get install -y libgtest-dev liburing-dev + sudo mkdir -p /var/lib/dpkg/updates + sudo mkdir -p /var/lib/apt/lists/ + sudo mkdir -p /var/cache/apt/archives/ + sudo touch /var/lib/dpkg/status + sudo apt-get purge -y byobu || true + sudo apt-get update -o Dpkg::Lock::Timeout=300 + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + -o Dpkg::Lock::Timeout=300 \ + ccache libgtest-dev liburing-dev + $PYTHON -m pip install --upgrade pip $PYTHON -m pip install numpy==2.2.2 cmake==3.30.0 ninja==1.11.1.1 --index-url "$RISE_PYPI" - $PYTHON -m pip install pybind11==3.0 pytest scikit-build-core setuptools_scm + $PYTHON -m pip install pybind11==3.0 pytest scikit-build-core setuptools_scm pytest-xdist shell: bash + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: linux-riscv64-${{ runner.os }}-gcc + max-size: 150M + - name: Reconfigure build directory run: | cd "$GITHUB_WORKSPACE" @@ -143,7 +205,10 @@ jobs: -G "Unix Makefiles" \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TOOLS=ON \ - -DBUILD_PYTHON_BINDINGS=ON + -DBUILD_PYTHON_BINDINGS=ON \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ + -Dpybind11_DIR="$($PYTHON -c 'import pybind11; print(pybind11.get_cmake_dir())')" shell: bash - name: Install from existing build directory @@ -155,7 +220,9 @@ jobs: CMAKE_BUILD_PARALLEL_LEVEL="$NPROC" \ $PYTHON -m pip install -v . \ --no-build-isolation \ - --config-settings='cmake.define.BUILD_TOOLS="ON"' + --config-settings='cmake.define.BUILD_TOOLS="ON"' \ + --config-settings='cmake.define.CMAKE_C_COMPILER_LAUNCHER=ccache' \ + --config-settings='cmake.define.CMAKE_CXX_COMPILER_LAUNCHER=ccache' shell: bash - name: Run Python Tests @@ -182,12 +249,35 @@ jobs: tar -xf linux-riscv64-workspace.tar shell: bash + - name: Install ccache + run: | + sudo mkdir -p /var/lib/dpkg/updates + sudo mkdir -p /var/lib/apt/lists/ + sudo mkdir -p /var/cache/apt/archives/ + sudo touch /var/lib/dpkg/status + sudo apt-get purge -y byobu || true + sudo apt-get update -o Dpkg::Lock::Timeout=300 + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + -o Dpkg::Lock::Timeout=300 \ + ccache + shell: bash + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: linux-riscv64-${{ runner.os }}-gcc + max-size: 150M + - name: Run C++ Examples run: | cd "$GITHUB_WORKSPACE/examples/c++" NPROC=$(nproc 2>/dev/null || echo 2) mkdir -p build && cd build - cmake .. -DCMAKE_BUILD_TYPE=Release + cmake .. -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache make -j "$NPROC" ./db-example ./core-example @@ -212,12 +302,35 @@ jobs: tar -xf linux-riscv64-workspace.tar shell: bash + - name: Install ccache + run: | + sudo mkdir -p /var/lib/dpkg/updates + sudo mkdir -p /var/lib/apt/lists/ + sudo mkdir -p /var/cache/apt/archives/ + sudo touch /var/lib/dpkg/status + sudo apt-get purge -y byobu || true + sudo apt-get update -o Dpkg::Lock::Timeout=300 + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + -o Dpkg::Lock::Timeout=300 \ + ccache + shell: bash + + - name: Setup ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: linux-riscv64-${{ runner.os }}-gcc + max-size: 150M + - name: Run C Examples run: | cd "$GITHUB_WORKSPACE/examples/c" NPROC=$(nproc 2>/dev/null || echo 2) mkdir -p build && cd build - cmake .. -DCMAKE_BUILD_TYPE=Release + cmake .. -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER_LAUNCHER=ccache \ + -DCMAKE_CXX_COMPILER_LAUNCHER=ccache make -j "$NPROC" ./c_api_basic_example ./c_api_collection_schema_example @@ -225,4 +338,4 @@ jobs: ./c_api_field_schema_example ./c_api_index_example ./c_api_optimized_example - shell: bash + shell: bash \ No newline at end of file From 05f54183e1eb8a5c4f59f61b8c2ea869ee053b53 Mon Sep 17 00:00:00 2001 From: ihb2032 Date: Wed, 29 Apr 2026 14:20:21 +0800 Subject: [PATCH 7/8] ci: add RVV CI using cloud-v runner Signed-off-by: ihb2032 --- .github/workflows/01-ci-pipeline.yml | 5 + .../08-linux-riscv-rvv-cloud-v-build.yml | 207 ++++++++++++++++++ 2 files changed, 212 insertions(+) create mode 100644 .github/workflows/08-linux-riscv-rvv-cloud-v-build.yml diff --git a/.github/workflows/01-ci-pipeline.yml b/.github/workflows/01-ci-pipeline.yml index 18980a52f..8e7d6247b 100644 --- a/.github/workflows/01-ci-pipeline.yml +++ b/.github/workflows/01-ci-pipeline.yml @@ -119,3 +119,8 @@ jobs: name: Build & Test (iOS) needs: [lint, clang-tidy] uses: ./.github/workflows/06-ios-build.yml + + build-and-test-linux-riscv64-rvv: + name: Build & Test (linux-riscv64-rvv) + needs: lint + uses: ./.github/workflows/08-linux-riscv-rvv-cloud-v-build.yml diff --git a/.github/workflows/08-linux-riscv-rvv-cloud-v-build.yml b/.github/workflows/08-linux-riscv-rvv-cloud-v-build.yml new file mode 100644 index 000000000..73a482c7e --- /dev/null +++ b/.github/workflows/08-linux-riscv-rvv-cloud-v-build.yml @@ -0,0 +1,207 @@ +name: Linux RISC-V RVV Cloud-V Build + +on: + workflow_call: + +permissions: + contents: read + +env: + RISE_PYPI: https://gitlab.com/api/v4/projects/56254198/packages/pypi/simple + PIP_BREAK_SYSTEM_PACKAGES: 1 + WORKSPACE_ARTIFACT: linux-riscv64-rvv-banana-pi-f3-workspace + RISCV_CMAKE_ARGS: >- + -DENABLE_RISCV64=ON + -DENABLE_RISCV_VECTOR=ON + -DENABLE_RISCV_ZVFH=ON + -DENABLE_RISCV_ZIHINTPAUSE=ON + +jobs: + build: + name: Build (linux-riscv64-rvv) + runs-on: banana-pi-f3 + + steps: + - name: Checkout code + uses: actions/checkout@v6 + with: + submodules: recursive + + - name: Install build dependencies + run: | + sudo mkdir -p /var/lib/dpkg/updates + sudo mkdir -p /var/lib/apt/lists/ + sudo mkdir -p /var/cache/apt/archives/ + sudo touch /var/lib/dpkg/status + sudo apt-get purge -y byobu || true + sudo apt-get update -o Dpkg::Lock::Timeout=300 + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + -o Dpkg::Lock::Timeout=300 \ + python3-pybind11 pybind11-dev + shell: bash + + - name: Build from source + run: | + cd "$GITHUB_WORKSPACE" + NPROC=$(nproc 2>/dev/null || echo 2) + echo "Using $NPROC parallel jobs for builds" + cmake -S . -B build \ + -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TOOLS=ON \ + -DBUILD_PYTHON_BINDINGS=ON \ + $RISCV_CMAKE_ARGS + make -C build -j"$NPROC" + shell: bash + + - name: Archive entire workspace + run: | + cd "$GITHUB_WORKSPACE" + tar -cf "${WORKSPACE_ARTIFACT}.tar" . + shell: bash + + - name: Upload workspace artifacts + uses: actions/upload-artifact@v7 + with: + name: ${{ env.WORKSPACE_ARTIFACT }} + path: ${{ github.workspace }}/${{ env.WORKSPACE_ARTIFACT }}.tar + if-no-files-found: error + + cpp-tests: + name: C++ Tests (linux-riscv64-rvv) + runs-on: banana-pi-f3 + needs: build + + steps: + - name: Download workspace artifacts + uses: actions/download-artifact@v8 + with: + name: ${{ env.WORKSPACE_ARTIFACT }} + path: ${{ github.workspace }} + + - name: Extract workspace + run: | + cd "$GITHUB_WORKSPACE" + tar -xf "${WORKSPACE_ARTIFACT}.tar" + shell: bash + + - name: Install test dependencies + run: | + sudo mkdir -p /var/lib/dpkg/updates + sudo mkdir -p /var/lib/apt/lists/ + sudo mkdir -p /var/cache/apt/archives/ + sudo touch /var/lib/dpkg/status + sudo apt-get purge -y byobu || true + sudo apt-get update -o Dpkg::Lock::Timeout=300 + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + -o Dpkg::Lock::Timeout=300 \ + python3-pybind11 pybind11-dev libgtest-dev liburing-dev + shell: bash + + - name: Reconfigure build directory + run: | + cd "$GITHUB_WORKSPACE" + cmake -S . -B build \ + -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TOOLS=ON \ + -DBUILD_PYTHON_BINDINGS=ON \ + $RISCV_CMAKE_ARGS + shell: bash + + - name: Run C++ Tests + run: | + cd "$GITHUB_WORKSPACE/build" + NPROC=$(nproc 2>/dev/null || echo 2) + make unittest -j"$NPROC" + shell: bash + + python-tests: + name: Python Tests (linux-riscv64-rvv) + runs-on: banana-pi-f3 + needs: build + + steps: + - name: Select Python + run: | + if command -v python3 >/dev/null 2>&1; then + PYTHON_BIN=python3 + elif command -v python >/dev/null 2>&1; then + PYTHON_BIN=python + else + echo "No local Python interpreter found on PATH" + exit 1 + fi + "$PYTHON_BIN" --version + echo "PYTHON=$PYTHON_BIN" >> "$GITHUB_ENV" + shell: bash + + - name: Download workspace artifacts + uses: actions/download-artifact@v8 + with: + name: ${{ env.WORKSPACE_ARTIFACT }} + path: ${{ github.workspace }} + + - name: Extract workspace + run: | + cd "$GITHUB_WORKSPACE" + tar -xf "${WORKSPACE_ARTIFACT}.tar" + echo "$($PYTHON -c 'import site; print(site.USER_BASE)')/bin" >> "$GITHUB_PATH" + shell: bash + + - name: Install dependencies + run: | + sudo mkdir -p /var/lib/dpkg/updates + sudo mkdir -p /var/lib/apt/lists/ + sudo mkdir -p /var/cache/apt/archives/ + sudo touch /var/lib/dpkg/status + sudo apt-get purge -y byobu || true + sudo apt-get update -o Dpkg::Lock::Timeout=300 + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq \ + -o Dpkg::Options::="--force-confdef" \ + -o Dpkg::Options::="--force-confold" \ + -o Dpkg::Lock::Timeout=300 \ + libgtest-dev liburing-dev + + $PYTHON -m pip install --upgrade pip + $PYTHON -m pip install numpy==2.2.2 cmake==3.30.0 ninja==1.11.1.1 --index-url "$RISE_PYPI" + $PYTHON -m pip install pybind11==3.0 pytest scikit-build-core setuptools_scm + shell: bash + + - name: Reconfigure build directory + run: | + cd "$GITHUB_WORKSPACE" + cmake -S . -B build \ + -G "Unix Makefiles" \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TOOLS=ON \ + -DBUILD_PYTHON_BINDINGS=ON \ + $RISCV_CMAKE_ARGS \ + -Dpybind11_DIR="$($PYTHON -c 'import pybind11; print(pybind11.get_cmake_dir())')" + shell: bash + + - name: Install from existing build directory + run: | + cd "$GITHUB_WORKSPACE" + NPROC=$(nproc 2>/dev/null || echo 2) + export SKBUILD_BUILD_DIR="$GITHUB_WORKSPACE/build" + CMAKE_GENERATOR="Unix Makefiles" \ + CMAKE_BUILD_PARALLEL_LEVEL="$NPROC" \ + $PYTHON -m pip install -v . \ + --no-build-isolation \ + --config-settings='cmake.define.BUILD_TOOLS="ON"' \ + --config-settings='cmake.define.ENABLE_RISCV64="ON"' \ + --config-settings='cmake.define.ENABLE_RISCV_VECTOR="ON"' \ + --config-settings='cmake.define.ENABLE_RISCV_ZVFH="ON"' \ + --config-settings='cmake.define.ENABLE_RISCV_ZIHINTPAUSE="ON"' + shell: bash + + - name: Run Python Tests + run: | + cd "$GITHUB_WORKSPACE" + $PYTHON -m pytest python/tests/ + shell: bash From aa292ac0f7e8c80e64e064c1cee8c34482d7ebdb Mon Sep 17 00:00:00 2001 From: ihb2032 Date: Wed, 15 Apr 2026 18:48:11 +0800 Subject: [PATCH 8/8] ci: Add RISE RISC-V runner Introduce the RISC-V CI runner provided by the RISE project. This enables automated testing and building for the RISC-V architecture. Signed-off-by: ihb2032 --- .github/workflows/01-ci-pipeline.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/01-ci-pipeline.yml b/.github/workflows/01-ci-pipeline.yml index 8e7d6247b..4485a9114 100644 --- a/.github/workflows/01-ci-pipeline.yml +++ b/.github/workflows/01-ci-pipeline.yml @@ -101,6 +101,9 @@ jobs: name: Build & Test (linux-riscv64) needs: lint uses: ./.github/workflows/07-linux-riscv-build.yml + with: + platform: linux-riscv64 + os: ubuntu-24.04-riscv build-android: if: github.event_name != 'push' || github.ref != 'refs/heads/main'