Repository navigation
68 lines (63 loc) · 2.88 KB
/
Copy pathdiffusers-examples.yml
File metadata and controls
68 lines (63 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# diffusers examples guard - project thin trigger.
#
# Calls the common engine .github/workflows/examples-template.yml;
# this file only declares what varies per project: schedule,
# concurrency, upstream repo, dispatch input forwarding, and matrix
# parallelism. The guard loop (release + workflow-files monitor /
# manifest-check / run-example matrix / validate-results /
# save-monitor-state) lives in the engine. See examples-guards/README.md
# for the design.
name: diffusers-examples
concurrency:
# 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: a bare
# pr-<number> would let two projects' runs on one PR cancel each
# other.
group: ${{ github.event_name == 'schedule' && 'diffusers-examples-schedule' || (github.event_name == 'pull_request' && format('diffusers-examples-pr-{0}', github.event.pull_request.number)) || format('manual-{0}', github.run_id) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
on:
schedule:
- cron: '5 22 * * *'
workflow_dispatch:
inputs:
target_ref:
description: Branch, tag, or SHA to test (empty = latest upstream release; falls back to main on API failure)
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. Whether a fork PR waits for a maintainer's approval
# first is the repository's fork-PR policy. `pull_request`, not
# `pull_request_target`: the declared read permissions are all the
# engine needs. paths lists only this project's files, as the
# quick-start triggers do: 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/diffusers/**'
- '.github/workflows/diffusers-examples.yml'
# Engine jobs query the GitHub Job API (validate-results); called
# workflows run with the caller's GITHUB_TOKEN permissions.
permissions:
actions: read
contents: read
jobs:
diffusers-examples:
uses: ./.github/workflows/examples-template.yml
with:
# Namespaces cache keys (examples-monitor-state-diffusers_*),
# artifact names and the scheduling paths under
# examples-guards/diffusers.
project: diffusers
upstream_repo: huggingface/diffusers
target_ref: ${{ inputs.target_ref }}
# 52 supported entries: cap parallel legs at 4 so cold-cache model
# downloads don't contend for runner bandwidth.
max_parallel: 4