Repository navigation
Linux workflow template - #79
Conversation
WalkthroughA reusable GitHub Actions workflow for Linux builds was introduced and integrated into both the main Linux workflow and the release workflow. The previously inline Linux build steps were refactored to call this new template, and the release workflow was updated to upload Linux package artifacts (DEB, RPM, TGZ) to GitHub releases. Changes
Sequence Diagram(s)sequenceDiagram
participant WorkflowCaller as linux.yml / release.yml
participant LinuxTemplate as linux-template.yml
participant GitHub as GitHub Actions
participant CMake as CMake/CPack
WorkflowCaller->>LinuxTemplate: Call workflow with version input
LinuxTemplate->>GitHub: Checkout code
LinuxTemplate->>LinuxTemplate: Update version strings
LinuxTemplate->>GitHub: Install Qt
LinuxTemplate->>CMake: Configure, build, and install project
LinuxTemplate->>CMake: Package outputs (7Z, ZIP, TBZ2, TGZ, TXZ, TZ, DEB, RPM)
LinuxTemplate->>GitHub: Upload build artifacts
WorkflowCaller->>GitHub: (release.yml only) Upload DEB, RPM, TGZ as release assets
Possibly related PRs
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (2)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Pull Request Overview
This pull request introduces a reusable GitHub Actions workflow template for Linux builds and integrates Linux artifacts into the release process.
- Added a new reusable Linux build workflow in .github/workflows/linux-template.yml to parameterize version and Qt version inputs.
- Updated .github/workflows/linux.yml to use the new template, and modified .github/workflows/release.yml to reference the Linux workflow and upload Linux packages (DEB, RPM, TGZ).
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| .github/workflows/release.yml | Refactored to include a new linux job and added asset upload steps for Linux packages. |
| .github/workflows/linux.yml | Replaced duplicated build steps with a call to the new workflow template. |
| .github/workflows/linux-template.yml | Introduced a reusable workflow template for Linux builds with configurable inputs. |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (7)
.github/workflows/linux-template.yml (6)
1-14: Consider adding a concurrency policy to cancel redundant runs
Right now, multiple workflow calls with the same version may queue up. You can add a top‐levelconcurrencyblock to cancel in‐flight runs for the same version, e.g.:concurrency: group: linux-build-${{ inputs.version }} cancel-in-progress: true
22-30: Make version replacement more robust and cross‐platform
You're using PowerShell on Linux which works, but a bash/sed approach or CMake’sconfigure_file()would avoid needing pwsh and special quoting. This also ensures consistency across environments.
31-35: Cache Qt installation for faster CI feedback
Thejurplel/install-qt-actioncan be paired withactions/cacheto avoid re-downloading Qt on every run. Consider adding a cache step keyed oninputs.qt_version.
36-42: Use an out-of-source build directory to keep workspace clean
Instead of building in‐place, create abuild/dir:run: | mkdir -p build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/sqlitequery .. cmake --build . --parallel 32 cmake --install . --prefix /tmp/sqlitequeryThis prevents clutter in
src/project.
43-53: Reduce unnecessary package generators
If your downstream release only consumes DEB, RPM, and TGZ, drop the othercpack -Gcalls to speed up packaging and reduce storage.
55-60: Generate and upload a checksum manifest for integrity
For security and traceability, consider adding:- run: sha256sum src/project/SQLiteQueryAnalyzer-${{ inputs.version }}-Linux.* > checksums.txt working-directory: src/project - uses: actions/upload-artifact@v4 with: name: checksums_v${{ inputs.version }} path: src/project/checksums.txt.github/workflows/linux.yml (1)
18-20: Centralize the version prefix to avoid duplication
The0.2.prefix is hard-coded here and inrelease.yml. You might define a top-levelenv: VERSION_PREFIX: '0.2.'and then reference${{ env.VERSION_PREFIX }}${{ github.run_number }}in both workflows to prevent drift.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/linux-template.yml(1 hunks).github/workflows/linux.yml(1 hunks).github/workflows/release.yml(2 hunks)
🔇 Additional comments (1)
.github/workflows/release.yml (1)
34-37: Verify if the Linux job needs secret inheritance
Yourlinuxjob calls the reusable template which currently doesn’t declaresecrets: inherit. If in the future you add steps that requireGITHUB_TOKENor other secrets inside the template, those must be explicitly inherited here.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|



This pull request refactors the Linux build workflow by introducing a reusable workflow template and updates the release process to include Linux artifacts. The changes aim to simplify the workflow configuration and enhance the release automation.
Workflow Refactoring:
.github/workflows/linux-template.ymlto handle Linux builds, parameterized with inputs for version and Qt version. This template includes steps for version updates, Qt installation, CMake build, packaging, and artifact publishing..github/workflows/linux.ymlto use the new Linux build template, replacing the inline steps with a reference to the reusable workflow.Release Process Enhancements:
.github/workflows/release.ymlto include the Linux build workflow as part of the release process, ensuring Linux artifacts are generated alongside other platform builds..github/workflows/release.ymlto upload Linux DEB, RPM, and TGZ packages as release assets, improving the distribution of Linux builds.This pull request introduces a reusable GitHub Actions workflow for Linux builds, refactors existing workflows to use the new template, and enhances the release process by adding support for Linux packages. Below are the key changes grouped by theme:
Workflow Template Creation:
.github/workflows/linux-template.ymlto handle Linux builds. This includes steps for version updates, Qt installation, building with CMake, packaging with CPack, and publishing artifacts. The workflow supports configurableversionandqt_versioninputs.Refactoring Existing Workflows:
.github/workflows/linux.ymlto use the new reusable Linux build workflow instead of duplicating the build logic. Theversioninput is dynamically set usinggithub.run_number.Enhancements to Release Workflow:
.github/workflows/release.ymlto include a job for the Linux build using the new reusable workflow.DEB,RPM, andTGZ) to GitHub Releases as part of the release process.Summary by CodeRabbit