Files
shell-rs/.github/workflows/windows.yml
T
XuzandClaude Opus 5.5 cd3d41c496 接入 Aptabase 匿名使用统计,「设置 › 关于」新增开关
- 自己调 Aptabase 的批量接口 POST /api/v0/events(没有纯 Rust SDK)。只发版本、系统名和版本、CPU 架构、设置快照(取值固定,主机等数量只报档位)和功能使用次数;不发主机、凭据、命令、文件名、路径,也没有任何标识
- 四种事件:app_installed(首次启动,送达后记进 analytics.json)、app_started、app_active(窗口到前台且当天 UTC 还没报过)、usage(43 项功能计数,从第一次使用起满 4 小时汇总一条)
- 不用定时器:只在启动、窗口激活、用到功能、改设置时动作,满期的汇总和失败重试都等下一个信号;计数存盘,退出不等网络、不丢数据
- 内网断网不受影响:联网、系统检测、写文件都在后台线程,连接 5 秒、整体 15 秒超时,失败不提示,重试从 1 分钟起翻倍、最长 6 小时,4xx 不重试
- 「设置 › 关于」新增「隐私」组的「发送匿名使用统计」,默认开,关掉清空本机攒下的计数
- 只有发布构建发;开发构建设 SHELLRS_ANALYTICS_DEBUG=1 才发调试事件,汇总周期 1 分钟、失败 10 秒后重试
- 手册新增「隐私」一节列出全部上报内容,README 同步

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 20:04:38 +08:00

61 lines
2.0 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# The Windows build, which the Macs this is developed on cannot compile:
# the whole crate through clippy, the external CLI's tests, including the
# named pipe between two processes, the updater's, and the local SFTP pane's
# paths (std canonicalizes to `\\?\C:\…` there).
#
# A push runs it only when it touches code that differs on Windows (the
# files with `cfg(windows)` and friends), the build script or the
# dependencies. Windows code added to another file goes in this list too;
# until then, run it by hand (Actions › windows › Run workflow). Tags never
# run it: the release workflow builds Windows itself.
name: windows
on:
push:
branches: ["**"]
paths:
- "src/cli/**"
- "src/analytics/**"
- "src/update/**"
- "src/app/paths.rs"
- "src/app/window_hiding.rs"
- "src/main.rs"
- "src/bin/**"
- "src/ssh/connection.rs"
- "src/sftp/download.rs"
- "src/sftp/model.rs"
- "src/sftp/upload.rs"
- "src/sftp/sync.rs"
- "src/credential/credential_dialog.rs"
- "src/settings/settings_panel.rs"
- "src/app/shortcuts.rs"
- "src/workspace/window_state.rs"
- "src/testing.rs"
- "tests/cli_bin.rs"
- "build.rs"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
workflow_dispatch:
jobs:
cli:
runs-on: windows-latest
timeout-minutes: 90
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
# rust-toolchain.toml picks the toolchain; this installs it with the
# components it lists before the cache key is computed.
- run: rustup toolchain install
- uses: Swatinem/rust-cache@v2
# In case aws-lc-sys wants to assemble rather than use its prebuilt
# objects.
- uses: ilammy/setup-nasm@v1
- run: cargo clippy --all-targets -- -D warnings
- run: "cargo test --lib cli::"
- run: "cargo test --lib update::"
- run: "cargo test --lib sftp::tests::local_listing"
- run: cargo test --test cli_bin