Skip to content

Add GitHub Actions workflow for X11-only builds#1

Merged
xixi230 merged 5 commits intomasterfrom
copilot/add-github-actions-workflow
Jan 21, 2026
Merged

Add GitHub Actions workflow for X11-only builds#1
xixi230 merged 5 commits intomasterfrom
copilot/add-github-actions-workflow

Conversation

Copy link

Copilot AI commented Jan 21, 2026

Description

Adds .github/workflows/build-x11.yml for manually triggered X11-only release builds. Produces downloadable eww-x11-linux artifact without Wayland dependencies.

Key changes:

  • workflow_dispatch trigger for on-demand builds
  • X11-specific dependency set (excludes libgtk-layer-shell-dev)
  • --no-default-features --features x11 --locked for reproducible X11-only binaries
  • Explicit permissions: contents: read for security

Usage

Trigger from Actions tab → "Build eww for X11" → Run workflow. Artifact available after ~10-15min build.

# Example: Extend for other platforms
- name: Build eww (Wayland)
  run: cargo build --release --no-default-features --features wayland --locked

Showcase

N/A - Infrastructure change

Additional Notes

Complements existing build.yml CI checks. Does not replace default feature builds.

Checklist

  • All widgets I've added are correctly documented.
  • I added my changes to CHANGELOG.md, if appropriate.
  • The documentation in the docs/content/main directory has been adjusted to reflect my changes.
  • I used cargo fmt to automatically format all code before committing
Original prompt

步骤:
Fork eww 仓库:https://github.com/elkowar/eww

创建 GitHub Actions workflow,在你 fork 的仓库里创建文件:
.github/workflows/build.yml
name: Build eww for X11

on:
workflow_dispatch: # 手动触发

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install dependencies
  run: |
    sudo apt-get update
    sudo apt-get install -y libgtk-3-dev libpango1.0-dev libgdk-pixbuf-2.0-dev libcairo2-dev libglib2.0-dev

- name: Install Rust
  uses: dtolnay/rust-action@stable

- name: Build eww (X11)
  run: cargo build --release --no-default-features --features x11

- name: Upload artifact
  uses: actions/upload-artifact@v4
  with:
    name: eww-x11-linux
    path: target/release/eww

运行 Action:

去你 fork 的仓库 → Actions 标签
选择 "Build eww for X11"
点击 "Run workflow"
下载编译好的文件:

编译完成后(约 10-15 分钟)
在 Actions 运行结果里下载 eww-x11-linux artifact
安装到你的机器:

或者更简单:直接在你 fork 的仓库网页上创建这个文件,GitHub 会自动识别并显示 Action。

去试试吧!编译好了告诉我,我帮你配置漂亮的 Gruvbox 风格控制中心和 Dock! 🚀


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 4 commits January 21, 2026 08:19
Co-authored-by: xixi230 <200480298+xixi230@users.noreply.github.com>
Co-authored-by: xixi230 <200480298+xixi230@users.noreply.github.com>
Co-authored-by: xixi230 <200480298+xixi230@users.noreply.github.com>
Co-authored-by: xixi230 <200480298+xixi230@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub Actions workflow for building eww for X11 Add GitHub Actions workflow for X11-only builds Jan 21, 2026
Copilot AI requested a review from xixi230 January 21, 2026 08:25
Copy link
Owner

@xixi230 xixi230 left a comment

Choose a reason for hiding this comment

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

123

@xixi230 xixi230 marked this pull request as ready for review January 21, 2026 08:28
Copilot AI review requested due to automatic review settings January 21, 2026 08:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new GitHub Actions workflow for manually triggered X11-only builds of eww. The workflow produces downloadable artifacts without Wayland dependencies, allowing users to build X11-specific binaries on demand.

Changes:

  • Added .github/workflows/build-x11.yml with manual trigger support
  • Configured X11-specific dependencies (excluding libgtk-layer-shell-dev)
  • Set up artifact upload for distributing compiled eww binaries

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


- name: Install Rust
uses: dtolnay/rust-toolchain@stable

Copy link

Copilot AI Jan 21, 2026

Choose a reason for hiding this comment

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

Consider adding Rust compilation caching to significantly reduce build times for subsequent runs. The main build.yml workflow uses Swatinem/rust-cache@v2 after the Rust setup step, which caches compiled dependencies. Without caching, every workflow run will recompile all dependencies from scratch, potentially taking 10-15 minutes each time. Adding the cache step would reduce subsequent builds to just a few minutes.

Suggested change
- name: Cache Rust build
uses: Swatinem/rust-cache@v2

Copilot uses AI. Check for mistakes.
@xixi230 xixi230 merged commit 7c6cbc8 into master Jan 21, 2026
7 checks passed
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.

3 participants