From 26d9d55dd51221e6675c6967756e321359ac3eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=90=93=F0=9D=90=9E=F0=9D=90=9A=F0=9D=90=A4?= =?UTF-8?q?=F0=9D=90=A8=F0=9D=90=B0=F0=9D=90=9A?= <27560638+Teakowa@users.noreply.github.com> Date: Mon, 17 Aug 2026 15:41:55 +0800 Subject: [PATCH 1/2] chore(ci): skip Rust CI for docs-only changes --- .github/workflows/ci.yml | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b350d99..8db7cf5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,46 @@ permissions: contents: read jobs: + changes: + name: Classify changes + runs-on: ubuntu-latest + outputs: + rust: ${{ steps.classify.outputs.rust }} + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + - name: Classify changed paths + id: classify + shell: bash + env: + EVENT_NAME: ${{ github.event_name }} + PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} + PUSH_BASE_SHA: ${{ github.event.before }} + run: | + set -euo pipefail + if [[ "$EVENT_NAME" == "pull_request" ]]; then + base="$PR_BASE_SHA" + else + base="$PUSH_BASE_SHA" + fi + + if [[ -z "$base" || "$base" =~ ^0+$ ]]; then + echo "rust=true" >> "$GITHUB_OUTPUT" + exit 0 + fi + + files="$(git diff --name-only "$base" "$GITHUB_SHA")" + printf '%s\n' "$files" + if grep -Eq '^(crates/|compatibility/|Cargo\.(toml|lock)$|rust-toolchain\.toml$|\.github/workflows/ci\.yml$)' <<< "$files"; then + echo "rust=true" >> "$GITHUB_OUTPUT" + else + echo "rust=false" >> "$GITHUB_OUTPUT" + fi + rust-quality: + needs: changes + if: needs.changes.outputs.rust == 'true' name: Rust quality (${{ matrix.toolchain }}) runs-on: ubuntu-latest strategy: @@ -60,6 +99,8 @@ jobs: run: echo "No workspace crates on this branch; Rust quality gates skipped." macro-runtime-ports: + needs: changes + if: needs.changes.outputs.rust == 'true' name: JS runtime on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: From 663f67d5e96198be6fdbf88880f4e8d2f534a7ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9D=90=93=F0=9D=90=9E=F0=9D=90=9A=F0=9D=90=A4?= =?UTF-8?q?=F0=9D=90=A8=F0=9D=90=B0=F0=9D=90=9A?= <27560638+Teakowa@users.noreply.github.com> Date: Mon, 17 Aug 2026 15:50:13 +0800 Subject: [PATCH 2/2] chore(ci): simplify docs-only filtering --- .github/workflows/ci.yml | 47 +++++----------------------------------- 1 file changed, 6 insertions(+), 41 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8db7cf5..2c3bdd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,52 +3,19 @@ name: CI on: push: branches: ["main"] + paths-ignore: + - "**/*.md" + - "docs/**" pull_request: + paths-ignore: + - "**/*.md" + - "docs/**" permissions: contents: read jobs: - changes: - name: Classify changes - runs-on: ubuntu-latest - outputs: - rust: ${{ steps.classify.outputs.rust }} - steps: - - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - name: Classify changed paths - id: classify - shell: bash - env: - EVENT_NAME: ${{ github.event_name }} - PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} - PUSH_BASE_SHA: ${{ github.event.before }} - run: | - set -euo pipefail - if [[ "$EVENT_NAME" == "pull_request" ]]; then - base="$PR_BASE_SHA" - else - base="$PUSH_BASE_SHA" - fi - - if [[ -z "$base" || "$base" =~ ^0+$ ]]; then - echo "rust=true" >> "$GITHUB_OUTPUT" - exit 0 - fi - - files="$(git diff --name-only "$base" "$GITHUB_SHA")" - printf '%s\n' "$files" - if grep -Eq '^(crates/|compatibility/|Cargo\.(toml|lock)$|rust-toolchain\.toml$|\.github/workflows/ci\.yml$)' <<< "$files"; then - echo "rust=true" >> "$GITHUB_OUTPUT" - else - echo "rust=false" >> "$GITHUB_OUTPUT" - fi - rust-quality: - needs: changes - if: needs.changes.outputs.rust == 'true' name: Rust quality (${{ matrix.toolchain }}) runs-on: ubuntu-latest strategy: @@ -99,8 +66,6 @@ jobs: run: echo "No workspace crates on this branch; Rust quality gates skipped." macro-runtime-ports: - needs: changes - if: needs.changes.outputs.rust == 'true' name: JS runtime on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: