Skip to content
Merged
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
28 changes: 22 additions & 6 deletions .github/workflows/accelerate-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@
name: accelerate-examples

concurrency:
# schedule runs serialize; each manual run gets its own group so a
# dispatch is never blocked behind a scheduled run.
group: ${{ github.event_name == 'schedule' && 'accelerate-examples-schedule' || format('manual-{0}', github.run_id) }}
# false: a run cancelled mid-way loses its outcome writeback, and the
# outcome is what drives the next cycle's retry.
cancel-in-progress: false
# Three groups: schedule runs serialize (a run cancelled mid-way
# loses its outcome writeback, and the outcome drives the next
# cycle's retry); each PR serializes per number so a new push
# cancels the stale run instead of queueing another matrix on the
# NPU runners; each manual run stands alone. Group names are
# repository-wide, so the PR group carries the workflow name.
group: ${{ github.event_name == 'schedule' && 'accelerate-examples-schedule' || (github.event_name == 'pull_request' && format('accelerate-examples-pr-{0}', github.event.pull_request.number)) || format('manual-{0}', github.run_id) }}
# true on PR runs only: a stale push's matrix should be cancelled,
# but a schedule run cancelled mid-way loses its outcome writeback.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

on:
# Daily at 02:00 Beijing time (UTC 18:00).
Expand All @@ -28,6 +32,18 @@ on:
required: false
default: ''
type: string
# PR runs need no merge: GitHub executes the workflow files from the
# PR merge ref, so a newly added trigger and engine run on the PR
# that adds them. `pull_request`, not `pull_request_target`: the
# declared read permissions are all the engine needs. paths lists
# only this project's files, so a PR that touches only the shared
# engine, scripts or schema starts no project's matrix.
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
paths:
- 'examples-guards/accelerate/**'
- '.github/workflows/accelerate-examples.yml'

# Engine jobs query the GitHub Job API (validate-results); called
# workflows run with the caller's GITHUB_TOKEN permissions.
Expand Down
Loading