ci: parallelize sample compilation - #1354
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e35e64763e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| pid="$1" | ||
| result_file="$2" | ||
| shift 2 | ||
| wait "${pid}" || true |
There was a problem hiding this comment.
Propagate background worker failures
When a background process_one_dir is killed—for example by OOM under the new concurrency—or aborts because of set -u, this discards its nonzero status and aggregates only its partial log. If the worker exits before printing a FAIL record, the summary omits that directory and returns success; reproducing this with one killed worker and one successful worker produced FAIL=0 and exit code 0. Record a synthetic failure or otherwise propagate failed wait statuses into the final result.
Useful? React with 👍 / 👎.
Summary
PTOAS_SAMPLE_JOBSto process independent sample directories concurrentlyMotivation
The
build-and-testjob spends a significant portion of its runtime compiling sample directories serially. These directories are independent and already write to separate output subdirectories, so bounded directory-level parallelism can reduce this stage without changing which samples run.This targets the sample stage only; editable builds and lit tests remain unchanged.
Validation
bash -n test/samples/runop.shgit diff --checkPTOAS_SAMPLE_JOBSreturns exit code 2shellcheck test/samples/runop.sh(only reports pre-existing SC2295 at line 175)actionlint .github/workflows/ci.yml(only reports pre-existing shell/style warnings and the repository custom runner label)A full local sample run was not performed because this isolated worktree does not contain built
ptoas/ptobcbinaries; the draft CI run will provide the end-to-end timing and correctness check.