Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

ci: pin GitHub Actions runners to explicit OS versions (#508)

zhoujiahui61d8c53b7d51
diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml
index 6a6422a36..fc09bb906 100644
--- a/.github/workflows/_build.yml
+++ b/.github/workflows/_build.yml
@@ -4,10 +4,10 @@ on:
workflow_call:
inputs:
os_json:
- description: 'JSON string of runner labels to build on (ubuntu-latest=x86_64, ubuntu-24.04-arm=aarch64, macos-latest=arm64, macos-15-intel=x86_64, windows-latest=x86_64)'
+ description: 'JSON string of runner labels to build on (ubuntu-24.04=x86_64, ubuntu-24.04-arm=aarch64, macos-14=arm64, macos-15-intel=x86_64, windows-latest=x86_64)'
required: false
type: string
- default: '["ubuntu-latest", "ubuntu-24.04-arm", "macos-latest", "macos-15-intel", "windows-latest"]'
+ default: '["ubuntu-24.04", "ubuntu-24.04-arm", "macos-14", "macos-15-intel", "windows-latest"]'
python_json:
description: 'JSON string of Python versions'
required: false
@@ -36,9 +36,9 @@ on:
type: boolean
default: true
os_json:
- description: 'JSON string of runner labels to build on (ubuntu-latest=x86_64, ubuntu-24.04-arm=aarch64, macos-latest=arm64, macos-15-intel=x86_64, windows-latest=x86_64)'
+ description: 'JSON string of runner labels to build on (ubuntu-24.04=x86_64, ubuntu-24.04-arm=aarch64, macos-14=arm64, macos-15-intel=x86_64, windows-latest=x86_64)'
required: false
- default: '["ubuntu-latest", "ubuntu-24.04-arm", "macos-latest", "macos-15-intel", "windows-latest"]'
+ default: '["ubuntu-24.04", "ubuntu-24.04-arm", "macos-14", "macos-15-intel", "windows-latest"]'
python_json:
description: 'JSON string of Python versions'
required: false
@@ -48,7 +48,7 @@ jobs:
build-sdist:
name: Build source distribution py3.12
if: inputs.build_sdist
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
@@ -121,10 +121,10 @@ jobs:
inputs.build_wheels &&
(
contains(inputs.os_json, 'linux') ||
- contains(inputs.os_json, 'ubuntu-latest') ||
+ contains(inputs.os_json, '"ubuntu-24.04"') ||
contains(inputs.os_json, 'ubuntu-24.04-arm')
)
- runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
+ runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
container: ubuntu:20.04
env:
DEBIAN_FRONTEND: noninteractive
@@ -133,7 +133,7 @@ jobs:
fail-fast: false
matrix:
python-version: ${{ fromJson(inputs.python_json) }}
- arch: ${{ contains(inputs.os_json, 'linux') && fromJson('["x86_64","aarch64"]') || (contains(inputs.os_json, 'ubuntu-latest') && contains(inputs.os_json, 'ubuntu-24.04-arm')) && fromJson('["x86_64","aarch64"]') || contains(inputs.os_json, 'ubuntu-24.04-arm') && fromJson('["aarch64"]') || fromJson('["x86_64"]') }}
+ arch: ${{ contains(inputs.os_json, 'linux') && fromJson('["x86_64","aarch64"]') || (contains(inputs.os_json, '"ubuntu-24.04"') && contains(inputs.os_json, 'ubuntu-24.04-arm')) && fromJson('["x86_64","aarch64"]') || contains(inputs.os_json, 'ubuntu-24.04-arm') && fromJson('["aarch64"]') || fromJson('["x86_64"]') }}
steps:
- name: Install system dependencies (Linux)
@@ -291,16 +291,16 @@ jobs:
name: Build non-Linux distributions
# Run only when non-Linux runners are explicitly requested
if: inputs.build_wheels && (contains(inputs.os_json, 'macos') || contains(inputs.os_json, 'windows'))
- runs-on: ${{ matrix.os || 'ubuntu-latest' }}
+ runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ${{ fromJson(inputs.os_json) }}
python-version: ${{ fromJson(inputs.python_json) }}
- # Exclude ubuntu-latest from this matrix if it was passed in inputs
+ # Exclude ubuntu-24.04 from this matrix if it was passed in inputs
exclude:
- os: linux
- - os: ubuntu-latest
+ - os: ubuntu-24.04
- os: ubuntu-24.04-arm
steps:
@@ -321,21 +321,17 @@ jobs:
if: runner.os == 'macOS'
shell: bash
run: |
- if [[ "${{ matrix.os }}" == "macos-15-intel" ]]; then
+ if [[ "${{ matrix.os }}" == "macos-14" ]]; then
+ TARGET_ARCH="arm64"
+ MACOS_VERSION="14.0"
+ elif [[ "${{ matrix.os }}" == "macos-15-intel" ]]; then
TARGET_ARCH="x86_64"
+ MACOS_VERSION="15.0"
else
- TARGET_ARCH="arm64"
+ echo "Unsupported macOS runner for release wheels: ${{ matrix.os }}"
+ exit 1
fi
- MACOS_VERSION="$(python - <<'PY'
- import platform
- ver = platform.mac_ver()[0].split(".")
- major = ver[0] if ver and ver[0] else "15"
- minor = ver[1] if len(ver) > 1 else "0"
- print(f"{major}.{minor}")
- PY
- )"
-
echo "ARCHFLAGS=-arch ${TARGET_ARCH}" >> "$GITHUB_ENV"
echo "CMAKE_OSX_ARCHITECTURES=${TARGET_ARCH}" >> "$GITHUB_ENV"
echo "_PYTHON_HOST_PLATFORM=macosx-${MACOS_VERSION}-${TARGET_ARCH}" >> "$GITHUB_ENV"
@@ -417,7 +413,7 @@ jobs:
- name: Store the distribution packages
uses: actions/upload-artifact@v7
with:
- name: python-package-distributions-${{ matrix.os == 'macos-latest' && 'macos-arm64' || matrix.os == 'macos-15-intel' && 'macos-x86_64' || matrix.os == 'windows-latest' && 'windows-x86_64' || matrix.os }}-${{ matrix.python-version }}
+ name: python-package-distributions-${{ matrix.os == 'macos-14' && 'macos-arm64' || matrix.os == 'macos-15-intel' && 'macos-x86_64' || matrix.os == 'windows-latest' && 'windows-x86_64' || matrix.os }}-${{ matrix.python-version }}
path: dist/
- name: Display built wheel version
@@ -426,4 +422,53 @@ jobs:
run: |
VERSION=$(ls dist/*.whl | head -n 1 | xargs basename | cut -d- -f2)
echo "Build Version: $VERSION"
- echo "::notice::Build Wheel Version (${{ matrix.os == 'macos-latest' && 'macOS arm64 (macos-latest)' || matrix.os == 'macos-15-intel' && 'macOS x86_64 (macos-15-intel)' || matrix.os == 'windows-latest' && 'Windows x86_64 (windows-latest)' || matrix.os }} py${{ matrix.python-version }}): $VERSION"
+ echo "::notice::Build Wheel Version (${{ matrix.os == 'macos-14' && 'macOS arm64 (macos-14)' || matrix.os == 'macos-15-intel' && 'macOS x86_64 (macos-15-intel)' || matrix.os == 'windows-latest' && 'Windows x86_64 (windows-latest)' || matrix.os }} py${{ matrix.python-version }}): $VERSION"
+
+ verify-macos-14-wheel-on-macos-15:
+ name: Verify macOS 14 arm64 wheel installs on macOS 15
+ needs: [build-other]
+ if: >-
+ inputs.build_wheels &&
+ contains(inputs.os_json, 'macos-14') &&
+ contains(inputs.python_json, '3.12')
+ runs-on: macos-15
+ steps:
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v6
+ with:
+ python-version: '3.12'
+
+ - name: Download macOS arm64 wheel artifact
+ uses: actions/download-artifact@v8
+ with:
+ name: python-package-distributions-macos-arm64-3.12
+ path: dist/
+
+ - name: Install built wheel
+ shell: bash
+ run: |
+ python -m pip install --upgrade pip
+ python -m pip install dist/*.whl
+
+ - name: Smoke test native extension loading
+ shell: bash
+ run: |
+ python - <<'PY'
+ import importlib.util
+ import pathlib
+ import site
+
+ candidates = []
+ for base in site.getsitepackages():
+ candidates.extend(pathlib.Path(base).glob("openviking/storage/vectordb/engine*.so"))
+
+ if not candidates:
+ raise SystemExit("openviking storage engine extension was not installed")
+
+ engine_path = candidates[0]
+ spec = importlib.util.spec_from_file_location("engine", engine_path)
+ module = importlib.util.module_from_spec(spec)
+ assert spec.loader is not None
+ spec.loader.exec_module(module)
+ print(f"Loaded native extension from {engine_path}")
+ PY
diff --git a/.github/workflows/_codeql.yml b/.github/workflows/_codeql.yml
index db0ae98e0..dab660ac0 100644
--- a/.github/workflows/_codeql.yml
+++ b/.github/workflows/_codeql.yml
@@ -7,7 +7,7 @@ on:
jobs:
analyze:
name: Analyze
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
diff --git a/.github/workflows/_lint.yml b/.github/workflows/_lint.yml
index dd5392879..3cbeec148 100644
--- a/.github/workflows/_lint.yml
+++ b/.github/workflows/_lint.yml
@@ -6,7 +6,7 @@ on:
jobs:
lint:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v6
with:
@@ -55,4 +55,4 @@ jobs:
if: steps.files.outputs.changed_files != ''
# Note: Running mypy on specific files may miss cross-file type errors
run: uv run mypy ${{ steps.files.outputs.changed_files }}
- continue-on-error: true
\ No newline at end of file
+ continue-on-error: true
diff --git a/.github/workflows/_publish.yml b/.github/workflows/_publish.yml
index d5637a22e..d9d4006c3 100644
--- a/.github/workflows/_publish.yml
+++ b/.github/workflows/_publish.yml
@@ -32,7 +32,7 @@ on:
jobs:
permission-check:
name: Check write permission
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
contents: read
outputs:
@@ -69,7 +69,7 @@ jobs:
if: >-
needs.permission-check.outputs.allowed == 'true' &&
(inputs.target == 'testpypi' || inputs.target == 'both')
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
environment:
name: testpypi
url: https://test.pypi.org/p/openviking
@@ -116,7 +116,7 @@ jobs:
if: >-
needs.permission-check.outputs.allowed == 'true' &&
(inputs.target == 'pypi' || inputs.target == 'both')
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/p/openviking
diff --git a/.github/workflows/_test_full.yml b/.github/workflows/_test_full.yml
index f9f84f89f..474a9a5b1 100644
--- a/.github/workflows/_test_full.yml
+++ b/.github/workflows/_test_full.yml
@@ -7,7 +7,7 @@ on:
description: 'JSON string of OS to run on'
required: false
type: string
- default: '["ubuntu-latest", "macos-latest", "windows-latest"]'
+ default: '["ubuntu-24.04", "macos-14", "windows-latest"]'
python_json:
description: 'JSON string of Python versions'
required: false
@@ -18,7 +18,7 @@ on:
os_json:
description: 'JSON string of OS to run on'
required: false
- default: '["ubuntu-latest", "macos-latest", "windows-latest"]'
+ default: '["ubuntu-24.04", "macos-14", "windows-latest"]'
python_json:
description: 'JSON string of Python versions'
required: false
@@ -31,7 +31,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- os: ${{ fromJson(inputs.os_json || '["ubuntu-latest", "macos-latest", "windows-latest"]') }}
+ os: ${{ fromJson(inputs.os_json || '["ubuntu-24.04", "macos-14", "windows-latest"]') }}
python-version: ${{ fromJson(inputs.python_json || '["3.10", "3.11", "3.12", "3.13"]') }}
steps:
diff --git a/.github/workflows/_test_lite.yml b/.github/workflows/_test_lite.yml
index 1d35002e0..64cbef3f2 100644
--- a/.github/workflows/_test_lite.yml
+++ b/.github/workflows/_test_lite.yml
@@ -7,7 +7,7 @@ on:
description: 'JSON string of OS to run on'
required: false
type: string
- default: '["ubuntu-latest"]'
+ default: '["ubuntu-24.04"]'
python_json:
description: 'JSON string of Python versions'
required: false
@@ -18,7 +18,7 @@ on:
os_json:
description: 'JSON string of OS to run on'
required: false
- default: '["ubuntu-latest"]'
+ default: '["ubuntu-24.04"]'
python_json:
description: 'JSON string of Python versions'
required: false
diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml
index 95f5a4582..b8677984a 100644
--- a/.github/workflows/build-docker-image.yml
+++ b/.github/workflows/build-docker-image.yml
@@ -16,7 +16,7 @@ env:
jobs:
build-and-push-image:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
diff --git a/.github/workflows/pr-review.yml b/.github/workflows/pr-review.yml
index 2b42ab279..a3fee1b32 100644
--- a/.github/workflows/pr-review.yml
+++ b/.github/workflows/pr-review.yml
@@ -8,7 +8,7 @@ on:
jobs:
pr_review:
if: ${{ github.event.sender.type != 'Bot' }}
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index b5d134b66..1969a0b44 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -24,11 +24,11 @@ jobs:
test-lite:
uses: ./.github/workflows/_test_lite.yml
with:
- os_json: '["ubuntu-latest"]'
+ os_json: '["ubuntu-24.04"]'
python_json: '["3.10"]'
check-deps:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
outputs:
deps_changed: ${{ steps.check.outputs.deps_changed }}
steps:
diff --git a/.github/workflows/release-vikingbot-first.yml b/.github/workflows/release-vikingbot-first.yml
index bbbd560ab..fd917dcca 100644
--- a/.github/workflows/release-vikingbot-first.yml
+++ b/.github/workflows/release-vikingbot-first.yml
@@ -5,7 +5,7 @@ on:
jobs:
release:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
defaults:
run:
working-directory: bot
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 38bedbea2..9d8429166 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -26,10 +26,10 @@ on:
type: boolean
default: true
os_json:
- description: 'JSON string of runner labels to build on (Manual only; ubuntu-latest=x86_64, ubuntu-24.04-arm=aarch64, macos-latest=arm64, macos-15-intel=x86_64, windows-latest=x86_64)'
+ description: 'JSON string of runner labels to build on (Manual only; ubuntu-24.04=x86_64, ubuntu-24.04-arm=aarch64, macos-14=arm64, macos-15-intel=x86_64, windows-latest=x86_64)'
required: false
type: string
- default: '["ubuntu-latest", "ubuntu-24.04-arm", "macos-latest", "macos-15-intel", "windows-latest"]'
+ default: '["ubuntu-24.04", "ubuntu-24.04-arm", "macos-14", "macos-15-intel", "windows-latest"]'
python_json:
description: 'JSON string of Python versions (Manual only)'
required: false
@@ -47,7 +47,7 @@ jobs:
if: "!startsWith(github.event.release.tag_name, 'cli-')"
uses: ./.github/workflows/_build.yml
with:
- os_json: ${{ inputs.os_json || '["ubuntu-latest", "ubuntu-24.04-arm", "macos-latest", "macos-15-intel", "windows-latest"]' }}
+ os_json: ${{ inputs.os_json || '["ubuntu-24.04", "ubuntu-24.04-arm", "macos-14", "macos-15-intel", "windows-latest"]' }}
python_json: ${{ inputs.python_json || '["3.10", "3.11", "3.12", "3.13"]' }}
build_sdist: ${{ github.event_name == 'release' || inputs.build_sdist != false }}
build_wheels: ${{ github.event_name == 'release' || inputs.build_wheels != false }}
@@ -55,7 +55,7 @@ jobs:
permission-check:
name: Check write permission
needs: [build]
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
contents: read
outputs:
@@ -92,7 +92,7 @@ jobs:
if: >-
needs.permission-check.outputs.allowed == 'true' &&
(inputs.target == 'testpypi' || inputs.target == 'both')
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
environment:
name: testpypi
url: https://test.pypi.org/p/openviking
@@ -127,7 +127,7 @@ jobs:
if: >-
needs.permission-check.outputs.allowed == 'true' &&
(github.event_name == 'release' || inputs.target == 'pypi' || inputs.target == 'both')
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/p/openviking
@@ -161,7 +161,7 @@ jobs:
if: >-
needs.permission-check.outputs.allowed == 'true' &&
github.event_name == 'release'
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
diff --git a/.github/workflows/rust-cli.yml b/.github/workflows/rust-cli.yml
index f168215cf..37bd2ab2c 100644
--- a/.github/workflows/rust-cli.yml
+++ b/.github/workflows/rust-cli.yml
@@ -25,16 +25,16 @@ jobs:
fail-fast: false
matrix:
include:
- - os: ubuntu-latest
+ - os: ubuntu-24.04
target: x86_64-unknown-linux-gnu
artifact_name: ov-linux-x86_64
- - os: ubuntu-latest
+ - os: ubuntu-24.04
target: aarch64-unknown-linux-gnu
artifact_name: ov-linux-aarch64
- - os: macos-latest
+ - os: macos-15-intel
target: x86_64-apple-darwin
artifact_name: ov-macos-x86_64
- - os: macos-latest
+ - os: macos-14
target: aarch64-apple-darwin
artifact_name: ov-macos-aarch64
- os: windows-latest
@@ -130,7 +130,7 @@ jobs:
release:
name: Create GitHub Release
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
needs: build
if: startsWith(github.ref, 'refs/tags/cli@')
permissions:
@@ -190,4 +190,4 @@ jobs:
draft: false
prerelease: ${{ contains(steps.get_version.outputs.version, 'alpha') || contains(steps.get_version.outputs.version, 'beta') || contains(steps.get_version.outputs.version, 'rc') }}
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 571037edf..4f24363a7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -441,14 +441,14 @@ Runs code style checks (Ruff) and type checks (Mypy). No arguments required.
Runs fast integration tests, supports custom matrix configuration.
* **Inputs**:
- * `os_json`: JSON string array of OS to run on (e.g., `["ubuntu-latest"]`).
+ * `os_json`: JSON string array of OS to run on (e.g., `["ubuntu-24.04"]`).
* `python_json`: JSON string array of Python versions (e.g., `["3.10"]`).
#### C. Test Suite (Full) (`13. _Test Suite (Full)`)
Runs the full test suite on all supported platforms (Linux/Mac/Win) and Python versions (3.10-3.13). Supports custom matrix configuration when triggered manually.
* **Inputs**:
- * `os_json`: List of OS to run on (Default: `["ubuntu-latest", "macos-latest", "windows-latest"]`).
+ * `os_json`: List of OS to run on (Default: `["ubuntu-24.04", "macos-14", "windows-latest"]`).
* `python_json`: List of Python versions (Default: `["3.10", "3.11", "3.12", "3.13"]`).
#### D. Security Scan (`14. _CodeQL Scan`)
@@ -458,7 +458,7 @@ Runs CodeQL security analysis. No arguments required.
Builds Python wheel packages only, does not publish.
* **Inputs**:
- * `os_json`: List of OS to build on (Default: `["ubuntu-latest", "macos-latest", "macos-15-intel", "windows-latest"]`).
+ * `os_json`: List of OS to build on (Default: `["ubuntu-24.04", "ubuntu-24.04-arm", "macos-14", "macos-15-intel", "windows-latest"]`).
* `python_json`: List of Python versions (Default: `["3.10", "3.11", "3.12", "3.13"]`).
* `build_sdist`: Whether to build source distribution (Default: `true`).
* `build_wheels`: Whether to build wheel distribution (Default: `true`).
diff --git a/CONTRIBUTING_CN.md b/CONTRIBUTING_CN.md
index 2460dbb64..3e766bc0f 100644
--- a/CONTRIBUTING_CN.md
+++ b/CONTRIBUTING_CN.md
@@ -441,14 +441,14 @@ git commit -m "refactor(storage): simplify interface methods"
运行快速集成测试,支持自定义矩阵配置。
* **Inputs**:
- * `os_json`: 操作系统列表的 JSON 字符串数组 (例如 `["ubuntu-latest"]`)。
+ * `os_json`: 操作系统列表的 JSON 字符串数组 (例如 `["ubuntu-24.04"]`)。
* `python_json`: Python 版本列表的 JSON 字符串数组 (例如 `["3.10"]`)。
#### C. 完整测试 (`13. _Test Suite (Full)`)
在所有支持的平台 (Linux/Mac/Win) 和 Python 版本 (3.10-3.13) 上运行完整的测试套件。手动触发时支持自定义矩阵配置。
* **Inputs**:
- * `os_json`: 操作系统列表 (默认: `["ubuntu-latest", "macos-latest", "windows-latest"]`)。
+ * `os_json`: 操作系统列表 (默认: `["ubuntu-24.04", "macos-14", "windows-latest"]`)。
* `python_json`: Python 版本列表 (默认: `["3.10", "3.11", "3.12", "3.13"]`)。
#### D. 安全扫描 (`14. _CodeQL Scan`)
@@ -458,7 +458,7 @@ git commit -m "refactor(storage): simplify interface methods"
仅构建 Python wheel 包,不发布。
* **Inputs**:
- * `os_json`: 操作系统列表 (默认: `["ubuntu-latest", "macos-latest", "macos-15-intel", "windows-latest"]`)。
+ * `os_json`: 操作系统列表 (默认: `["ubuntu-24.04", "ubuntu-24.04-arm", "macos-14", "macos-15-intel", "windows-latest"]`)。
* `python_json`: Python 版本列表 (默认: `["3.10", "3.11", "3.12", "3.13"]`)。
* `build_sdist`: 是否构建源码包 (默认: `true`)。
* `build_wheels`: 是否构建 Wheel 包 (默认: `true`)。