Skip to content

[API Compatibility] migrate workflows to github actions#889

Open
Manfredss wants to merge 41 commits into
PaddlePaddle:masterfrom
Manfredss:migrate_workflow
Open

[API Compatibility] migrate workflows to github actions#889
Manfredss wants to merge 41 commits into
PaddlePaddle:masterfrom
Manfredss:migrate_workflow

Conversation

@Manfredss

@Manfredss Manfredss commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

PR Docs

[CI] Add GitHub Actions CI suite + PR /re-run action

Summary

Introduces the full GitHub Actions CI for PaConvert under .github/workflows/
plus a reusable composite action under .github/actions/. This covers code
style, API consistency, install/packaging, and CPU / GPU / distributed unit
tests, and adds a comment-driven workflow re-run mechanism for PRs.

Workflows added (.github/workflows/)

File Workflow / Job Runner Purpose
codestyle.yml CodeStyle Check / pre-commit CPU* (ubuntu-24.04) Runs pre-commit run --all-files (pre-commit 2.17.0)
consistency.yml Consistency Check / Common API Consistency Check CPU* (ubuntu-24.04) Runs tools/consistency/consistency_check.py; uploads log on failure
Install_check.yml Install Check CPU* (ubuntu-24.04) Builds the wheel (sdist bdist_wheel), installs it, runs paconvert -V / --run_check
Unittest_check.yml CI Unittest CPU* (ubuntu-24.04) CPU pytest suite with reruns + --lf retry; uploads pytest.log on failure
Unittest_check_gpu.yml GPU Unittest Check self-hosted GPU (group: PaConvert) GPU pytest suite (CUDA 11.8 torch/paddle)
Unittest_check_distribute.yml Distributed Unittest Check self-hosted GPU (group: PaConvert) 2-GPU distributed tests via run_and_compare.py
(CUDA_VISIBLE_DEVICES=0,1, --nproc_per_node=2)
Modeltest_check.yml Modeltest Check self-hosted GPU (group: PaConvert) Converts model code-set from /workspace/torch_project, runs
tools/modeltest/modeltest_check.py
rerun.yml Rerun Workflows ubuntu-latest Re-runs CI jobs from a PR comment (see below)

* CPU jobs currently run on ubuntu-24.04 with a # TODO: replace with the actual self-hosted CPU runner group name placeholder — see Follow-ups.

Composite action added (.github/actions/rerun-workflow/)

  • action.yml — composite action Rerun workflow; inputs GITHUB_TOKEN,
    OWNER, REPO, PR_ID, JOB_NAME.
  • rerun.sh — resolves the PR head SHA via the GitHub REST API and either
    re-runs all failed jobs (rerun-failed-jobs) or a specific job by name.

Comment-driven re-run

On a PR, the PR author can comment to re-trigger checks:

/re-run all-failed · codestyle · consistency · install-check
· cpu-unittest · gpu-unittest · distributed-unittest · model-test

(Guarded by github.event.comment.user.login == github.event.issue.user.login.)

Design notes

  • Triggers: pull_request + push to master, develop, release/**,
    with paths-ignore for **/*.md, docs/**, LICENSE, .gitignore,
    .pre-commit-config.yaml.
  • Concurrency: per-workflow/per-PR group with cancel-in-progress: true.
  • Least privilege: permissions: contents: read everywhere; rerun.yml
    additionally gets actions: write.
  • Reliability: Paddle installed from nightly with --timeout/--retries;
    GPU torch/torchvision pulled as pinned cu118 wheels from
    paddle-paconvert.bj.bcebos.com; pytest retried (--reruns=3, then --lf);
    failure logs/artifacts uploaded with 14-day retention.
  • Nightly cron is scaffolded but commented out in every workflow.

Self-hosted runner prerequisites

  • Runner group PaConvert online (it currently contains the paddle-gpu
    runner).
  • Distributed job requires a host with ≥2 GPUs.
  • Modeltest job requires the model code-set prepared at
    /workspace/torch_project on the runner.

Follow-ups

  • Point the 4 CPU jobs (CodeStyle, Consistency, Install, CI Unittest) at the
    self-hosted CPU runner group (replace the ubuntu-24.04 placeholders).
  • Enable the nightly schedule cron once the runners are validated.

Test plan

  • CPU jobs (codestyle / consistency / install / CI unittest) pass on a PR.
  • gpu-unittest, distributed-unittest, modeltest are picked up by the
    PaConvert group and complete.
  • /re-run <job> comment re-triggers the targeted job(s).

PR APIs

N/A

@Manfredss Manfredss self-assigned this Jun 15, 2026
@paddle-bot paddle-bot Bot added the contributor External developers label Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant