Skip to content

Comments

feat: add aw-tauri CI builds alongside aw-qt#1209

Merged
ErikBjare merged 7 commits intoActivityWatch:masterfrom
TimeToBuildBob:feat/aw-tauri-ci
Feb 22, 2026
Merged

feat: add aw-tauri CI builds alongside aw-qt#1209
ErikBjare merged 7 commits intoActivityWatch:masterfrom
TimeToBuildBob:feat/aw-tauri-ci

Conversation

@TimeToBuildBob
Copy link
Contributor

@TimeToBuildBob TimeToBuildBob commented Feb 20, 2026

Summary

This PR adds aw-tauri support to the ActivityWatch build pipeline, running alongside the existing aw-qt builds (not replacing them). Both build pipelines coexist independently.

Supersedes #1163 — takes over the work by @0xbrayo, applying it cleanly on current master and addressing all outstanding review comments.

Changes

New: build-tauri.yml CI workflow

  • Separate workflow file so aw-qt builds are untouched
  • Multi-OS: ubuntu-24.04, ubuntu-24.04-arm, windows-latest, macOS-13, macos-latest
  • Retry wrapper (nick-fields/retry) for build resilience
  • Tauri-specific APT deps (libgtk-3-dev, libwebkit2gtk-4.1-dev, etc.)
  • Separate artifact names (builds-tauri-*) to avoid collisions

Updated: build.yml (aw-qt CI)

  • Ubuntu 22.04 → 24.04, add macos-latest alongside macOS-13
  • Node 20 → 22
  • Fix macOS Python setup (use matrix.os not runner.os for multi-runner)
  • Fix cache keys for unique per-variant caching
  • Enable cargo cache on macOS
  • Fix qt5-defaultqt5-qmake + qtbase5-dev (ubuntu-24.04)
  • Fix artifact upload name collision

Updated: Makefile

  • TAURI_BUILD=true flag switches submodule set (aw-tauri instead of aw-qt)
  • Conditional ICON path (aw-tauri icons vs aw-qt icons)
  • aw-server-rust builds only aw-sync in Tauri mode
  • Conditional packaging logic

New packaging scripts

  • build_app_tauri.sh: macOS .app bundle for Tauri
  • aw-tauri.iss: Windows Inno Setup — different AppId and install dir to avoid collision with aw-qt (addresses Erik's review comment on Replace aw-qt with aw-tauri #1163)
  • move-to-aw-modules.sh: Linux module discovery helper (uses rsync -a, proper line continuation)
  • README.txt: End-user instructions for Linux

New submodules

  • aw-tauri (ActivityWatch/aw-tauri)
  • awatcher (2e3s/awatcher — used on Linux for Wayland support)

Review comments addressed from #1163

Issue Resolution
Windows installer collision (Erik's inline) Different AppId, AppName="ActivityWatch (Tauri)", DefaultDirName=ActivityWatch-Tauri
Makefile ICON identical in both branches (Ellipsis) ICON now points to aw-tauri/src-tauri/icons/icon.png for Tauri builds
rsync missing backslash (Ellipsis) Rewritten with proper line continuations
rsync -r vs -a (Ellipsis) Changed to rsync -a consistently
README.txt typos (Ellipsis) Fixed missing spaces, grammar, capitalization
"Wether" typo (Ellipsis) Fixed to "Whether"

Test plan

  • Verify aw-qt CI (build.yml) still passes with the modernized runners
  • Verify aw-tauri CI (build-tauri.yml) builds on all platforms
  • Verify Windows installer uses separate install directory from aw-qt
  • Test macOS .app bundle creation

Important

Adds Tauri-based CI builds and packaging scripts for ActivityWatch, alongside existing Qt builds, with updates to workflows, Makefile, and submodules.

  • CI Workflows:
    • Adds build-tauri.yml for Tauri builds on multiple OS (Ubuntu, Windows, macOS).
    • Updates build.yml to modernize runners and fix macOS Python setup.
  • Makefile:
    • Adds TAURI_BUILD flag to switch submodules and build logic.
    • Conditional logic for Tauri vs Qt builds, including icon paths and packaging.
  • Packaging:
    • New scripts build_app_tauri.sh, aw-tauri.iss, move-to-aw-modules.sh for Tauri packaging.
    • Updates package-all.sh to handle Tauri-specific packaging.
  • Submodules:
    • Adds aw-tauri and awatcher for Tauri and Wayland support.
  • Misc:

This description was created by Ellipsis for 8870044. You can customize this summary. It will automatically update as commits are pushed.

- Ubuntu 22.04 → 24.04, add macos-latest alongside macOS-13
- Node 20 → 22
- Fix macOS Python setup condition (matrix.os instead of runner.os)
- Use matrix.os in cache keys for unique per-variant caching
- Enable cargo cache on macOS (was disabled)
- Fix qt5-default → qt5-qmake + qtbase5-dev (ubuntu-24.04)
- Fix artifact upload name collision (matrix.os)
- Fix typo: 'Wether' → 'Whether'
aw-tauri is the Tauri-based replacement for aw-qt (system tray).
awatcher is used on Linux for Wayland-compatible window watching.
Add a separate build-tauri.yml CI workflow that builds aw-tauri alongside
the existing aw-qt builds. The two build pipelines coexist independently.

Makefile changes:
- TAURI_BUILD=true flag switches between aw-qt and aw-tauri submodules
- aw-server-rust builds only aw-sync in Tauri mode (not full server)
- ICON points to aw-tauri icons when TAURI_BUILD is set
- Conditional packaging: aw-tauri app bundle on macOS, Inno Setup on Windows

Packaging:
- build_app_tauri.sh: macOS .app bundle creator for Tauri
- aw-tauri.iss: Windows Inno Setup with different AppId/AppName to avoid
  colliding with existing aw-qt installations (addresses review comment)
- move-to-aw-modules.sh: Linux module discovery helper (rsync -a, proper
  line continuation)
- README.txt: Linux end-user instructions (typos fixed)
- package-all.sh: Tauri-aware zip/installer selection

Build-tauri.yml features:
- Multi-OS: ubuntu-24.04, ubuntu-24.04-arm, windows-latest, macOS-13,
  macos-latest
- Retry wrapper (nick-fields/retry) for flaky builds
- Separate artifact names (builds-tauri-*) to not collide with aw-qt
- Tauri-specific APT deps (libgtk-3-dev, libwebkit2gtk-4.1-dev, etc.)

Also updates contributor CSV files (brayo-pip → 0xbrayo).

Based on work by @0xbrayo in PR ActivityWatch#1163.
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 8870044 in 9 seconds. Click for details.
  • Reviewed 787 lines of code in 13 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.

Workflow ID: wflow_CXYXZixNJluOuIqa

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

@TimeToBuildBob
Copy link
Contributor Author

@greptileai review

GitHub Actions runner labels are case-sensitive. `macOS-13` (capital OS)
is not a valid runner label and causes CI failures. The correct label is
`macos-13` (all lowercase). Fix this in both build.yml and build-tauri.yml.
@TimeToBuildBob
Copy link
Contributor Author

Fixed the macOS-13 CI failure. The issue was a runner label casing bug — GitHub Actions labels are case-sensitive, and macOS-13 (capital OS) is not a valid runner. The correct label is macos-13 (all lowercase).

Changed in both .github/workflows/build.yml and .github/workflows/build-tauri.yml (6 occurrences total).

Note: CI is showing action_required — a maintainer needs to approve the workflow run for this cross-fork PR.

@ErikBjare
Copy link
Member

"macos-13, py-3.9, node-22
The configuration 'macos-13-us-default' is not supported"

macos-13 (x86_64) is deprecated by GitHub Actions. Replace with macos-14
(ARM64/Apple Silicon) in both build.yml and build-tauri.yml. Also remove
the macos-13-specific Python workaround (custom pkg install for macOS 10.9
compatibility) since macos-14 uses standard actions/setup-python.
@TimeToBuildBob
Copy link
Contributor Author

Fixed the macos-13-us-default error. GitHub has deprecated the macos-13 runner entirely (not just a casing issue from before). Replaced with macos-14 (ARM64/Apple Silicon) in both build.yml and build-tauri.yml, and removed the old macOS 10.9 Python workaround that was specific to the x86_64 runner.

Commit: f179ea6

@ErikBjare
Copy link
Member

ErikBjare commented Feb 22, 2026

@TimeToBuildBob thinking about merging this now, but what's up with the failing windows job and the absolutely massive windows buildtimes? (34min is a bit much...)

@0xbrayo
Copy link
Member

0xbrayo commented Feb 22, 2026

@ErikBjare windows arm build for tauri is still failing for me on my fork. Will let you know when I have a fix :)

@0xbrayo
Copy link
Member

0xbrayo commented Feb 22, 2026

Now noticing that @TimeToBuildBob hasn't set up tauri builds for windows arm here.

@TimeToBuildBob
Copy link
Contributor Author

Windows Job Failure

The failing build.yml Windows job (windows-latest, py-3.9, node-22) crashes during poetry install for aw-watcher-window:

ERROR: Could not install packages due to an OSError: [WinError 3]
d:\\a\\activitywatch\\...\\~luggy-1.3.0.dist-info

Root cause: Poetry 1.3.2 (Jan 2023) + pip on Windows has a known race condition during package replacement. Multiple subprojects share the same venv and trigger pluggy version churn (1.5.0 → 1.3.0 → 1.5.0), causing pip's temporary rename to fail under Windows file locking.

Fix: Upgrade Poetry from 1.3.2 to 1.8+ in build.yml.

34-Minute Windows Build Times

Breakdown of the build-tauri.yml Windows job:

Phase Duration
aw-server (npm ci + build) ~7.5 min
aw-tauri (npm ci + npm build + cargo build --release) ~15 min
Everything else ~12 min

Two bottlenecks:

  1. npm ci runs twice (~12 min combined) — the global npm cache doesn't cache node_modules/, so each run does a full clean install
  2. Cargo release build for aw-tauri (~8 min) — no cache for aw-tauri/src-tauri/target

Suggestions to cut to ~15 min:

  • Cache **/node_modules directly (keyed on package-lock.json hash) — saves ~10 min
  • Cache the Tauri Cargo release target (aw-tauri/src-tauri/target) separately
  • Consider sccache for Rust compilation
  • The Tauri workflow doesn't need to build Python watchers if they're not bundled

Happy to submit a PR for the caching improvements if you'd like.

@ErikBjare
Copy link
Member

@TimeToBuildBob Make those fixes in this PR

@0xbrayo I think Bob can probably figure it out, at least getting CI to pass. So you can focus on the integration/UI/ideas :)

@0xbrayo
Copy link
Member

0xbrayo commented Feb 22, 2026

@TimeToBuildBob I have sent an invite to be a collaborator on my fork, you need push access to send tags, for testing the CI. Current issue is misconfigured TLS on windows arm builds.

@TimeToBuildBob
Copy link
Contributor Author

Thanks @0xbrayo — collaborator invite accepted (aw-tauri fork). I can now push tags for Windows ARM CI testing.

For the activitywatch build.yml CI fixes that @ErikBjare asked about: I don't have push access to your activitywatch fork. Two options:

  1. If you can give me write access to the feat/aw-tauri-ci branch in your fork, I'll push the Poetry upgrade + caching fixes directly
  2. Or I'll open a separate PR to ActivityWatch/activitywatch with the build.yml improvements (Poetry 1.3.2 → 1.8+, node_modules cache, Cargo cache)

Which would you prefer?

Poetry 1.3.x has a known Windows file-locking race condition when
installing packages (tilde-prefixed dist-info temp files cause OSError).
Version 1.4.0+ fixes this. Using 1.4.2 (last release in 1.4.x series)
to stay on same lockfile format as 1.3.x.

Fixes: Windows CI failure in jobs that run 'poetry install'
@TimeToBuildBob
Copy link
Contributor Author

Fixed the Windows CI failure in commit 278a864.

Root cause: Poetry 1.3.2 has a file-locking race condition on Windows when installing packages — it creates temp dirs with tilde-prefixed names (~package.dist-info) and the OS-level rename can race. This causes the OSError: [WinError 3] seen in the aw-watcher-window build step.

Fix: Upgraded Poetry from 1.3.2 → 1.4.2. Version 1.4.0 fixed this race condition. Using 1.4.2 (last stable 1.4.x release) to stay on the same lockfile format as 1.3.x — no lockfile regeneration needed.

CI is running now (waiting for maintainer approval on first-time contributor workflow run).

- Cache node_modules directly instead of npm global cache. The global
  cache only saves download time, but npm ci still does a full install
  into node_modules every run (~5-7 min per npm ci call). Caching
  node_modules directly skips this entirely on cache hit.

- Cache aw-tauri/src-tauri/target alongside aw-server-rust/target in
  the Tauri workflow. The Tauri Cargo release build takes ~8 min
  uncached and was not being cached previously.

- Also cache aw-tauri/node_modules in the Tauri workflow (has its own
  package-lock.json separate from aw-webui).

Expected improvement: ~15-20 min savings on cached Windows Tauri builds
(from ~34 min to ~15 min).
@TimeToBuildBob
Copy link
Contributor Author

Pushed caching improvements to reduce build times (7fea151):

Changes to both build.yml and build-tauri.yml:

  1. Cache node_modules directly instead of npm global cache. The global cache only saves download time — npm ci still does a full clean install into node_modules/ every run (~5-7 min per call). Caching node_modules directly skips this entirely on cache hit.

  2. Cache aw-tauri/src-tauri/target in the Tauri workflow. The Tauri Cargo release build takes ~8 min uncached and was not being cached previously (only aw-server-rust/target was cached).

Combined with the Poetry 1.4.2 fix from the previous commit, the Windows CI should now:

  • Not crash during poetry install (Poetry race condition fixed)
  • Build significantly faster on cache hits (~15-20 min savings expected)

CI will need maintainer approval to run (first-time contributor workflow restriction).

@ErikBjare
Copy link
Member

Alright, merging!

@ErikBjare ErikBjare merged commit dc1371c into ActivityWatch:master Feb 22, 2026
17 checks passed
@0xbrayo
Copy link
Member

0xbrayo commented Feb 22, 2026

@TimeToBuildBob make a PR replacing aw-notify module with aw-notify-rs https://github.com/0xbrayo/aw-notify-rs, note the different build processes necessary for each module.

@TimeToBuildBob
Copy link
Contributor Author

On it @0xbrayo! I'll open a PR replacing the aw-notify Python submodule with aw-notify-rs.

aw-notify-rs already has compatible build/package/clean Makefile targets, so the activitywatch build system should integrate cleanly. Main changes:

  • Remove aw-notify submodule (ErikBjare/aw-notify Python)
  • Add aw-notify-rs submodule (0xbrayo/aw-notify-rs Rust)
  • Update .gitmodules + activitywatch Makefile
  • Update CI (swap Python/poetry build for Rust/cargo)

Will post the PR shortly.

@TimeToBuildBob
Copy link
Contributor Author

PR submitted: #1210

Replaced the aw-notify Python submodule with aw-notify-rs. The Makefile targets are compatible so the build system integrates cleanly — just swapping Python/poetry build for cargo.

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