From 016def0b4ef6310839bbb2af95b8620baa63fc25 Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Wed, 12 Nov 2025 21:09:11 +0000 Subject: [PATCH 1/2] Add GitHub Actions caching for ~/.cache directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds caching for the ~/.cache directory in both submit and test jobs to improve CI performance by caching build artifacts, YoWASP products, and other temporary files. Changes: - Add ~/.cache caching with keys based on OS, design, and dependencies - Replace specific YoWASP cache with general ~/.cache (includes YoWASP) - Update actions/setup-python from v4 to v5 (v4 runner is deprecated) - Use restore-keys for fallback cache matching This reduces redundant builds and downloads across CI runs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/main.yaml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b97c47f..aefff1a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -31,7 +31,7 @@ jobs: - name: Check out source code uses: actions/checkout@v4 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 - name: Set up PDM uses: pdm-project/setup-pdm@v4 @@ -43,6 +43,15 @@ jobs: - name: Install dependencies with multirepo uses: chipflow/pdm-multirepo@v1 + - name: Cache ~/.cache directory + uses: actions/cache@v4 + with: + path: ~/.cache + key: cache-${{ runner.os }}-${{ matrix.design }}-${{ hashFiles('**/pyproject.toml', '**/pdm.lock') }} + restore-keys: | + cache-${{ runner.os }}-${{ matrix.design }}- + cache-${{ runner.os }}- + - name: Lock pins working-directory: ./${{ matrix.design }} run: pdm run chipflow pin lock @@ -74,13 +83,14 @@ jobs: - name: Install dependencies with multirepo uses: chipflow/pdm-multirepo@v1 - - name: Cache YoWASP build products + - name: Cache ~/.cache directory uses: actions/cache@v4 with: - path: ~/.cache/YoWASP - key: YoWASP-${{ runner.os }}-${{ hashFiles('./.venv/**/*.wasm') }} + path: ~/.cache + key: cache-${{ runner.os }}-${{ matrix.design }}-${{ hashFiles('**/pyproject.toml', '**/pdm.lock') }} restore-keys: | - YoWASP-${{ runner.os }}- + cache-${{ runner.os }}-${{ matrix.design }}- + cache-${{ runner.os }}- - name: Lock pins working-directory: ./${{ matrix.design }} From ac66085ad1ef4dfdc0f3f300bfdfeb0a9f9c52ba Mon Sep 17 00:00:00 2001 From: Rob Taylor Date: Thu, 11 Dec 2025 18:01:54 +0000 Subject: [PATCH 2/2] Add repository_dispatch trigger for backend integration testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allows chipflow-backend to trigger the CI workflow with a specific backend version via repository_dispatch event. Also adds a manual backend_version input for workflow_dispatch. The backend version is resolved in priority order: 1. workflow_dispatch input (manual trigger) 2. repository_dispatch client_payload (external trigger) 3. vars.CHIPFLOW_BACKEND_VERSION (default) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/main.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index aefff1a..4499063 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,6 +5,8 @@ on: - 'latest-release' pull_request: merge_group: + repository_dispatch: + types: [backend-test] workflow_dispatch: inputs: release: @@ -14,12 +16,17 @@ on: ENVIRONMENT: required: true type: environment + backend_version: + description: 'Backend version/tag to test against (overrides vars.CHIPFLOW_BACKEND_VERSION)' + required: false + type: string 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 }} name: CI -run-name: ${{ inputs.release && 'Release' || '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')) }} jobs: submit: @@ -62,7 +69,7 @@ jobs: env: CHIPFLOW_API_KEY: ${{ secrets.CHIPFLOW_API_KEY}} CHIPFLOW_API_ORIGIN: ${{ vars.CHIPFLOW_API_ORIGIN }} - CHIPFLOW_BACKEND_VERSION: ${{ vars.CHIPFLOW_BACKEND_VERSION }} + CHIPFLOW_BACKEND_VERSION: ${{ env.BACKEND_VERSION }} test: runs-on: ubuntu-latest