Skip to content

Extract reusable build workflow#211

Closed
leynos wants to merge 1 commit into
mainfrom
codex/create-reusable-build-and-package-workflow
Closed

Extract reusable build workflow#211
leynos wants to merge 1 commit into
mainfrom
codex/create-reusable-build-and-package-workflow

Conversation

@leynos

@leynos leynos commented Oct 16, 2025

Copy link
Copy Markdown
Owner

Summary

  • add a reusable build-and-package workflow to consolidate platform-specific release jobs
  • update release.yml to invoke the reusable workflow for Linux, Windows, and macOS matrices

Testing

  • make check-fmt
  • make lint
  • make test

https://chatgpt.com/codex/tasks/task_e_68f02eb907e48322b793bac1a3f97686

Summary by Sourcery

Extract common build and packaging steps into a reusable workflow and update the release pipeline to call it for Linux, Windows, and macOS builds.

New Features:

  • Add a reusable GitHub Actions workflow (build-and-package.yml) to centralize build, packaging, and artifact upload for all platforms

Enhancements:

  • Refactor release.yml to invoke the new build-and-package workflow for Linux, Windows, and macOS jobs, removing duplicated steps

Build:

  • Introduce build-and-package.yml under .github/workflows to define the shared build and packaging logic

CI:

  • Update CI configuration to use workflow_call inputs for platform, runner, targets, and publishing flags

Deduplicate release job logic into a reusable workflow used across Linux, Windows, and macOS builds.
@sourcery-ai

sourcery-ai Bot commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Reviewer's Guide

This PR extracts the per-platform build and packaging logic into a single reusable workflow and refactors release.yml to invoke it for Linux, Windows, and macOS, significantly reducing duplication and centralizing CI steps.

File-Level Changes

Change Details Files
Introduce a reusable build-and-package workflow
  • Define workflow_call inputs for platform, target, runner, packaging parameters and publish flag
  • Unify checkout, build, conditional uv install and staging steps
  • Implement platform-specific packaging and upload steps under one job with conditional execution
.github/workflows/build-and-package.yml
Refactor release.yml to use the new reusable workflow
  • Remove explicit runs-on and step definitions in build-linux/windows/macos jobs
  • Replace per-platform steps with a workflow_call to build-and-package.yml and map inputs
  • Eliminate duplicated packaging and upload logic by centralizing it in the reusable workflow
.github/workflows/release.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@leynos leynos closed this Oct 16, 2025
@leynos

leynos commented Oct 16, 2025

Copy link
Copy Markdown
Owner Author

@coderabbitai pause

@coderabbitai

coderabbitai Bot commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

Note

Reviews paused

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

@coderabbitai

coderabbitai Bot commented Oct 16, 2025

Copy link
Copy Markdown
Contributor
✅ Actions performed

Reviews paused.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and found some issues that need to be addressed.

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location> `.github/workflows/build-and-package.yml:64` </location>
<code_context>
           - target: aarch64-unknown-linux-gnu
             artifact: linux-arm64
             package_arch: arm64
-    steps:
-      - uses: >-
-          actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633
</code_context>

<issue_to_address>
**issue (review_instructions):** Add behavioural and unit tests for the new build-and-package workflow logic.

This workflow introduces new logic for cross-platform build and packaging. You must provide both behavioural and unit tests to demonstrate that the workflow functions as intended and handles expected scenarios.

<details>
<summary>Review instructions:</summary>

**Path patterns:** `**/*`

**Instructions:**
For any new feature or change to an existing feature, both behavioural *and* unit tests are required.

</details>
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant