Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ on:
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 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')) }}
Expand All @@ -35,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: <value>)
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

Expand Down Expand Up @@ -69,7 +83,9 @@ 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:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading