Files
DDNS/.github/workflows/rust-python-checks.yml
New Futureandopenhands e9ad33e88b Feat/v5 web mcp (#745)
* feat(rust): add Web dashboard and MCP services

Share configuration, status and synchronization between Web and MCP; add authenticated HTTP, stdio lifecycle support, in-process scheduling and offline regression tests. Exercise native tests on the existing Windows/macOS/Linux CI matrix.

Co-authored-by: openhands <openhands@all-hands.dev>

* ci(rust): allow manual cross-platform validation

Enable workflow_dispatch for feature-branch CI without requiring PR creation. Preserve matrices, permissions, publishing boundaries and trusted-branch cache policy.

Co-authored-by: openhands <openhands@all-hands.dev>

* ci(rust): validate feature branch pushes

Run the existing Rust cross-platform matrix for feat/** pushes while retaining trusted-branch-only cache writes and unchanged release triggers.

Co-authored-by: openhands <openhands@all-hands.dev>

* ci(rust): remove temporary branch trigger

The v5 pull request now exists and runs the complete native matrix, so restore the original trusted push branches while retaining Web/MCP paths and tests.

Co-authored-by: openhands <openhands@all-hands.dev>

---------

Co-authored-by: openhands <openhands@all-hands.dev>
2026-09-12 12:09:26 +08:00

118 lines
3.8 KiB
YAML

name: Python checks for Rust-only changes
on:
push:
branches: ["master", "main", "v5"]
paths:
- "rust/**"
- "web/**"
- "ddns/config/field-model.json"
- ".github/workflows/rust.yml"
- ".github/workflows/rust-python-checks.yml"
- ".github/workflows/publish-rust.yml"
- ".github/instructions/rust.instructions.md"
- "docker/rust.Dockerfile"
- "docs/public/install-rust.sh"
- "tests/scripts/test-install-rust.sh"
- "docs/dev/rust.md"
- "docs/en/dev/rust.md"
- "docs/install.md"
- "docs/en/install.md"
- "docs/docker.md"
- "docs/en/docker.md"
- "README.md"
- "README.en.md"
pull_request:
branches: ["master", "main", "abc", "v5"]
paths:
- "rust/**"
- "web/**"
- "ddns/config/field-model.json"
- ".github/workflows/rust.yml"
- ".github/workflows/rust-python-checks.yml"
- ".github/workflows/publish-rust.yml"
- ".github/instructions/rust.instructions.md"
- "docker/rust.Dockerfile"
- "docs/public/install-rust.sh"
- "tests/scripts/test-install-rust.sh"
- "docs/dev/rust.md"
- "docs/en/dev/rust.md"
- "docs/install.md"
- "docs/en/install.md"
- "docs/docker.md"
- "docs/en/docker.md"
- "README.md"
- "README.en.md"
permissions:
contents: read
concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
changes:
runs-on: ubuntu-latest
outputs:
pure_rust: ${{ steps.classify.outputs.pure_rust }}
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- id: classify
name: Detect non-Rust changes
shell: bash
env:
BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }}
HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
set -euo pipefail
if [[ ! "$BASE_SHA" =~ ^[0-9a-f]{40}$ ]] ||
[[ "$BASE_SHA" == "0000000000000000000000000000000000000000" ]] ||
! git cat-file -e "$BASE_SHA^{commit}" 2>/dev/null; then
echo "pure_rust=false" >> "$GITHUB_OUTPUT"
exit 0
fi
pure_rust=true
while IFS= read -r path; do
case "$path" in
rust/*|.github/workflows/rust.yml|.github/workflows/rust-python-checks.yml|.github/workflows/publish-rust.yml|.github/instructions/rust.instructions.md|docker/rust.Dockerfile|docs/public/install-rust.sh|tests/scripts/test-install-rust.sh|docs/dev/rust.md|docs/en/dev/rust.md|docs/install.md|docs/en/install.md|docs/docker.md|docs/en/docker.md|README.md|README.en.md)
;;
*)
pure_rust=false
break
;;
esac
done < <(git diff --name-only "$BASE_SHA" "$HEAD_SHA")
echo "pure_rust=$pure_rust" >> "$GITHUB_OUTPUT"
not-applicable:
name: ${{ matrix.context }}
needs: changes
if: needs.changes.outputs.pure_rust == 'true'
strategy:
fail-fast: false
matrix:
context:
- lint
- pypi
- python (2.7)
- python (3.8)
- nuitka (ubuntu-24.04-arm, arm64)
- nuitka (ubuntu-latest, x64)
- nuitka (windows-11-arm, arm64)
- nuitka (windows-latest, x64)
- nuitka (windows-latest, x86)
- nuitka (macos-latest, arm64)
- nuitka (macos-15-intel, x64)
- docker (amd, pull_request)
- docker (arm, pull_request)
- linux-binary (amd, glibc)
- linux-binary (arm, musl)
- linux-binary (arm, glibc)
runs-on: ubuntu-latest
steps:
- run: echo "Python build is not applicable to this Rust-only change."