Add AddCollectionFuntion/AlterCollectionFunction/DropCollectionFunction #646
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: Build and test | |
| on: | |
| push: | |
| # file paths to consider in the event. Optional; defaults to all. | |
| paths: | |
| - 'cmake/**' | |
| - 'examples/**' | |
| - 'scripts/**' | |
| - 'src/**' | |
| - 'test/**' | |
| - 'thirdparty/**' | |
| - '.github/workflows/main.yaml' | |
| - '!**.md' | |
| - '.clang-format' | |
| - '.clang-tidy' | |
| pull_request: | |
| # file paths to consider in the event. Optional; defaults to all. | |
| paths: | |
| - 'cmake/**' | |
| - 'examples/**' | |
| - 'scripts/**' | |
| - 'src/**' | |
| - 'test/**' | |
| - 'thirdparty/**' | |
| - '.github/workflows/main.yaml' | |
| - '!**.md' | |
| - '.clang-format' | |
| - '.clang-tidy' | |
| jobs: | |
| # Detect whether the PR touches core SDK files (src, cmake, test, | |
| # thirdparty, scripts, workflow, lint configs) or only peripheral files | |
| # (examples/**). Changes limited to examples/** skip the heavy CI jobs | |
| # (integration, coverage, macOS, Windows) and only run the Linux build, | |
| # which is enough to catch regressions in the example code itself. | |
| changes: | |
| name: Detect path changes | |
| runs-on: ubuntu-latest | |
| outputs: | |
| core_relevant: ${{ steps.filter.outputs.core_relevant }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| core_relevant: | |
| - 'cmake/**' | |
| - 'scripts/**' | |
| - 'src/**' | |
| - 'test/**' | |
| - 'thirdparty/**' | |
| - '.github/workflows/main.yaml' | |
| - '.clang-format' | |
| - '.clang-tidy' | |
| linux: | |
| name: Build and test AMD64 ${{ matrix.os.distro }} ${{ matrix.os.version }} | |
| runs-on: ubuntu-latest | |
| container: ${{ matrix.os.image }} | |
| timeout-minutes: 75 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - distro: Ubuntu | |
| version: 20.04 | |
| image: ubuntu:20.04 | |
| key: u2004 | |
| - distro: Fedora | |
| version: 39 | |
| image: fedora:39 | |
| key: fc39 | |
| env: | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_COMPILERCHECK: content | |
| CCACHE_COMPRESS: 1 | |
| CCACHE_COMPRESSLEVEL: 5 | |
| CCACHE_MAXSIZE: 2G | |
| steps: | |
| - name: Env | |
| run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache ccache and conan | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/.ccache | |
| /github/home/.conan2 | |
| key: linux-${{ matrix.os.key }}-cache-${{ github.sha }} | |
| restore-keys: linux-${{ matrix.os.key }}-cache- | |
| - name: Prepare | |
| run: | | |
| sh scripts/install_deps.sh | |
| - name: Lint | |
| if: ${{ matrix.os.distro == 'Ubuntu' }} | |
| run: | | |
| make lint | |
| - name: Unit Testing | |
| run: | | |
| make test | |
| integration-test: | |
| name: Integration test | |
| # Skip for examples-only changes; linux job alone validates them. | |
| needs: changes | |
| if: needs.changes.outputs.core_relevant == 'true' | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 75 | |
| env: | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_COMPILERCHECK: content | |
| CCACHE_COMPRESS: 1 | |
| CCACHE_COMPRESSLEVEL: 5 | |
| CCACHE_MAXSIZE: 2G | |
| steps: | |
| - name: Env | |
| run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache ccache and conan | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/.ccache | |
| ~/.conan2 | |
| key: ubuntu-2204-st-cache-${{ github.sha }} | |
| restore-keys: ubuntu-2204-st-cache- | |
| - name: Prepare | |
| run: | | |
| sh scripts/install_deps.sh | |
| - name: Integration Testing | |
| run: | | |
| make st | |
| coverage-ubuntu: | |
| name: Test all with coverage | |
| # Skip for examples-only changes; coverage only measures SDK code. | |
| needs: changes | |
| if: needs.changes.outputs.core_relevant == 'true' | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 120 | |
| env: | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_COMPILERCHECK: content | |
| CCACHE_COMPRESS: 1 | |
| CCACHE_COMPRESSLEVEL: 5 | |
| CCACHE_MAXSIZE: 2G | |
| steps: | |
| - name: Env | |
| run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache ccache and conan | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/.ccache | |
| ~/.conan2 | |
| key: ubuntu-2204-coverage-cache-${{ github.sha }} | |
| restore-keys: ubuntu-2204-coverage-cache- | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.8' | |
| - name: Prepare | |
| run: | | |
| sh scripts/install_deps.sh | |
| - name: Testing With Coverage | |
| run: | | |
| make coverage | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: ./code_coverage/lcov_output.info | |
| name: ubuntu-22.04-coverage | |
| disable_safe_directory: true | |
| verbose: true | |
| macos: | |
| name: Build and test macOS 15 | |
| # Skip for examples-only changes; macOS runners are scarce. | |
| needs: changes | |
| if: needs.changes.outputs.core_relevant == 'true' | |
| runs-on: macos-15 | |
| timeout-minutes: 75 | |
| env: | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_COMPILERCHECK: content | |
| CCACHE_COMPRESS: 1 | |
| CCACHE_CPP2: true | |
| CCACHE_COMPRESSLEVEL: 5 | |
| CCACHE_MAXSIZE: 2G | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/.ccache | |
| key: macos-15-ccache-${{ github.sha }} | |
| restore-keys: macos-15-ccache- | |
| - name: Prepare | |
| run: | | |
| mkdir ~/.venv | |
| python3 -m venv ~/.venv | |
| source ~/.venv/bin/activate | |
| sh scripts/install_deps.sh | |
| - name: Unit Testing | |
| run: | | |
| source ~/.venv/bin/activate | |
| make test | |
| windows: | |
| name: Build and test windows | |
| # Skip for examples-only changes; Windows builds are slow. | |
| needs: changes | |
| if: needs.changes.outputs.core_relevant == 'true' | |
| runs-on: windows-2022 | |
| timeout-minutes: 75 | |
| env: | |
| CCACHE_DIR: ${{ github.workspace }}/.ccache | |
| CCACHE_COMPILERCHECK: content | |
| CCACHE_COMPRESS: 1 | |
| CCACHE_COMPRESSLEVEL: 5 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Cache ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ${{ github.workspace }}/.ccache | |
| key: windows-ccache-${{ github.sha }} | |
| restore-keys: windows-ccache- | |
| - name: Install dependencies on windows | |
| shell: cmd | |
| run: | | |
| choco install cmake ninja ccache --no-progress | |
| cmake --version | |
| ninja --version | |
| where ccache >nul 2>&1 && (ccache --version) || (echo ccache not installed - build will proceed without caching) | |
| - name: Build | |
| shell: cmd | |
| run: | | |
| call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
| rem Enable ccache launcher only if ccache is available. Chocolatey | |
| rem sometimes fails to install it (503/504 outages); without this | |
| rem guard every compile would try to spawn a non-existent ccache.exe | |
| rem and the build would die with "CreateProcess failed". | |
| where ccache >nul 2>&1 && (set LAUNCHER=-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache) || (set LAUNCHER=) | |
| cmake -S . -B build -DMILVUS_BUILD_TEST=YES -G Ninja %LAUNCHER% | |
| cmake --build build | |
| - name: Unit Testing | |
| shell: cmd | |
| run: | | |
| build\test\testing-ut | |
| build\test\testing-it |