Repository navigation
72 lines (67 loc) · 3.48 KB
/
Copy pathllama_cpp-quick-start.yml
File metadata and controls
72 lines (67 loc) · 3.48 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
69
70
71
72
# llama.cpp quick start guard - project thin trigger.
#
# Calls the common engine .github/workflows/quick-start-template.yml;
name: llama_cpp-quick-start
concurrency:
# format() is load-bearing: a '||' between 'manual-' and
# github.run_id would short-circuit on the truthy literal and
# every dispatch would share one 'manual-' group.
group: ${{ github.event_name == 'schedule' && 'llama_cpp-quick-start-schedule' || format('manual-{0}', github.run_id) }}
# cancel-in-progress: false because (1) a schedule run cancelled
# mid-way loses its outcome writeback - the outcome is what makes
# the retry mechanism work, and the 'if: always()' guard isn't
# enough when the container is being torn down; (2) dispatch / PR
# runs already live in unique groups so there's nothing to cancel.
cancel-in-progress: false
on:
schedule:
# Twice a day, 12 h apart: UTC 01:45 and 13:45
# (Beijing +8). All quick-start guards share this cadence; the
# (hour, minute) slot is staggered across the guards so the NPU
# runners do not all fire at the same time.
- cron: '45 1,13 * * *'
workflow_dispatch:
# PR trigger: docs/tests changes get a guard run. paths filter avoids burning
# the self-hosted NPU runner on unrelated PRs. `pull_request` (not
# `pull_request_target`): contents: read is enough, no write-token risk.
pull_request:
branches: [main]
paths:
- 'sources/llama_cpp/**'
- 'tests/llama_cpp/**'
permissions:
contents: read
jobs:
llama_cpp-quick-start:
uses: ./.github/workflows/quick-start-template.yml
with:
# Namespaces cache keys (monitor-state-llama_cpp-*), artifacts
# (llama_cpp-quick-start-<run_id>) and the test working dir
# (workflows/tests/llama_cpp).
project: llama_cpp
# Self-hosted NPU runner for the test job only; the engine pins
# the cache I/O jobs (restore-cache / publish-and-persist) to
# GitHub-hosted ubuntu-latest. Two cards: the doc's infer-multi
# block sets ASCEND_RT_VISIBLE_DEVICES=0,1 and expects CANN1.
test_runner: '["linux-aarch64-a2-2"]'
image: swr.cn-south-1.myhuaweicloud.com/ascendhub/cann:9.1.0-910b-ubuntu22.04-py3.12
# Do not add a container bind-mount for /root/.cache: the runner
# NFS already persists that tree. Hidden #test-setup in the doc
# restores/saves the GGUF under /root/.cache/huggingface/llama.cpp/.
# Compile-from-source budget. peft's 120 min is not enough for a
# cold cmake + CANN backend build plus a 400 MB GGUF download.
timeout_minutes: 240
upstream_repo: ggml-org/llama.cpp
# Doc URL points to the upstream Ascend/docs repo. {0} is filled by the
# engine: PR head SHA on PR runs, 'main' otherwise. Same-repo PRs (head
# SHA exists on Ascend/docs) test the PR-version of the doc; fork PRs
# (head SHA on a fork) 404 on doc fetch - accepted, since the content
# lands on Ascend/docs post-merge.
doc_url: 'https://raw.githubusercontent.com/Ascend/docs/{0}/sources/llama_cpp/quick_start.md'
doc_path: https://github.com/Ascend/docs/blob/main/sources/llama_cpp/quick_start.md
# cwd is the repo root inside the `workflows` checkout (matches
# engine template's `working-directory: workflows`); env contract
# (MONITORED_DOC_URL / UPSTREAM_REF / NPU_READY) is injected by the
# engine. All project env prep lives in the test subclass's
# prepare_environment hook.
test_command: python -m unittest tests.llama_cpp.test_quick_start_ascend -v 2>&1