Skip to content

Conversation

@AXiX-official
Copy link

@AXiX-official AXiX-official commented Oct 24, 2025

Resolves #281

Summary by CodeRabbit

  • Documentation

    • Updated Getting started instructions to include an alternative nightly build link for the clice binary, available alongside the standard release page link.
  • Chores

    • Introduced automated daily nightly build workflow that compiles the application across Windows, Linux, and macOS environments, with automatic packaging and artifact uploads when new commits are detected.

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

@coderabbitai
Copy link

coderabbitai bot commented Oct 24, 2025

Walkthrough

A nightly build system is introduced with a GitHub Actions workflow that compiles the project daily across Windows, Linux, and macOS, uploads build artifacts, and includes a README update directing users to the nightly builds resource.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added reference to nightly build downloads in the Getting Started section alongside the existing releases page link
CI/CD Workflow
.github/workflows/nightly.yml
New GitHub Actions workflow that runs on daily schedule, builds across Windows/Linux/macOS matrix, detects new commits against the last successful nightly run, and uploads build and symbol artifacts conditionally

Sequence Diagram(s)

sequenceDiagram
    participant Schedule as Daily Schedule
    participant Workflow as Nightly Workflow
    participant Env as Environment Setup
    participant Check as Commit Check
    participant Build as Build & Package
    participant Upload as Upload Artifacts

    Schedule->>Workflow: Trigger (11:00 UTC)
    Workflow->>Env: Prepare OS environment<br/>(dependencies, disk space)
    Env-->>Workflow: Ready
    Workflow->>Check: Compare SHA against<br/>last successful run
    alt New commits detected
        Check-->>Build: Proceed with build
        Build->>Build: Configure with xmake
        Build->>Build: Package binaries
        Build->>Upload: Two artifacts<br/>(main + symbols)
        Upload-->>Workflow: Complete
    else No new commits
        Check-->>Workflow: Skip build
    end
    Workflow-->>Schedule: Workflow complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • The nightly workflow introduces conditional logic for commit detection that requires careful verification of the comparison logic against the GitHub Actions context
  • The matrix build strategy across three operating systems with OS-specific environment setup needs validation for correctness and consistency
  • Artifact naming and upload logic should be verified to ensure proper versioning with date and short SHA components
  • README change is straightforward and requires minimal review

Poem

🐰 Nightly builds now hop and bound,
Compiled each day without a sound,
Windows, Linux, Mac take flight,
Fresh binaries every night!
Artifacts stashed with care so tight.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title '[CI] Upload CI Artifacts to get Nightly Builds' directly and clearly describes the main change: introducing a nightly build workflow that uploads CI artifacts.
Linked Issues check ✅ Passed The PR implements the requested nightly build solution by adding a GitHub Actions workflow that uploads CI artifacts daily, checking for new commits, and packaging builds across platforms.
Out of Scope Changes check ✅ Passed The README.md update adding a nightly build link is directly related to the nightly build feature being introduced. All changes are within the stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

@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)
README.md (1)

21-21: Minor: Clean up whitespace in nightly build link text.

The text has an extra space before the opening parenthesis. Consider: ... releases page) or [nightly build](...)

-Download the latest `clice` binary from the [releases page](https://github.com/clice-io/clice/releases) ( or  [nightly build](https://nightly.link/clice-io/clice/workflows/xmake/main) ) and install the [vscode extension](https://marketplace.visualstudio.com/items?itemName=ykiko.clice-vscode).
+Download the latest `clice` binary from the [releases page](https://github.com/clice-io/clice/releases) or [nightly build](https://nightly.link/clice-io/clice/workflows/xmake/main), then install the [vscode extension](https://marketplace.visualstudio.com/items?itemName=ykiko.clice-vscode).
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a10908d and 470944d.

📒 Files selected for processing (2)
  • .github/workflows/xmake.yml (3 hunks)
  • README.md (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). (5)
  • GitHub Check: linux (ubuntu-24.04, debug)
  • GitHub Check: linux (ubuntu-24.04, release)
  • GitHub Check: windows (windows-2025)
  • GitHub Check: macos (macos-15, debug)
  • GitHub Check: macos (macos-15, release)
🔇 Additional comments (4)
.github/workflows/xmake.yml (4)

59-64: Artifact upload strategy looks good for Windows.

Uploads on all non-PR runs to enable nightly builds. Since Windows has no debug build variant, this effectively uploads release builds only, consistent with Linux and macOS.


118-123: Release-only uploads are appropriate for Linux.

Filters to release builds only, avoiding debug artifacts in nightly builds. Artifact naming with commit SHA ensures traceability and uniqueness.


169-173: Release-only uploads are appropriate for macOS.

Consistent with Linux job: uploads only release builds on non-PR runs. The nightly.link service will aggregate these artifacts across all platforms.


59-173: Verify artifact directory structure and binary discoverability.

All three jobs upload ./build as-is, which will be zipped with its full directory structure. Consider documenting expected directory layout for users extracting artifacts from nightly builds, or verify that the clice binary is in an obvious location (e.g., ./build/clice or similar).

with:
name: clice-${{ matrix.os }}-${{ github.sha }}
path: ./build

Copy link
Member

Choose a reason for hiding this comment

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

I think we should modify release.yml rather than xmake.yml.

Copy link
Author

Choose a reason for hiding this comment

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

In my understanding, a nightly build refers to building the latest version after each pull request or at regular intervals. If release.yaml is used, builds and uploads only occur during version updates.

Copy link
Author

Choose a reason for hiding this comment

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

Moreover, if we use a nightly.yaml , it will reprocess builds that have already been done in either xmake.yaml or cmake.yaml.

@star-hengxing
Copy link
Collaborator

Does this PR just upload the binary to the artifacts, without needing to create a new tag?

Regarding the review question above, @16bit-ykiko wants the nightly build to be built with LTO.

@AXiX-official
Copy link
Author

Does this PR just upload the binary to the artifacts, without needing to create a new tag?

Regarding the review question above, @16bit-ykiko wants the nightly build to be built with LTO.

yeah, simply upload artifacts for each pull without tag. casue i think with a tag it should in release page not a nightly build.

built with LTO is reasonable, i'll fix it

@16bit-ykiko
Copy link
Member

We plan to update to LLVM 21.4 and change the release build type to 'Release with Debug Info' soon. This PR must be done after those changes.

@16bit-ykiko
Copy link
Member

By the way, I think this build should run nightly. It should check for new commits since the last build, and if any exist, proceed to build and upload the artifacts for a nightly build. These nightly artifacts should use the same configuration as an official release, just considered less formal.

@16bit-ykiko
Copy link
Member

16bit-ykiko commented Nov 2, 2025

llvm has been updated to 21.1.4 #292. But we fail to build releasedbg + lto version of llvm because of oom. See https://github.com/clice-io/llvm-binary/actions/runs/18961725591 for detail @star-hengxing.

@16bit-ykiko
Copy link
Member

The packaging workflow is ready, so I believe we can proceed with nightly builds.

Copy link

@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: 2

🧹 Nitpick comments (1)
README.md (1)

19-21: Clarify nightly build availability and freshness.

While the README now links to nightly builds, it doesn't document:

  • When nightly builds are available (e.g., "built daily at 11:00 UTC" per the workflow schedule)
  • That nightly builds reflect the latest main branch commits but may be less stable than releases
  • Which platforms/architectures are included (Windows, Linux, macOS)

Consider adding a brief note to manage user expectations, or keep it minimal if you prefer simplicity.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 470944d and d6299a1.

📒 Files selected for processing (2)
  • .github/workflows/nightly.yml (1 hunks)
  • README.md (1 hunks)
🔇 Additional comments (2)
.github/workflows/nightly.yml (2)

140-152: Verify artifact output paths.

The upload steps assume artifacts are located at build/xpack/clice/${{ matrix.artifact_name }} and build/xpack/clice/${{ matrix.symbol_artifact_name }}. Confirm that the xmake pack step (line 138) produces artifacts at these exact paths on all three OS platforms (Windows, Linux, macOS).


125-138: LTO is already enabled through the --release=y flag.

The nightly.yml workflow correctly includes --release=y in all xmake config commands (lines 130–136). In xmake.lua, this flag triggers the condition if has_config("release"), which sets set_policy("build.optimization.lto", true) (line 30). LTO is not missing; it is configured as intended. The --mode=releasedbg flag controls the optimization mode separately from the --release=y config flag that enables LTO.

Likely an incorrect or invalid review comment.

Comment on lines +14 to +34
- os: windows-2025
artifact_name: clice.zip
asset_name: clice-x64-windows-msvc
symbol_artifact_name: clice-symbol.zip
symbol_asset_name: clice-x64-windows-msvc-symbol
toolchain: clang-cl

- os: ubuntu-24.04
artifact_name: clice.tar.gz
asset_name: clice-x86_64-linux-gnu
symbol_artifact_name: clice-symbol.tar.gz
symbol_asset_name: clice-x86_64-linux-gnu-symbol
toolchain: clang-20

- os: macos-15
artifact_name: clice.tar.gz
asset_name: clice-arm64-macos-darwin
symbol_artifact_name: clice-symbol.tar.gz
symbol_asset_name: clice-arm64-macos-darwin-symbol
toolchain: clang

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify toolchain versions align with project LLVM updates.

The workflow uses clang-20 on Linux and clang (unversioned) on macOS, but PR context mentions LLVM has been updated to 21.1.4 (PR #292) and 21.4 was planned. Confirm whether clang-20 is intentional for stability or whether the workflow should reference the updated LLVM versions.


🌐 Web query:

What is the latest stable LLVM version and what is clang-20 vs clang-21 versioning?

💡 Result:

Latest stable LLVM: LLVM 21.1.6 (released Nov 18, 2025). [1][2]

What "clang-20" vs "clang-21" means

  • The clang major/minor labels track the LLVM release branch: "clang-20" = the Clang front-end from the LLVM 20.x release series; "clang-21" = Clang from the LLVM 21.x series. Each series has point releases (e.g., 21.1.6). Packages and distro repos commonly expose these as clang-20, clang-21, etc. [1][3][4]

If you need specific point-release numbers (e.g., clang 21.1.6 binaries) or distro package names for your OS, tell me your platform and I’ll fetch the exact package/version links.

Sources:
[1] llvm.org (project home / release announcement).
[2] LLVM Discourse announcement: "LLVM 21.1.6 Released" (Nov 18, 2025).
[3] Apt.llvm.org package listings (clang/llvm-20 and llvm-21 toolchains).
[4] Example release changelogs showing clang/clang-format tied to LLVM point releases.


🏁 Script executed:

#!/bin/bash
# Search for LLVM/clang version references in the codebase
rg -i "llvm|clang" --type-list | head -20
rg -ni "version.*llvm|llvm.*version|clang.*2[0-1]" -A2 -B2 --type-not=node_modules 2>/dev/null | head -40

Length of output: 389


🏁 Script executed:

#!/bin/bash
# Check CMakeLists.txt and related build config files for LLVM requirements
fd -e "CMakeLists.txt" -e "cmake" -e "\.cmake$" --type f | xargs grep -l -i "llvm\|clang" 2>/dev/null | head -10

Length of output: 42


🏁 Script executed:

#!/bin/bash
# Display the full nightly.yml workflow to understand broader context
cat ".github/workflows/nightly.yml" 2>/dev/null | head -50

Length of output: 1397


🏁 Script executed:

#!/bin/bash
# Check LLVM setup and version requirements
cat "cmake/llvm_setup.cmake" 2>/dev/null

Length of output: 8492


🏁 Script executed:

#!/bin/bash
# Check package.cmake for version info
cat "cmake/package.cmake" 2>/dev/null | head -50

Length of output: 1420


🏁 Script executed:

#!/bin/bash
# Search directly for LLVM version constraints across key files
rg -n "LLVM.*VERSION|find_package.*LLVM" --type cmake -A3 -B1 2>/dev/null

Length of output: 5398


Update nightly.yml workflow to use clang-21 instead of clang-20 on Linux.

The project's CMake build configuration explicitly requires LLVM 21.1.4 (setup_llvm("21.1.4") in cmake/package.cmake), but the nightly workflow on ubuntu-24.04 specifies toolchain: clang-20, which corresponds to LLVM 20.x. This version mismatch will cause the Linux nightly build to fail or produce artifacts against the wrong LLVM libraries. Change line 32 in .github/workflows/nightly.yml from toolchain: clang-20 to toolchain: clang-21.

🤖 Prompt for AI Agents
.github/workflows/nightly.yml around lines 14 to 34: the ubuntu-24.04 job is
using toolchain: clang-20 which mismatches the project's required LLVM 21.1.4;
update that line to toolchain: clang-21 so the Linux nightly uses LLVM 21 and
matches cmake/package.cmake (setup_llvm("21.1.4")).

## Getting started

Download the latest `clice` binary from the [releases page](https://github.com/clice-io/clice/releases) and install the [vscode extension](https://marketplace.visualstudio.com/items?itemName=ykiko.clice-vscode). Then, add the following configuration to your `.vscode/settings.json` file:
Download the latest `clice` binary from the [releases page](https://github.com/clice-io/clice/releases) ( or [nightly build](https://nightly.link/clice-io/clice/workflows/nightly/main) ) and install the [vscode extension](https://marketplace.visualstudio.com/items?itemName=ykiko.clice-vscode). Then, add the following configuration to your `.vscode/settings.json` file:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify nightly.link URL points to the correct workflow.

The README links to https://nightly.link/clice-io/clice/workflows/nightly/main for nightly builds. Confirm that:

  1. The nightly.link service recognizes the workflow name "nightly" from .github/workflows/nightly.yml
  2. Users can download the uploaded artifacts through this link after the workflow runs

🌐 Web query:

How does nightly.link integrate with GitHub Actions workflows and how should the URL be formatted?

💡 Result:

nightly.link integrates by reading artifacts produced by GitHub Actions (those uploaded with actions/upload-artifact) and exposing stable, public download redirects to the latest artifact for a given repo/workflow/branch (or to a specific run/artifact). It can also be installed as a GitHub App so downloads use the app token (to avoid global API rate‑limit issues). [1][2]

URL format (common patterns)

Notes

  • Append ?status=completed to include completed (not only successful) runs. [1]
  • For repos you control, install the nightly.link GitHub App to avoid shared API rate limits. [1][2]

Sources: [1] nightly.link homepage/docs; [2] nightly.link GitHub repo.



---

🏁 Script executed:

```shell
#!/bin/bash
# Find nightly workflow file and extract artifact upload configuration
fd -t f "nightly.yml" .github/workflows/

Length of output: 29



---

🏁 Script executed:

```shell
#!/bin/bash
# Extract artifact upload configuration from nightly workflow
cat .github/workflows/nightly.yml

Length of output: 5532


Correct the nightly.link URL in README line 21—it's incomplete and non-functional.

The current URL https://nightly.link/clice-io/clice/workflows/nightly/main is missing both the artifact name and .zip extension. According to nightly.link documentation, the correct format is https://nightly.link/{owner}/{repo}/workflows/{workflow-file-or-name}/{branch}/{artifact}.zip.

Since the workflow generates dynamic artifact names with date and commit SHA (e.g., clice-x64-windows-msvc-20250119-abc1234), a static URL cannot reliably point to the latest build. Either:

  • Direct users to https://nightly.link/clice-io/clice/workflows/nightly/main to browse available artifacts, or
  • Specify particular artifact(s) with a complete URL pattern
🤖 Prompt for AI Agents
In README.md around line 21 the nightly.link URL is incomplete; replace the
current link with either the nightly.link browse URL
(https://nightly.link/clice-io/clice/workflows/nightly/main) so users can view
available artifacts, or provide a full artifact ZIP URL pattern including the
artifact name and .zip (e.g.,
https://nightly.link/{owner}/{repo}/workflows/{workflow}/{branch}/{artifact}.zip)
and update the text to explain that artifact names are dynamic so users may need
to select the latest build.

@AXiX-official
Copy link
Author

The packaging workflow is ready, so I believe we can proceed with nightly builds.

done

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.

[CI] Upload CI Artifacts to get Nightly Builds

3 participants