Add CI and tag-triggered release workflows, v0.1.0 notes

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
VallierDevandClaude Opus 5.5 committed 2026-10-14 23:53:16 +08:00
1 parent f6882d333d
commit d93e42340d
5 files changed
+115 -1

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config \
libx11-dev libxext-dev libxtst-dev libxfixes-dev libgtk-3-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --locked
+36
View File
@@ -0,0 +1,36 @@
name: Release
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
release:
# Built on 22.04 so the binary also runs on Ubuntu 22.04/24.04 and newer Debian (glibc >= 2.35).
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential pkg-config \
libx11-dev libxext-dev libxtst-dev libxfixes-dev libgtk-3-dev
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --release --locked
- run: cargo build --release --locked
- name: Package
run: |
name=uu-remote-linux-${GITHUB_REF_NAME}-x86_64-linux
mkdir -p "$name"
cp target/release/uuremote-server LICENSE README.md README.en.md config.example.json "$name/"
tar czf "$name.tar.gz" "$name"
sha256sum "$name.tar.gz" > "$name.tar.gz.sha256"
- uses: softprops/action-gh-release@v2
with:
body_path: docs/release-notes/${{ github.ref_name }}.md
files: |
uu-remote-linux-*.tar.gz
uu-remote-linux-*.tar.gz.sha256
+1 -1
View File
@@ -6,7 +6,7 @@ authors = ["uu-remote-linux contributors"]
description = "Unofficial Linux host for NetEase UU Remote: control a Linux desktop from the official clients"
readme = "README.md"
license = "GPL-3.0-or-later"
repository = "https://github.com/xtftbwvfp/uu-remote-linux"
repository = "https://github.com/VallierDev/uu-remote-linux"
# The executable keeps its established name (deploy scripts, systemd units, docs).
[[bin]]
+16
View File
@@ -0,0 +1,16 @@
首个公开版本。用官方 UU 远程客户端(Mac / Windows / 手机)远程控制 Linux 桌面。
First public release: control a Linux desktop from the official UU Remote clients.
**非官方项目,与网易无关。** / **Unofficial, not affiliated with NetEase.**
### 支持 / Supported
- X11 桌面(GNOME on Ubuntu 24.04 实机长期使用;KDE、Xfce、Cinnamon/MATE 虚拟机测试)
- 远程桌面(NVENC / libx264)、键鼠、指针样式、剪贴板、文件传输、终端、声音
- 画质 / 帧率 / 分辨率切换,锁屏状态与自动解锁,远程结束后自动锁屏,被控端静音运行,系统操作
- Wayland(Hyprland、GNOME/KDE portal)为实验性功能,需要从源码以 `--features wayland` / `--features wayland,portal` 编译
### 下载 / Download
`uu-remote-linux-v0.1.0-x86_64-linux.tar.gz`:X11 版可执行文件(x86_64,glibc ≥ 2.35,例如 Ubuntu 22.04+)。
运行时需要 `ffmpeg`、GTK 3(登录窗口)和 X11 相关库。安装和登录步骤见 README。
尚未实现的功能见 README「尚未实现 / 不支持」。欢迎提交 issue。
+42
View File
@@ -76,6 +76,48 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
if report.get(key).and_then(serde_json::Value::as_bool)!=Some(true) { return Err(format!("Portal native GTK acceptance failed: {key}").into()); }
}
println!("Portal native GTK input acceptance passed: motion/click/keyboard/text");
if std::env::args().nth(2).as_deref() == Some("--lock-recovery") {
let session = screen.portal.as_ref().unwrap();
let before = report["key_presses"].as_u64().ok_or("Missing GTK key count")?;
let run_lock = |action: &str| -> Result<(), String> {
if std::process::Command::new("timeout").args(["5s", "loginctl", "--no-ask-password", action]).arg(
String::from_utf8(std::process::Command::new("loginctl").args(["show-user", &unsafe { libc::getuid() }.to_string(), "-p", "Display", "--value"]).output().map_err(|_| "Display session unavailable")?.stdout).map_err(|_| "Invalid display session")?.trim()
).status().map_err(|_| "loginctl unavailable")?.success() {
Ok(())
} else { Err("Test VM lock command failed".into()) }
};
let locked = session_lock::watch_locked();
run_lock("lock-session")?;
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(15);
while *locked.borrow() != Some(true) && std::time::Instant::now() < deadline {
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
}
if *locked.borrow() != Some(true) { return Err("Test VM did not lock".into()); }
tokio::time::sleep(std::time::Duration::from_secs(2)).await;
let closed = !session.is_alive();
run_lock("unlock-session")?;
let mut frame = vec![0; screen.width as usize * screen.height as usize * 4];
let deadline = std::time::Instant::now() + std::time::Duration::from_secs(30);
loop {
session.capture(&mut frame)?;
if *locked.borrow() == Some(false) && session.is_alive() { break; }
if std::time::Instant::now() >= deadline { return Err("Test VM portal did not recover".into()); }
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
}
// Keep the original InputInjector and Arc: no rebind after recovery.
tokio::time::sleep(std::time::Duration::from_secs(3)).await;
input.mouse_absolute_normalized(0.5,0.5,(screen.width,screen.height));
input.mouse_button(1,true); input.mouse_button(1,false);
for key in b"UUWAYLAND" { input.windows_key_event(i32::from(*key),true); input.windows_key_event(i32::from(*key),false); }
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
input.release_held();
let after:serde_json::Value=serde_json::from_slice(&std::fs::read("/tmp/uuremote-input-acceptance.json")?)?;
if after["key_presses"].as_u64() != Some(before + 9) || after["key_releases"].as_u64() != Some(before + 9) {
return Err("Original portal input binding failed after lock recovery".into());
}
println!("Portal same-Arc lock recovery input passed: session_closed={} balanced_new_keys=9", closed);
return Ok(());
}
let path=std::env::args().nth(2);
return video::probe((screen.width,screen.height),screen.display.clone(),screen.portal.clone(),path).await.map_err(|e|e.into());
}