Skip to content

build: use pixi in package ci#326

Merged
16bit-ykiko merged 11 commits intomainfrom
ci-release-pixi
Dec 21, 2025
Merged

build: use pixi in package ci#326
16bit-ykiko merged 11 commits intomainfrom
ci-release-pixi

Conversation

@star-hengxing
Copy link
Copy Markdown
Contributor

@star-hengxing star-hengxing commented Dec 21, 2025

Summary by CodeRabbit

  • Chores
    • Bumped xmake to 3.0.5.
    • Switched CI to a unified Pixi-based packaging flow, added Pixi setup, caching and lock enforcement.
    • Replaced prior packaging steps with the Pixi packaging command and kept checkout/release upload.
    • Removed redundant pre-setup steps and added a Windows-specific cleanup step.
    • Consolidated macOS/Linux build handling, enforced install-only package policy, and enabled LTO for release builds.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Dec 21, 2025

Warning

Rate limit exceeded

@star-hengxing has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 8 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 72855c7 and 4a04028.

📒 Files selected for processing (2)
  • .github/workflows/package.yml (1 hunks)
  • xmake.lua (3 hunks)

Walkthrough

Replaces OS-specific GitHub Actions xmake packaging with a Pixi-based packaging flow, adds a tasks.package entry to pixi.toml, bumps xmake to 3.0.5, and consolidates set_policy("package.install_only", true) and platform flags in xmake.lua for macOS/Linux and release/dev paths.

Changes

Cohort / File(s) Change Summary
GitHub Actions Workflow
.github/workflows/package.yml
Removed Linux pre-setup and macOS/linux conditional blocks; bumped xmake 3.0.4 → 3.0.5; added Setup Pixi (prefix-dev/setup-pixi@v0.9.3, pixi-version: v0.61.0) with env activation, caching and lock; replaced per-OS configure/pack steps with pixi run package; kept checkout and upload steps; added Windows cleanup step.
Pixi Configuration
pixi.toml
Added [tasks.package] with cmd = "xmake config --yes --enable_test=n --dev=n --release=y --mode=releasedbg --toolchain=clang && xmake pack --verbose".
Build Configuration
xmake.lua
Consolidated macOS/Linux handling into is_plat("macosx","linux") with shared cxflags, ldflags, shflags; applied flags via add_cxflags/add_ldflags/add_shflags; added set_policy("package.install_only", true) in dev and release paths; conditionally add -flto=thin in release; removed previous OS-specific install_only block.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant GH as GitHub Actions
    participant Pixi as Pixi (prefix-dev/setup-pixi)
    participant XMake as xmake
    participant Art as Release Artifacts

    GH->>Pixi: setup (v0.61.0), restore cache, activate env
    GH->>Pixi: run `pixi run package`
    Pixi->>XMake: execute `xmake config ... && xmake pack`
    XMake-->>Pixi: produce package artifacts
    Pixi-->>GH: return artifacts & exit code
    GH->>Art: upload artifacts to release
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

  • Inspect .github/workflows/package.yml Pixi step, cache keys, env activation, and Windows cleanup.
  • Verify pixi.toml package command, flags, and expected outputs.
  • Review xmake.lua unified platform flags, set_policy("package.install_only", true) placements, and release -flto=thin application.

Possibly related PRs

Poem

🐇 I hopped into the CI night,

Pixi sparked a gentle light,
xmake stitched each tidy crate,
Artifacts bundled — celebrate! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'build: use pixi in package ci' accurately and concisely summarizes the main change: migrating the package CI workflow to use Pixi instead of direct xmake commands.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b8da7e7 and 63b6319.

📒 Files selected for processing (3)
  • .github/workflows/package.yml (1 hunks)
  • pixi.toml (1 hunks)
  • xmake.lua (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: package (windows-2025, clice.zip, clice-x64-windows-msvc.zip, clice-symbol.zip, clice-x64-windows...
  • GitHub Check: package (ubuntu-24.04, clice.tar.gz, clice-x86_64-linux-gnu.tar.gz, clice-symbol.tar.gz, clice-x8...
  • GitHub Check: build (ubuntu-24.04, debug)
  • GitHub Check: build (macos-15, debug)
  • GitHub Check: build (windows-2025, releasedbg)
  • GitHub Check: build (ubuntu-24.04, releasedbg)
  • GitHub Check: build (macos-15, releasedbg)
🔇 Additional comments (4)
xmake.lua (1)

34-35: LGTM! Unified release policy simplifies cross-platform packaging.

The consolidation of the package.install_only policy for all release builds (removing the previous Linux-specific block) aligns well with the Pixi-based packaging workflow, ensuring consistent behavior across platforms.

pixi.toml (1)

118-120: LGTM! Package task correctly configures release build.

The task appropriately disables test/dev options, enables release mode, and uses releasedbg for packaging with debug symbols. The verbose flag will aid in CI debugging.

.github/workflows/package.yml (2)

69-71: LGTM! Unified packaging command improves maintainability.

Replacing OS-specific xmake commands with a single pixi run package invocation significantly simplifies the workflow and centralizes packaging logic in pixi.toml.


52-52: xmake version 3.0.5 is available and stable.

xmake v3.0.5 was released on November 25, 2025, with binaries available for Linux x86_64, macOS arm64/x86_64, and Windows 32/64-bit. The release includes multi-row progress output with theme support, a comprehensive XML module for parsing and encoding XML data, asynchronous OS APIs for improved I/O performance, and Swift interop support. No known issues are reported.

Comment thread .github/workflows/package.yml
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
.github/workflows/package.yml (1)

60-66: Missing environments: package specification will break tar.gz creation.

The Setup Pixi step doesn't specify which environment to activate. When activate-environment: true is set without an environments: key, Pixi activates the default environment (defined as default = [] in line 49 of pixi.toml), which lacks the xz dependency.

The package environment (line 51 in pixi.toml) includes the xz dependency (line 46) required for tar.gz compression on Linux and macOS. Without this dependency, the packaging step will fail for non-Windows platforms.

🔎 Proposed fix
       - name: Setup Pixi
         uses: prefix-dev/setup-pixi@v0.9.3
         with:
           pixi-version: v0.61.0
+          environments: package
           activate-environment: true
           cache: true
           locked: true
🧹 Nitpick comments (1)
pixi.toml (1)

119-120: LGTM! Consider adding documentation.

The package task correctly configures xmake for release packaging and chains the configuration with the pack command. The flags appropriately disable tests and dev mode while enabling release mode.

💡 Optional: Add inline comment for clarity
+# Package task for creating release artifacts across all platforms
 [tasks.package]
 cmd = "xmake config --yes --enable_test=n --dev=n --release=y --mode=releasedbg && xmake pack --verbose"
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 63b6319 and 3f7fae2.

📒 Files selected for processing (2)
  • .github/workflows/package.yml (1 hunks)
  • pixi.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: build (windows-2025, releasedbg)
  • GitHub Check: build (ubuntu-24.04, releasedbg)
  • GitHub Check: build (ubuntu-24.04, debug)
  • GitHub Check: build (macos-15, releasedbg)
  • GitHub Check: build (macos-15, debug)
  • GitHub Check: package (windows-2025, clice.zip, clice-x64-windows-msvc.zip, clice-symbol.zip, clice-x64-windows...
  • GitHub Check: package (ubuntu-24.04, clice.tar.gz, clice-x86_64-linux-gnu.tar.gz, clice-symbol.tar.gz, clice-x8...
🔇 Additional comments (2)
.github/workflows/package.yml (2)

68-70: Simplified packaging approach looks good once environment is fixed.

The unified pixi run package command successfully replaces the OS-specific packaging logic, making the workflow cleaner and more maintainable. However, this depends on the Setup Pixi step being configured with the correct environment (see previous comment).


52-52: xmake 3.0.5 is stable and compatible; version bump is safe.

xmake 3.0.5 is a released version with new features for Solaris and BSD platform support, and binaries are available for Linux, macOS, and Windows. No breaking changes were identified in the release notes. The version bump from 3.0.4 to 3.0.5 is a standard patch update without compatibility concerns.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
xmake.lua (1)

256-259: Good workaround for Pixi clang LTO behavior.

The explicit LTO flag addition for macOS release builds addresses a Pixi-specific limitation. The logic is correct.

Minor: Consider fixing the grammar in the comment for clarity:

🔎 Optional comment improvement
-				-- pixi clang failed to add lto flags because it need `-fuse-ld=lld`
+				-- pixi clang fails to add LTO flags because it needs `-fuse-ld=lld`
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1fe96a4 and 24abcbb.

📒 Files selected for processing (1)
  • xmake.lua (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
  • GitHub Check: build (macos-15, releasedbg)
  • GitHub Check: build (ubuntu-24.04, debug)
  • GitHub Check: build (ubuntu-24.04, releasedbg)
  • GitHub Check: build (windows-2025, releasedbg)
  • GitHub Check: build (macos-15, debug)
  • GitHub Check: package (macos-15, clice.tar.gz, clice-arm64-macos-darwin.tar.gz, clice-symbol.tar.gz, clice-arm6...
  • GitHub Check: package (windows-2025, clice.zip, clice-x64-windows-msvc.zip, clice-symbol.zip, clice-x64-windows...
  • GitHub Check: package (ubuntu-24.04, clice.tar.gz, clice-x86_64-linux-gnu.tar.gz, clice-symbol.tar.gz, clice-x8...
🔇 Additional comments (3)
xmake.lua (3)

15-15: LGTM! Consistent package policy across build modes.

Adding install_only policy to both dev and release paths ensures packages are managed consistently without system dependencies, which aligns well with the Pixi-based packaging workflow.

Also applies to: 35-35


260-260: LGTM! Comment clarification.

Updated terminology from "daily CI" to "dev ci" improves clarity and consistency with the codebase.


46-57: Fix syntax error and verify nil parameter handling on Linux.

Line 53 has a trailing comma on the shflags assignment that will cause a Lua syntax error:

local shflags = "-fuse-ld=lld",  -- Remove trailing comma

Additionally, cxflags remains nil on Linux (only assigned on macOS at line 50) but is still passed to add_cxflags() at line 56. While xmake documentation doesn't explicitly specify how add_cxflags() handles nil parameters, passing nil to this function should be tested or handled defensively (either conditionally call the function or initialize cxflags to an empty string on Linux).

Comment thread xmake.lua Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
.github/workflows/package.yml (1)

68-72: Windows-specific workaround runs unconditionally on all platforms.

The xmake lua os.rmdir command targets a Windows-specific path (C:/Program Files/...) but runs on all matrix OSes including Linux and macOS. While this likely fails silently on non-Windows systems, it adds unnecessary noise to logs.

🔎 Proposed fix to conditionally run the workaround
       - name: Configure and Package
         run: |
-          # @see https://github.com/xmake-io/xmake/issues/7158
-          xmake lua os.rmdir "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm"
+          # @see https://github.com/xmake-io/xmake/issues/7158
+          if [ "$RUNNER_OS" = "Windows" ]; then
+            xmake lua os.rmdir "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm"
+          fi
           pixi run package
+        shell: bash

Alternatively, move this to a separate Windows-only step:

      - name: Workaround xmake issue 7158
        if: runner.os == 'Windows'
        run: xmake lua os.rmdir "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/Llvm"
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 24abcbb and f056db2.

📒 Files selected for processing (2)
  • .github/workflows/package.yml (1 hunks)
  • xmake.lua (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: package (windows-2025, clice.zip, clice-x64-windows-msvc.zip, clice-symbol.zip, clice-x64-windows...
  • GitHub Check: build (macos-15, debug)
  • GitHub Check: build (macos-15, releasedbg)
  • GitHub Check: build (windows-2025, releasedbg)
  • GitHub Check: build (ubuntu-24.04, releasedbg)
  • GitHub Check: build (ubuntu-24.04, debug)
🔇 Additional comments (6)
.github/workflows/package.yml (2)

60-66: Pixi setup looks correct without explicit environment selection.

The setup uses activate-environment: true without specifying a particular environment, which should activate the default environment. Since pixi run package will invoke the task defined in pixi.toml, Pixi will handle the appropriate environment context.


52-52: xmake 3.0.5 is a valid, stable release.

Released on 25 Nov, this minor version bump from 3.0.4 includes significant improvements. xmake v3.0.5 is a major update focused on developer experience with multi-row progress bars, Swift interoperability, and an XML module. The version is properly available across all major platforms and included in distribution repositories.

xmake.lua (4)

15-15: Good: Consistent package.install_only policy in both dev and release paths.

Adding set_policy("package.install_only", true) in both the dev (line 15) and release (line 35) paths ensures consistent behavior by preventing system package fetching regardless of the build configuration.

Also applies to: 35-35


262-265: LTO flag addition with clear rationale.

The explicit addition of -flto=thin with force = true addresses the pixi clang limitation noted in the comment. This ensures LTO works correctly even when the linker flag configuration doesn't automatically propagate.


256-256: Comment clarification noted.

Minor documentation improvement changing "daily ci" to "dev ci" for clarity.


46-66: On Linux platforms, cxflags remains uninitialized (nil).

On Linux, cxflags is only set for macOS (line 50), so calling add_cxflags(cxflags) on line 55 passes a nil value. Similarly, cxflags = nil is passed in the requireconfs config table (line 61).

In Lua, passing a nil argument is equivalent to omitting this argument, and nil in a table represents an absent key. This means xmake will treat the nil value as if the parameter was not provided, which is the intended behavior. The code works correctly as written—no changes needed.

@16bit-ykiko 16bit-ykiko merged commit bc523b0 into main Dec 21, 2025
7 checks passed
@16bit-ykiko 16bit-ykiko deleted the ci-release-pixi branch December 21, 2025 08:47
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.

2 participants