Skip to content

ci: parallelize sample compilation - #1354

Open
HecreReed wants to merge 1 commit into
hw-native-sys:mainfrom
HecreReed:codex/parallel-sample-ci
Open

ci: parallelize sample compilation#1354
HecreReed wants to merge 1 commit into
hw-native-sys:mainfrom
HecreReed:codex/parallel-sample-ci

Conversation

@HecreReed

Copy link
Copy Markdown
Collaborator

Summary

  • add PTOAS_SAMPLE_JOBS to process independent sample directories concurrently
  • keep the script default at 1 job so local behavior remains unchanged
  • run the CI sample stage with 4 jobs
  • preserve deterministic summary aggregation and validate the job count

Motivation

The build-and-test job 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.sh
  • git diff --check
  • invalid PTOAS_SAMPLE_JOBS returns exit code 2
  • shellcheck 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/ptobc binaries; the draft CI run will provide the end-to-end timing and correctness check.

@HecreReed
HecreReed marked this pull request as ready for review August 26, 2026 07:58

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread test/samples/runop.sh
pid="$1"
result_file="$2"
shift 2
wait "${pid}" || true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant