chore: import upstream snapshot with attribution
Build and test / Build and test AMD64 Ubuntu 22.04 (push) Failing after 0s
Publish Builder / amazonlinux2023 (push) Failing after 1s
Build and test / UT for Go (push) Has been skipped
Publish KRTE Images / KRTE (push) Failing after 1s
Build and test / Integration Test (push) Has been skipped
Build and test / Upload Code Coverage (push) Has been skipped
Publish Builder / rockylinux9 (push) Failing after 1s
Publish Builder / ubuntu22.04 (push) Failing after 0s
Publish Builder / ubuntu24.04 (push) Failing after 0s
Publish Gpu Builder / publish-gpu-builder (push) Failing after 1s
Publish Test Images / PyTest (push) Failing after 0s
Build and test / UT for Cpp (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 12:31:17 +08:00
commit 498b235461
5446 changed files with 2748612 additions and 0 deletions
+67
View File
@@ -0,0 +1,67 @@
name: all-contributors
on:
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: '0 0,12 * * *'
jobs:
contributor:
runs-on: ubuntu-latest
if: github.repository == 'milvus-io/milvus'
steps:
- name: checkout code
uses: actions/checkout@v2
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
- name: log path
run: |
pwd
ls
- name: Update README.md
uses: milvus-io/hero-bot@dco-enabled
with:
# Required
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
repos: 'milvus-io/milvus,bootcamp,community,docs,milvus-helm,milvus-sdk-go,milvus-sdk-java,milvus-sdk-node,milvus.io,pymilvus,pymilvus-orm'
targetFile: './README.md'
# Optional
isAscend: True
width: '30px'
customUserConfig: 'milvus-io/milvus/.contributors'
workingDir: ${{ github.workspace }}
- name: Update README_CN.md
uses: milvus-io/hero-bot@dco-enabled
with:
# Required
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
repos: 'milvus-io/milvus,bootcamp,community,docs,milvus-helm,milvus-sdk-go,milvus-sdk-java,milvus-sdk-node,milvus.io,pymilvus,pymilvus-orm'
targetFile: './README_CN.md'
# Optional
isAscend: True
width: '30px'
customUserConfig: 'milvus-io/milvus/.contributors'
workingDir: ${{ github.workspace }}
- name: commit code
run: |
pwd
git config --system user.email "sre-ci-robot@zilliz.com"
git config --system user.name "sre-ci-robot"
git add -u
git diff-index --cached --quiet HEAD || (git commit -s -m 'Update all contributors' && git push)
@@ -0,0 +1,47 @@
name: Bump Standalone Embed Milvus Version
on:
workflow_dispatch:
inputs:
imageTag:
description: "the milvus image tag"
required: true
type: string
jobs:
update-knowhere-commits:
name: Bump Milvus Version for release
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update milvus image tag
# continue-on-error: true
shell: bash
run: |
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' scripts/standalone_embed.sh
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' scripts/standalone_embed.bat
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add scripts
git status
git commit -m "Bump milvus version to ${{ inputs.imageTag }}"
- name: Create Pull Request
id: cpr
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: sre-ci-robot <sre-ci-robot@users.noreply.github.com>
signoff: true
branch: bump_milvus_commit_${{ github.sha }}
delete-branch: true
title: '[automated] Bump milvus version to ${{ inputs.imageTag }}'
body: |
Bump milvus version to ${{ inputs.imageTag }}
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
+49
View File
@@ -0,0 +1,49 @@
name: Bump Milvus Version
on:
workflow_dispatch:
inputs:
imageTag:
description: "the milvus image tag"
required: true
type: string
jobs:
update-knowhere-commits:
name: Bump Milvus Version for release
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Update milvus image tag
# continue-on-error: true
shell: bash
run: |
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' deployments/docker/standalone/docker-compose.yml
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' deployments/binary/README.md
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*-gpu/\1${{ inputs.imageTag }}-gpu/' deployments/docker/gpu/standalone/docker-compose.yml
sed -i 's/\(milvusdb\/milvus:\)[^[:space:]]*/\1${{ inputs.imageTag }}/' deployments/docker/cluster-distributed-deployment/inventory.ini
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git diff
git add deployments
git commit -m "Bump milvus version to ${{ inputs.imageTag }}"
- name: Create Pull Request
id: cpr
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: sre-ci-robot <sre-ci-robot@users.noreply.github.com>
signoff: true
branch: bump_milvus_commit_${{ github.sha }}
delete-branch: true
title: '[automated] Bump milvus version to ${{ inputs.imageTag }}'
body: |
Bump milvus version to ${{ inputs.imageTag }}
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
+50
View File
@@ -0,0 +1,50 @@
name: Add Comment for issue
on:
issues:
types: [opened]
jobs:
check_issue_title:
name: Check issue
runs-on: ubuntu-latest
env:
TITLE_PASSED: "T"
ISSUE_TITLE: ${{ github.event.issue.title }}
permissions:
issues: write
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Check Issue
shell: bash
run: |
echo "Issue title: ${ISSUE_TITLE//\"/\\\"}"
cat >> check_title.py << EOF
import re
import sys
check_str = sys.argv[1]
pattern = re.compile(r'[\u4e00-\u9fa5]')
match = pattern.search(check_str)
if match:
print("TITLE_PASSED=F")
else:
print("TITLE_PASSED=T")
EOF
python3 check_title.py "${ISSUE_TITLE//\"/\\\"}" >> "$GITHUB_ENV"
cat $GITHUB_ENV
- name: Check env
shell: bash
run: |
echo ${{ env.TITLE_PASSED }}
- name: Add comment
if: ${{ env.TITLE_PASSED == 'F'}}
uses: peter-evans/create-or-update-comment@5f728c3dae25f329afbe34ee4d08eef25569d79f
with:
issue-number: ${{ github.event.issue.number }}
body: |
The title and description of this issue contains Chinese. Please use English to describe your issue.
+46
View File
@@ -0,0 +1,46 @@
name: Claude Code Review
on:
pull_request_target:
types: [opened, synchronize, ready_for_review, reopened]
# Optional: Only run on specific file changes
# paths:
# - "src/**/*.ts"
# - "src/**/*.tsx"
# - "src/**/*.js"
# - "src/**/*.jsx"
jobs:
claude-review:
# Optional: Filter by PR author
# if: |
# github.event.pull_request.user.login == 'external-contributor' ||
# github.event.pull_request.user.login == 'new-developer' ||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
steps:
- name: Checkout PR code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
plugins: 'code-review@claude-code-plugins'
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
+51
View File
@@ -0,0 +1,51 @@
name: Claude Code
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned]
pull_request_review:
types: [submitted]
jobs:
claude:
if: |
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
# This is an optional setting that allows Claude to read CI results on PRs
additional_permissions: |
actions: read
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
# prompt: 'Update the pull request description to include a summary of changes.'
# Optional: Add claude_args to customize behavior and configuration
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options
# claude_args: '--allowed-tools Bash(gh pr:*)'
+132
View File
@@ -0,0 +1,132 @@
name: Code Checker
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
branches:
- master
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'pkg/**'
- 'client/**'
- 'cmd/**'
- 'build/**'
- 'tests/integration/**'
- 'tests/go_client/**'
- '.github/workflows/code-checker.yaml'
- '.env'
- docker-compose.yml
- Makefile
- '!**.md'
- '!build/ci/jenkins/**'
# FIXME(wxyu): not need to run code check, update the ci-passed rules and remove these two lines
- go.mod
- go.sum
- .golangci.yml
- rules.go
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ubuntu:
name: Code Checker AMD64 Ubuntu 22.04
runs-on: ubuntu-latest
timeout-minutes: 180
strategy:
fail-fast: false
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
- name: Code Check
env:
OS_NAME: 'ubuntu22.04'
run: |
./build/builder.sh /bin/bash -c "git config --global --add safe.directory /go/src/github.com/milvus-io/milvus && make check-proto-product && make verifiers"
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
amazonlinux:
if: ${{ false }} # skip for now
name: Code Checker Amazonlinux 2023
# Run in amazonlinux docker
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'amazonlinux2023'
- name: Code Check
run: |
sed -i 's/ubuntu22.04/amazonlinux2023/g' .env
./build/builder.sh /bin/bash -c "make install"
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'amazonlinux2023'
rockylinux:
if: ${{ false }} # skip for now
name: Code Checker rockylinux9
# Run in rockylinux docker
runs-on: ubuntu-latest
timeout-minutes: 180
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'rockylinux9'
- name: Code Check
run: |
sed -i 's/ubuntu22.04/rockylinux9/g' .env
./build/builder.sh /bin/bash -c "make install"
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'rockylinux9'
+71
View File
@@ -0,0 +1,71 @@
name: Daily Release
on:
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: '0 18 * * *'
jobs:
nightly:
name: Run Daily Release
if: github.repository == 'milvus-io/milvus'
runs-on: ubuntu-latest
env:
IMAGE_REPO: "milvusdb"
DEV: "milvus"
DAILY: "daily-build"
TAG_PREFIX: "master-"
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Get the latest of Milvus dev image tag
shell: bash
working-directory: scripts
run: echo "tag=$(./docker_image_find_tag.sh -n ${IMAGE_REPO}/${DEV} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
- name: Pull latest milvus image with tag prefix master-
run: |
docker pull "${IMAGE_REPO}/${DEV}:${{ env.tag }}"
docker tag "${IMAGE_REPO}/${DEV}:${{ env.tag }}" "${IMAGE_REPO}/${DAILY}:${{ env.tag }}"
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image
run: |
docker push "${IMAGE_REPO}/${DAILY}:${{ env.tag }}"
- name: Set release build
shell: bash
run: |
tag=${{ env.tag }}
IFS=- read branch date sha <<< "$tag"
echo "build=$date" >> $GITHUB_ENV
echo "sha=$(git rev-parse $sha)" >> $GITHUB_ENV
- name: Create a daily release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: "Image: ${{ env.IMAGE_REPO}}/${{ env.DAILY }}:${{ env.tag }}"
prerelease: true
tag_name: "v2.0.0-testing-${{ env.build }}"
release_name: "milvus-2.0.0-testing-${{ env.build }}"
commitish: "${{ env.sha }}"
+60
View File
@@ -0,0 +1,60 @@
name: Jenkins Checker
# Lint Jenkinsfile and related groovy files
on:
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/ci/jenkins/**.groovy'
- 'ci/jenkins/**.groovy'
- '.github/workflows/jenkins-checker.yaml'
jobs:
check-jenkinsfile:
name: Jenkinsfile Checker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Validate Jenkinsfile
shell: bash
run: |
function validate(){
local file_path=${1:-Jenkinsfile}
local jenkins_url=${2:-"https://jenkins.milvus.io:18080/"}
JENKINS_CRUMB=`curl "${jenkins_url}/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,\":\",//crumb)"`
response=$(curl --max-time 10 --retry 5 --retry-delay 0 --retry-max-time 40 -X POST -H $JENKINS_CRUMB -F "jenkinsfile=<${file_path}" ${jenkins_url}/pipeline-model-converter/validate)
if [[ ${response} =~ "Error" ]]
then
echo " ${response}"
echo "Validate ${file_path} failed !"
exit 1
fi
}
function validate_path(){
local path=${1}
local jenkins_url=${2}
for file in ${path}
do
if [ -f "$file" ]
then
# echo "$file"
file_name=$(basename "$file")
if echo "${file_name}" | grep -q -E '\.groovy$'
then
# echo "Validate groovy file ${file_name}"
validate $file ${jenkins_url}
elif [[ "${file_name}" == "Jenkinsfile" ]]
then
# echo "Validate Jenkinsfile"
validate $file ${jenkins_url}
fi
fi
done
}
validate_path "ci/jenkins/*" "https://jenkins.milvus.io:18080/"
+14
View File
@@ -0,0 +1,14 @@
name: License Checker
on:
workflow_dispatch:
jobs:
check-license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check License Header
uses: apache/skywalking-eyes@main
with:
log: info
config: .github/.licenserc.yaml
+94
View File
@@ -0,0 +1,94 @@
name: Mac Code Checker
# This workflow is triggered by manual dispatch.
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to run the workflow on'
required: true
default: 'master'
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.branch || github.sha }}
cancel-in-progress: false
jobs:
mac:
name: Code Checker MacOS
runs-on: macos-15
timeout-minutes: 480
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch || github.ref }}
- name: Setup Python environment
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install CMake 3.31.8
run: |
cmake --version || true
which cmake || true
if ! brew list cmake &>/dev/null; then
brew uninstall cmake -f
fi
curl -LO https://github.com/Kitware/CMake/releases/download/v3.31.8/cmake-3.31.8-macos-universal.tar.gz
tar -zxf cmake-3.31.8-macos-universal.tar.gz -C /tmp/
sudo mv /tmp/cmake-3.31.8-macos-universal/CMake.app /Applications/
sudo rm -f /usr/local/bin/cmake /usr/local/bin/cpack /usr/local/bin/ctest
sudo rm -f /opt/homebrew/bin/cmake /opt/homebrew/bin/cpack /opt/homebrew/bin/ctest
echo -e "\n=== Creating symlinks for CMake ==="
sudo ln -s /Applications/CMake.app/Contents/bin/cmake /usr/local/bin/cmake
sudo ln -s /Applications/CMake.app/Contents/bin/cpack /usr/local/bin/cpack
sudo ln -s /Applications/CMake.app/Contents/bin/ctest /usr/local/bin/ctest
CMAKE_MODULE_DIR="/Applications/CMake.app/Contents/share/cmake-3.31"
sudo ln -s "$CMAKE_MODULE_DIR" /usr/local/share/cmake-3.31
export PATH="/usr/local/bin:$PATH"
cmake --version
which cmake
- name: Setup Go environment
uses: actions/setup-go@v4
with:
go-version: '1.26.4'
cache: false
- name: Download Caches
uses: ./.github/actions/macos-cache-restore
- name: Code Check
env:
CCACHE_DIR: /var/tmp/ccache
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 9
CCACHE_MAXSIZE: 1G
run: |
if [[ ! -d "/var/tmp/ccache" ]];then
mkdir -p /var/tmp/ccache
fi
brew install libomp ninja ccache pkg-config
BREW_PREFIX=$(brew --prefix)
# aws-sdk-cpp 1.11.750 had a packaging bug where Paginator.h was
# not installed (missing CMake install rule for pagination headers).
# Homebrew backported the fix with "rebuild 1", but the CI runner's
# formula may be stale. Run brew update first so we get the
# patched bottle.
brew update
brew install aws-sdk-cpp || brew upgrade aws-sdk-cpp
# Install llvm@17 explicitly as a stable version
brew install llvm@17
if [[ ! -d "${BREW_PREFIX}/opt/llvm" ]]; then
ln -s ${BREW_PREFIX}/opt/llvm@17 ${BREW_PREFIX}/opt/llvm
fi
pip3 install conan==2.25.1
make milvus
- name: Upload Cmake log
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: cmake-log
path: cmake_build/CMakeFiles/*.log
- name: Save Caches
uses: ./.github/actions/macos-cache-save
if: github.event_name != 'pull_request'
+313
View File
@@ -0,0 +1,313 @@
name: Build and test
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'client/**'
- 'pkg/**'
- 'cmd/**'
- 'build/**'
- 'tests/integration/**' # run integration test
- '.github/workflows/main.yaml'
- '.env'
- docker-compose.yml
- Makefile
- go.mod
- '!**.md'
- '!build/ci/jenkins/**'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'scripts/**'
- 'internal/**'
- 'pkg/**'
- 'client/**'
- 'cmd/**'
- 'build/**'
- 'tests/integration/**' # run integration test
- '.github/workflows/main.yaml'
- '.env'
- docker-compose.yml
- Makefile
- go.mod
- '!**.md'
- '!build/ci/jenkins/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
Build:
name: Build and test AMD64 Ubuntu 22.04
runs-on: ubuntu-latest
steps:
- name: 'Setup $HOME'
# hot fix
run: |
# Check if $HOME is not set
if [ -z "$HOME" ]; then
echo '$HOME was no set'
echo "HOME=/home/zilliz-user" >> $GITHUB_ENV
fi
echo "HOME variable is:$HOME"
echo "GITHUB_ENV variable is:$GITHUB_ENV"
- name: Setup mold
uses: rui314/setup-mold@v1
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Check Changed files'
id: changed-files-cpp
uses: tj-actions/changed-files@v46
with:
since_last_remote_commit: 'true'
files: |
**/*.cpp
**/*.cc
**/*.c
**/*.h
**/*.hpp
**/*.CMakeLists.txt
**/conanfile.*
- name: 'Setup Use USE_ASAN'
if: steps.changed-files-cpp.outputs.any_changed == 'true'
run: |
echo "useasan=OFF" >> $GITHUB_ENV
echo "Setup USE_ASAN to true since cpp file(s) changed"
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
kind: 'cpp'
- name: Build
run: |
./build/builder.sh /bin/bash -c "make USE_ASAN=${{env.useasan}} mode=RelWithDebInfo build-cpp && chmod -R a+rwx /home/milvus/.conan2"
- run: |
zip -r code.zip . -x "./.docker/*" -x "./cmake_build/thirdparty/**" -x ".git/**"
- name: Archive code
uses: actions/upload-artifact@v4
with:
name: code
path: code.zip
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
kind: 'cpp'
UT-Cpp:
# skip the UT-Cpp job in github workflow, it run in jenkins now see: UT-CPP.groovy
if: false
name: UT for Cpp
needs: Build
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Download code
uses: actions/download-artifact@v4.1.3
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
kind: 'cpp'
- name: Start Service
shell: bash
run: |
docker compose up -d azurite gcpnative
- name: UT
run: |
chmod +x build/builder.sh
chmod +x scripts/*
chmod +x internal/core/output/unittest/*
./build/builder.sh /bin/bash -c ./scripts/run_cpp_codecov.sh
- name: Archive result
uses: actions/upload-artifact@v4
with:
name: cpp-result
path: |
./go_coverage.txt
./lcov_output.info
*.info
*.out
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
kind: 'cpp'
UT-Go:
name: UT for Go
needs: Build
runs-on: ubuntu-latest
timeout-minutes: 150
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Download code
uses: actions/download-artifact@v4.1.3
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
kind: 'go'
- name: Start Service
shell: bash
run: |
docker compose up -d pulsar etcd minio azurite gcpnative
- name: UT
run: |
chmod +x build/builder.sh
chmod +x scripts/run_go_codecov.sh
./build/builder.sh /bin/bash -c "make codecov-go-without-build"
- name: Archive result
uses: actions/upload-artifact@v4
with:
name: go-result
path: |
./go_coverage.txt
./lcov_output.info
*.info
*.out
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
kind: 'go'
integration-test:
name: Integration Test
needs: Build
runs-on: ubuntu-latest
timeout-minutes: 150
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
- name: Download code
uses: actions/download-artifact@v4.1.3
with:
name: code
- run: |
unzip code.zip
rm code.zip
- name: Download Caches
uses: ./.github/actions/cache-restore
with:
os: 'ubuntu22.04'
kind: 'go'
- name: Start Service
shell: bash
run: |
docker compose up -d pulsar etcd minio
- name: IntegrationTest
run: |
chmod +x build/builder.sh
chmod +x scripts/run_intergration_test.sh
./build/builder.sh /bin/bash -c "make build-go && make integration-test"
- name: Archive result
uses: actions/upload-artifact@v4
with:
name: it-result
path: |
./it_coverage.txt
*.info
*.out
- name: Save Caches
uses: ./.github/actions/cache-save
if: github.event_name != 'pull_request'
with:
os: 'ubuntu22.04'
kind: 'go'
codecov:
name: Upload Code Coverage
needs: [UT-Go, integration-test]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Download Go code coverage results
uses: actions/download-artifact@v4.1.3
with:
name: go-result
- name: Download Integration Test coverage results
uses: actions/download-artifact@v4.1.3
with:
name: it-result
- name: Display structure of code coverage results
run: |
ls -lah
- name: Upload coverage to Codecov
if: ${{ github.repository == 'milvus-io/milvus' }}
uses: codecov/codecov-action@v4
id: upload_cov
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./go_coverage.txt,./it_coverage.txt
name: ubuntu-20.04-unittests
fail_ci_if_error: true
disable_safe_directory: true
verbose: true
- name: Retry Upload coverage to Codecov
if: ${{ failure() && github.repository == 'milvus-io/milvus' }}
uses: codecov/codecov-action@v4
id: retry_upload_cov
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./go_coverage.txt,./it_coverage.txt
name: ubuntu-20.04-unittests
fail_ci_if_error: true
disable_safe_directory: true
verbose: true
+24
View File
@@ -0,0 +1,24 @@
name: Markdown Links Check
on:
workflow_dispatch:
schedule:
- cron: "30 20 * * *"
jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
# checks all markdown files from /docs including all subfolders
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
folder-path: 'docs/'
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
# checks all markdown files from root but ignores subfolders
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
max-depth: 0
+99
View File
@@ -0,0 +1,99 @@
name: Publish Builder
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/builder/cpu/**'
- '.github/workflows/publish-builder.yaml'
- '!**.md'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/builder/cpu/**'
- '.github/workflows/publish-builder.yaml'
- '!**.md'
workflow_dispatch:
inputs:
push_to_dockerhub:
description: 'Push to Docker Hub'
required: true
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
publish-builder:
name: ${{ matrix.arch }} ${{ matrix.os }}
runs-on: ubuntu-latest
timeout-minutes: 500
strategy:
fail-fast: false
matrix:
os: [ubuntu24.04, ubuntu22.04, amazonlinux2023, rockylinux9]
env:
OS_NAME: ${{ matrix.os }}
IMAGE_ARCH: ${{ matrix.arch }}
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
if: ${{ ! startsWith(runner.name, 'self') }} # skip this step if it is self-hosted runner
with:
root-reserve-mb: 10240
overprovision-lvm: 'true'
swap-size-mb: 2048
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Get version from system time after release step
id: extracter
run: |
echo "::set-output name=version::$(date +%Y%m%d)"
echo "::set-output name=sha_short::$(git rev-parse --short=7 HEAD)"
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
milvusdb/milvus-env
tags: |
type=raw,enable=true,value=${{ matrix.os }}-{{date 'YYYYMMDD'}}-{{sha}}
type=raw,enable=true,value=${{ matrix.os }}-latest
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_to_dockerhub)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_to_dockerhub) }}
tags: ${{ steps.meta.outputs.tags }}
file: build/docker/builder/cpu/${{ matrix.os }}/Dockerfile
- name: Bump Builder Version
uses: ./.github/actions/bump-builder-version
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' && matrix.os == 'ubuntu22.04'
with:
tag: "${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}"
type: cpu
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
@@ -0,0 +1,97 @@
name: Publish Gpu Builder
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/builder/gpu/**'
- '.github/workflows/publish-gpu-builder.yaml'
- '!**.md'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/builder/gpu/**'
- '.github/workflows/publish-gpu-builder.yaml'
- '!**.md'
workflow_dispatch:
inputs:
RunnerHost:
description: "Use this label for self-host runner"
required: true
type: string
default: "ubuntu-latest"
push_to_dockerhub:
description: 'Push to Docker Hub'
required: true
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
publish-gpu-builder:
runs-on: ubuntu-latest
timeout-minutes: 500
env:
OS: ubuntu22.04
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 10240
overprovision-lvm: 'true'
swap-size-mb: 2048
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Get version from system time after release step
id: extracter
run: |
echo "version=$(date +%Y%m%d)" >> $GITHUB_OUTPUT
echo "sha_short=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
milvusdb/milvus-env
tags: |
type=raw,enable=true,value=gpu-${{ env.OS }}-{{date 'YYYYMMDD'}}-{{sha}}
type=raw,enable=true,value=gpu-${{ env.OS }}-latest
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_to_dockerhub)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_to_dockerhub) }}
tags: ${{ steps.meta.outputs.tags }}
file: build/docker/builder/gpu/${{ env.OS }}/Dockerfile
- name: Bump Builder Version
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus' && env.OS == 'ubuntu22.04'
uses: ./.github/actions/bump-builder-version
with:
tag: "${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}"
type: gpu
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
@@ -0,0 +1,85 @@
name: Publish KRTE Images
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
workflow_dispatch:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/krte/**'
- '.github/workflows/publish-krte-images.yaml'
- '!**.md'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'build/docker/krte/**'
- '.github/workflows/publish-krte-images.yaml'
- '!**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
publish-krte-images:
name: KRTE
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get version from system time after release step
id: extracter
run: |
echo "::set-output name=version::$(date +%Y%m%d)"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Docker Build
shell: bash
working-directory: build/docker/krte
run: |
export TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
docker build --build-arg IMAGE_ARG="milvusdb/krte:$TAG" --build-arg GO_VERSION=1.26.4 -t "milvusdb/krte:$TAG" .
- name: Docker Push
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' )&& github.repository == 'milvus-io/milvus'
continue-on-error: true
shell: bash
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} \
-p ${{ secrets.DOCKERHUB_TOKEN }}
export TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
docker push "milvusdb/krte:$TAG"
echo "Push krte image Succeeded"
- name: Update KRTE Image Changes
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.repository == 'milvus-io/milvus'
continue-on-error: true
shell: bash
working-directory: build/ci/jenkins/pod
run: |
export TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
sed -i "s#krte:.*#krte:${TAG}#g" ./build/ci/jenkins/pod/rte.yaml
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add rte.yaml
git commit -m "Update KRTE image changes"
- name: Create Pull Request
id: cpr
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.repository == 'milvus-io/milvus'
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: update_krte_${{ github.sha }}
delete-branch: true
title: '[automated] Update KRTE image changes'
body: |
Update KRTE image changes
Signed-off-by: ${{ github.actor }} ${{ github.actor }}@users.noreply.github.com
- name: Check outputs
if: success() && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' ) && github.repository == 'milvus-io/milvus'
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
@@ -0,0 +1,97 @@
name: Publish Test Images
# TODO: do not trigger action for some document file update
# This workflow is triggered on pushes or pull request to the repository.
on:
push:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'tests/docker/Dockerfile'
- 'tests/python_client/requirements.txt'
- '.github/workflows/publish-test-images.yaml'
- '!**.md'
pull_request:
# file paths to consider in the event. Optional; defaults to all.
paths:
- 'tests/docker/Dockerfile'
- 'tests/python_client/requirements.txt'
- '.github/workflows/publish-test-images.yaml'
- '!**.md'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
publish-pytest-images:
name: PyTest
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Get version from system time after release step
id: extracter
run: |
echo "::set-output name=version::$(date +%Y%m%d)"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Docker Pull
shell: bash
working-directory: tests/docker
run: |
docker compose pull pytest
- name: Docker Build
shell: bash
working-directory: tests/docker
run: |
IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} docker compose build pytest
export LATEST_IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}
IMAGE_TAG=latest docker compose build pytest
- name: Docker Push
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
continue-on-error: true
shell: bash
working-directory: tests/docker
run: |
docker login -u ${{ secrets.DOCKERHUB_USER }} \
-p ${{ secrets.DOCKERHUB_TOKEN }}
IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }} docker compose push pytest
IMAGE_TAG=latest docker compose push pytest
echo "Push pytest image Succeeded"
- name: Update Pytest Image Changes
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
continue-on-error: true
shell: bash
working-directory: .
run: |
sed -i "s#^IMAGE_TAG=.*#IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" ./tests/docker/.env
sed -i "s#^LATEST_IMAGE_TAG=.*#LATEST_IMAGE_TAG=${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" ./tests/docker/.env
sed -i "s#pytest:.*#pytest:${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" ./ci/jenkins/pod/rte.yaml
sed -i "s#pytest:.*#pytest:${{ steps.extracter.outputs.version }}-${{ steps.extracter.outputs.sha_short }}#g" ./ci/jenkins/pod/e2e.yaml
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ./tests/docker/.env
git add ./ci/jenkins/pod/rte.yaml
git add ./ci/jenkins/pod/e2e.yaml
git commit -m "Update Pytest image changes"
- name: Create Pull Request
id: cpr
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: true
branch: update_pytest_${{ github.sha }}
delete-branch: true
title: '[automated] Update Pytest image changes'
body: |
Update Pytest image changes
See changes: https://github.com/milvus-io/milvus/commit/${{ github.sha }}
Signed-off-by: ${{ github.actor }} ${{ github.actor }}@users.noreply.github.com
- name: Check outputs
if: success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
+60
View File
@@ -0,0 +1,60 @@
name: Python Lint (tests/)
on:
push:
branches:
- master
paths:
- 'tests/**/*.py'
- 'tests/ruff.toml'
- '.github/workflows/python-lint.yaml'
pull_request:
paths:
- 'tests/**/*.py'
- 'tests/ruff.toml'
- '.github/workflows/python-lint.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
ruff:
name: Ruff (changed files only)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Detect changed Python files under tests/
id: changed
uses: tj-actions/changed-files@v46
with:
files: tests/**/*.py
- name: ruff check
if: steps.changed.outputs.any_changed == 'true'
uses: astral-sh/ruff-action@v4.0.0
with:
version: "0.15.11"
src: ${{ steps.changed.outputs.all_changed_files }}
- name: ruff format --check
if: steps.changed.outputs.any_changed == 'true'
uses: astral-sh/ruff-action@v4.0.0
with:
version: "0.15.11"
src: ${{ steps.changed.outputs.all_changed_files }}
args: "format --check --diff"
- name: Validate ruff configuration (smoke test)
# Always runs so config-only PRs still catch a broken ruff.toml.
# --exit-zero ignores existing baseline violations; only fails when
# ruff cannot load the config at all.
uses: astral-sh/ruff-action@v4.0.0
with:
version: "0.15.11"
src: "tests/scripts"
args: "check --exit-zero"
@@ -0,0 +1,47 @@
name: Rerun Failure Checks
on:
issue_comment:
types: [created]
jobs:
rerun-checks:
if: "github.event_name == 'issue_comment'&& startsWith(github.event.comment.body, 'rerun ut')"
runs-on: ubuntu-latest
steps:
- name: Is Organization Member
shell: bash
if: "github.event_name == 'issue_comment'"
id: is_organization_member
run: |
response_code=$(curl -sIL -w %{http_code} -H "Authorization: token ${{ secrets.RERUN_BOT_TOKEN }}" -H "Accept: application/vnd.github.v3+json" \
-o /dev/null https://api.github.com/orgs/${GITHUB_REPOSITORY_OWNER}/members/${{ github.event.sender.login }})
echo " response code is ${response_code} "
if [[ ${response_code} == '204' ]];then
echo "::set-output name=is-member::true"
elif [[ ${response_code} == '404' ]]; then
echo "::set-output name=is-member::false"
else
echo "Please check if the repository secret RERUN_BOT_TOKEN still exists and have the permission to read organization membership."
exit 1
fi
- name: Create Comment for Non-Org Member
if: "github.event_name == 'issue_comment' && steps.is_organization_member.outputs.is-member == 'false'"
uses: actions-cool/issues-helper@v2.5.0
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello ${{ github.event.sender.login }}, you are not in the organization, so you do not have the permission to rerun the workflow, please contact `@milvus-io/milvus-maintainers` for help.
- uses: actions/checkout@v2
- name: Rerun Failure Checks
if: "github.event_name == 'issue_comment' && steps.is_organization_member.outputs.is-member == 'true'"
uses: zymap/bot@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # replace here to your token
with:
repo_owner: milvus-io # replace here to your repo owner
repo_name: milvus # replace here to your repo name
rerun_cmd: rerun ut
comment: ${{ github.event.comment.body }}
@@ -0,0 +1,100 @@
name: Update Knowhere Commit
on:
workflow_dispatch:
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: '0 15 * * *'
jobs:
update-knowhere-commits:
name: update-knowhere-commit
runs-on: ubuntu-latest
env:
OS_NAME: ubuntu20.04
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install GitHub CLI
run: |
sudo apt update
sudo apt install -y gh
- name: Close Previous PRs
run: |
REPO=${{ github.repository }}
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# Set up GitHub CLI authentication non-interactively
gh auth login --with-token <<< "${{ secrets.ALL_CONTRIBUTORS_TOKEN }}"
BRANCH_PREFIX="update_knowhere_commit_"
prs=$(gh pr list --repo "$REPO" --state open --json number,headRefName --jq ".[] | select(.headRefName | startswith(\"$BRANCH_PREFIX\")) | .number")
for pr in $prs; do
echo "Closing old PR #$pr"
gh pr close $pr --repo "$REPO"
done
env:
GH_TOKEN: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
- name: get knowhere latest commit
id: get-knowhere-latest-commit
run: |
cd ..
rm -fr Knowhere
git clone https://github.com/zilliztech/Knowhere.git
cd Knowhere
export commit=$(git rev-parse --short HEAD)
echo $commit
echo "::set-output name=knowhere-commit::$commit"
cd ../milvus
- name: Update Commit Changes
continue-on-error: true
shell: bash
run: |
sed -i "0,/(\ KNOWHERE_VERSION/ s#( KNOWHERE_VERSION.*#( KNOWHERE_VERSION ${{ steps.get-knowhere-latest-commit.outputs.knowhere-commit }} )#g" internal/core/thirdparty/knowhere/CMakeLists.txt
head -n 17 internal/core/thirdparty/knowhere/CMakeLists.txt
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add internal/core/thirdparty/knowhere/CMakeLists.txt
git commit -m "Update knowhere commit"
- name: Create Pull Request
id: cpr
continue-on-error: true
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.ALL_CONTRIBUTORS_TOKEN }}
author: sre-ci-robot <sre-ci-robot@users.noreply.github.com>
signoff: true
branch: update_knowhere_commit_${{ github.sha }}
delete-branch: true
title: '[automated] Update Knowhere Commit'
body: |
Update Knowhere Commit
Signed-off-by: sre-ci-robot sre-ci-robot@users.noreply.github.com
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
- name: Send Message To Feishu
env:
ACTIONS_FEISHU_TAG: 'v1.3.1'
INPUT_WEBHOOK: "${{ secrets.FEISHU_WEBHOOK_KNOWHERE_COMMIT_BOT }}"
INPUT_MESSAGE_TYPE: text
INPUT_CONTENT: "Pr url by rebot: ${{ steps.cpr.outputs.pull-request-url }}"
run: |
wget -q https://github.com/xiachufang/actions-feishu/releases/download/${{ env.ACTIONS_FEISHU_TAG }}/linux-amd64-actions-feishu.tar.gz
tar zxf linux-amd64-actions-feishu.tar.gz feishu
./feishu
+71
View File
@@ -0,0 +1,71 @@
name: Weekly Release
on:
schedule:
# * is a special character in YAML so you have to quote this string
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
- cron: '0 0 * * 2,5'
jobs:
nightly:
name: Run Weekly Release
if: github.repository == 'milvus-io/milvus'
runs-on: ubuntu-latest
env:
IMAGE_REPO: "milvusdb"
DEV: "milvus"
WEEKLY: "weekly-build"
TAG_PREFIX: "master-"
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Get the latest of Milvus dev image tag
shell: bash
working-directory: scripts
run: echo "tag=$(./docker_image_find_tag.sh -n ${IMAGE_REPO}/${DEV} -t ${TAG_PREFIX}latest -f ${TAG_PREFIX} -F -L -q)" >> $GITHUB_ENV
- name: Pull latest milvus image with tag prefix master-
run: |
docker pull "${IMAGE_REPO}/${DEV}:${{ env.tag }}"
docker tag "${IMAGE_REPO}/${DEV}:${{ env.tag }}" "${IMAGE_REPO}/${WEEKLY}:${{ env.tag }}"
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Docker image
run: |
docker push "${IMAGE_REPO}/${WEEKLY}:${{ env.tag }}"
- name: Set release build
shell: bash
run: |
tag=${{ env.tag }}
IFS=- read branch date sha <<< "$tag"
echo "build=$date" >> $GITHUB_ENV
echo "sha=$(git rev-parse $sha)" >> $GITHUB_ENV
- name: Create a weekly release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: "Image: ${{ env.IMAGE_REPO}}/${{ env.WEEKLY }}:${{ env.tag }}"
prerelease: true
tag_name: "v2.2-testing-${{ env.build }}"
release_name: "milvus-2.2-testing-${{ env.build }}"
commitish: "${{ env.sha }}"