Commit acd0b89
committed
.github: CI workflow for samples/tasks
Separate workflow from Linux-libretro-common-samples, since the two
test suites have different build shapes:
* libretro-common/samples/ binaries are self-contained: each
Makefile produces a single test binary that needs no arguments
and exits on its own. The existing workflow walks every
Makefile under that tree with a generic build+run loop.
* samples/tasks/ pulls in ~60 source files from across the
retroarch tree -- core_info, playlist, msg_hash, libretro-db,
the task queue, archivers -- and links the two demos with
hand-written stubs for retroarch-core-only symbols. The two
binaries also have different runtime shapes (one is a demo
that needs a real directory tree, the other a self-contained
predicate test), so a generic loop is a poor fit.
Triggers paths the existing workflow doesn't cover:
* samples/tasks/** (obvious)
* tasks/task_decompress.c (the predicate under test in
archive_name_safety_test
keeps a verbatim copy; if
the upstream predicate is
edited the copy must follow)
* tasks/task_database{,_cue}.c (compiled into database_task)
* this workflow file itself
Behaviour:
* database_task is built (catches compile/link regressions, which
is most of what rots between releases), then invoked with no
args to verify it prints usage and exits non-zero. The full
dbscan loop is NOT exercised in CI: task_push_dbscan ignores
the caller's completion callback and delegates to
task_push_manual_content_scan, which has no public way to
plumb a completion signal back out. The loop can only be
terminated externally, which makes it a poor CI fit. An
honest note explaining this is in the workflow step's inline
comment.
* archive_name_safety_test is built and run with a 60s timeout.
This is the true regression test -- it enumerates 23 safe and
unsafe paths (including ".." traversal, absolute Unix and
Windows paths, drive-letter prefixes, and backslash-separated
attacks) and fails if archive_name_is_safe() ever regresses.
Local dry-run of every step on the current master:
[pass] database_task builds and links
[pass] database_task no-args exit=1 (expected non-zero)
[pass] archive_name_safety_test all 23 cases pass1 parent 509c0ea commit acd0b89
1 file changed
Lines changed: 88 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
0 commit comments