ci: add riscv64 RVV cross-compile workflow ported from faiss #2593
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Main | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths-ignore: &paths-ignore | |
| - '**.md' | |
| - '.github/CODEOWNERS' | |
| - '.github/ISSUE_TEMPLATE/**' | |
| - '.github/auto-assign-config.yml' | |
| - '.github/codecov.yml' | |
| - '.github/dependabot.yml' | |
| - '.github/workflows/auto-assign.yml' | |
| - '.github/workflows/community-pr-handler.yml' | |
| - '.github/workflows/issue-auto-assign.yml' | |
| - '.github/workflows/build_wheel.yml' | |
| - '.github/workflows/build_test_wheel.yml' | |
| - '.github/workflows/_build_wheel_job.yml' | |
| - '.github/workflows/continuous_bench.yml' | |
| - '.github/workflows/nightly_coverage.yml' | |
| - '.github/workflows/07-linux-riscv-build.yml' | |
| - '.github/workflows/docker/**' | |
| - '.github/workflows/scripts/**' | |
| merge_group: | |
| pull_request: | |
| branches: [ "main" ] | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| paths-ignore: *paths-ignore | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Code quality checks (fast, run first) | |
| lint: | |
| if: >- | |
| github.event_name != 'pull_request' || | |
| (!github.event.pull_request.draft && | |
| !contains(github.event.pull_request.title, 'wip')) | |
| uses: ./.github/workflows/02-lint-check.yml | |
| # Static analysis: clang-tidy on changed C/C++ files | |
| clang-tidy: | |
| if: >- | |
| github.event_name != 'pull_request' || | |
| (!github.event.pull_request.draft && | |
| !contains(github.event.pull_request.title, 'wip')) | |
| uses: ./.github/workflows/clang_tidy.yml | |
| # Main build and test matrix | |
| build-and-test-macos-arm64: | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| name: Build & Test (macos-arm64) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/03-macos-linux-build.yml | |
| with: | |
| platform: macos-arm64 | |
| os: macos-15 | |
| build-and-test-macos-26-arm64: | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| name: Build & Test (macos-26-arm64) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/03-macos-linux-build.yml | |
| with: | |
| platform: macos-arm64 | |
| os: macos-26 | |
| build-and-test-linux-arm64: | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| name: Build & Test (linux-arm64) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/03-macos-linux-build.yml | |
| with: | |
| platform: linux-arm64 | |
| os: ubuntu-24.04-arm | |
| build-and-test-linux-x64: | |
| name: Build & Test (linux-x64) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/03-macos-linux-build.yml | |
| with: | |
| platform: linux-x64 | |
| os: ubuntu-24.04 | |
| build-and-test-linux-x64-clang: | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| name: Build & Test (linux-x64-clang) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/03-macos-linux-build.yml | |
| with: | |
| platform: linux-x64-clang | |
| os: ubuntu-24.04 | |
| compiler: clang | |
| build-android: | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| name: Build & Test (android) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/04-android-build.yml | |
| build-and-test-on-windows: | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| name: Build & Test (Windows) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/05-windows-build.yml | |
| build-ios: | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| name: Build & Test (iOS) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/06-ios-build.yml | |
| build-and-test-musllinux: | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| name: Build & Test (musllinux) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/09-musllinux-build.yml | |
| # RISC-V Vector (RVV) smoke test: cross-compile for riscv64 and run the | |
| # ailego unit tests under qemu-user (ported from faiss's | |
| # linux-riscv64-DD-cmake job). Complements the weekly native riscv | |
| # build (07-linux-riscv-build.yml) with per-PR coverage. | |
| build-and-test-linux-riscv64-rvv-cross: | |
| if: github.event_name != 'push' || github.ref != 'refs/heads/main' | |
| name: Build & Test (linux-riscv64 RVV cross) | |
| needs: [lint, clang-tidy] | |
| uses: ./.github/workflows/08-linux-riscv64-rvv-cross.yml |