From 2f500137fab217c0bfd74c95c42a86f4ce8b24da Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Tue, 16 Dec 2025 13:49:57 +0000 Subject: [PATCH 1/4] Use synth_only build mode for faster CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add support for build_mode parameter: - Regular CI (push/PR/merge_group): Uses synth_only for faster builds - Backend-test (repository_dispatch): Uses full to test complete pipeline - workflow_dispatch: Allows manual selection via input This significantly speeds up CI by skipping P&R, GDS generation, and LVS verification during normal development workflows. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/main.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ed56ff4..790e064 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -20,10 +20,20 @@ on: description: 'Backend version/tag to test against (overrides vars.CHIPFLOW_BACKEND_VERSION)' required: false type: string + build_mode: + description: 'Build mode: full (P&R, GDS, LVS) or synth_only (synthesis only)' + required: false + type: choice + options: + - synth_only + - full + default: synth_only env: lock_pdm: ${{ ! (github.ref_name == 'refs/heads/latest-release' || inputs.release) }} BACKEND_VERSION: ${{ inputs.backend_version || github.event.client_payload.backend_version || vars.CHIPFLOW_BACKEND_VERSION }} + # Use synth_only for regular CI (faster), full for backend-test (tests complete pipeline) + BUILD_MODE: ${{ inputs.build_mode || (github.event_name == 'repository_dispatch' && 'full') || 'synth_only' }} name: CI run-name: ${{ github.event_name == 'repository_dispatch' && format('Backend Test - {0}', github.event.client_payload.backend_version) || (inputs.backend_version && format('CI - Backend {0}', inputs.backend_version) || (inputs.release && 'Release' || 'CI')) }} @@ -70,6 +80,7 @@ jobs: CHIPFLOW_API_KEY: ${{ secrets.CHIPFLOW_API_KEY}} CHIPFLOW_API_ORIGIN: ${{ vars.CHIPFLOW_API_ORIGIN }} CHIPFLOW_BACKEND_VERSION: ${{ env.BACKEND_VERSION }} + CHIPFLOW_BUILD_MODE: ${{ env.BUILD_MODE }} test: runs-on: ubuntu-latest From 3e8b3ef77feb1314bc0ba1e5eec28f1724928e97 Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Tue, 16 Dec 2025 14:00:54 +0000 Subject: [PATCH 2/4] Simplify BUILD_MODE: synth_only for all except repository_dispatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove build_mode workflow input and simplify logic: - repository_dispatch (backend-test): full mode - All other triggers: synth_only mode 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/main.yaml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 790e064..419d8e1 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -20,20 +20,12 @@ on: description: 'Backend version/tag to test against (overrides vars.CHIPFLOW_BACKEND_VERSION)' required: false type: string - build_mode: - description: 'Build mode: full (P&R, GDS, LVS) or synth_only (synthesis only)' - required: false - type: choice - options: - - synth_only - - full - default: synth_only env: lock_pdm: ${{ ! (github.ref_name == 'refs/heads/latest-release' || inputs.release) }} BACKEND_VERSION: ${{ inputs.backend_version || github.event.client_payload.backend_version || vars.CHIPFLOW_BACKEND_VERSION }} - # Use synth_only for regular CI (faster), full for backend-test (tests complete pipeline) - BUILD_MODE: ${{ inputs.build_mode || (github.event_name == 'repository_dispatch' && 'full') || 'synth_only' }} + # Use synth_only for all CI (faster), full only for backend-test (tests complete pipeline) + BUILD_MODE: ${{ github.event_name == 'repository_dispatch' && 'full' || 'synth_only' }} name: CI run-name: ${{ github.event_name == 'repository_dispatch' && format('Backend Test - {0}', github.event.client_payload.backend_version) || (inputs.backend_version && format('CI - Backend {0}', inputs.backend_version) || (inputs.release && 'Release' || 'CI')) }} From 32c588420b8ba3983bdc9a8f79ebd3f3c2d94e9b Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Tue, 16 Dec 2025 14:11:12 +0000 Subject: [PATCH 3/4] Update pdm.lock with latest chipflow-lib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Picks up CHIPFLOW_BUILD_MODE support for synth_only builds. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- pdm.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdm.lock b/pdm.lock index 20090e4..70acfce 100644 --- a/pdm.lock +++ b/pdm.lock @@ -206,10 +206,10 @@ dependencies = [ [[package]] name = "chipflow-lib" -version = "0.1.1.dev320" +version = "0.1.1.dev322" requires_python = "<3.14,>=3.11" git = "https://github.com/ChipFlow/chipflow-lib.git" -revision = "43c32b9b1acb199708c5c6256c25353b6d92aac8" +revision = "7fb7cf4b3dab5ba4dc1a44f59907228f6c35ed05" summary = "ChipFlow common tools." groups = ["default"] dependencies = [ From 43b4bf8df28b2ac4e0bd60ae603749e93477acb3 Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Tue, 16 Dec 2025 14:18:34 +0000 Subject: [PATCH 4/4] Add BACKEND_VERSION override via PR body MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PRs can now specify a backend version to test against by adding BACKEND_VERSION: to the PR description. Priority order: 1. PR body override (for PRs) 2. workflow_dispatch input 3. repository_dispatch client_payload 4. vars.CHIPFLOW_BACKEND_VERSION 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/main.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 419d8e1..9814726 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -37,6 +37,18 @@ jobs: matrix: design: ['mcu_soc', 'minimal'] steps: + - name: Parse PR body for backend version override + id: pr-config + if: github.event_name == 'pull_request' + env: + PR_BODY: ${{ github.event.pull_request.body }} + run: | + # Extract BACKEND_VERSION from PR body (format: BACKEND_VERSION: ) + if [[ "$PR_BODY" =~ BACKEND_VERSION:[[:space:]]*([^[:space:]]+) ]]; then + echo "backend_version=${BASH_REMATCH[1]}" >> $GITHUB_OUTPUT + echo "Found BACKEND_VERSION override: ${BASH_REMATCH[1]}" + fi + - name: Check out source code uses: actions/checkout@v4 @@ -71,7 +83,8 @@ jobs: env: CHIPFLOW_API_KEY: ${{ secrets.CHIPFLOW_API_KEY}} CHIPFLOW_API_ORIGIN: ${{ vars.CHIPFLOW_API_ORIGIN }} - CHIPFLOW_BACKEND_VERSION: ${{ env.BACKEND_VERSION }} + # Priority: PR body override > workflow input > repository_dispatch > vars + CHIPFLOW_BACKEND_VERSION: ${{ steps.pr-config.outputs.backend_version || env.BACKEND_VERSION }} CHIPFLOW_BUILD_MODE: ${{ env.BUILD_MODE }} test: