Skip to content

ci: add Windows ARM64 build support in release workflow#202

Merged
ErikBjare merged 1 commit intoActivityWatch:masterfrom
TimeToBuildBob:ci/windows-arm64-fixes
Feb 22, 2026
Merged

ci: add Windows ARM64 build support in release workflow#202
ErikBjare merged 1 commit intoActivityWatch:masterfrom
TimeToBuildBob:ci/windows-arm64-fixes

Conversation

@TimeToBuildBob
Copy link
Copy Markdown
Contributor

@TimeToBuildBob TimeToBuildBob commented Feb 20, 2026

Fixes the Windows ARM64 CI issues raised in #80.

Changes:

  • Add windows-11-arm runner to release.yml matrix for the aarch64-pc-windows-msvc target
    • Previously used windows-latest (x64 runner) for ARM64, which produces incorrect binaries
  • Add rustup target add step for builds using non-default targets (ARM64 cross-compilation)

Note: The build.yml doesn't need the same fix since it doesn't have ARM64 targets in its matrix.

Copy link
Copy Markdown

@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 2fea17e in 7 seconds. Click for details.
  • Reviewed 48 lines of code in 2 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_1fEG1oxLdl6CIgbu

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Feb 20, 2026

Greptile Summary

This PR adds proper Windows ARM64 build support to both CI workflows by using the windows-11-arm runner for native ARM64 compilation and adding the required rustup target add step.

Key changes:

  • Added windows-11-arm platform with --target aarch64-pc-windows-msvc to both build.yml and release.yml
  • Added "Add rust target" step that conditionally installs the ARM64 target when matrix.args is specified
  • Fixed YAML syntax issue (if :if:) in the intermediate commits

Technical approach:

  • Uses native ARM64 runner instead of cross-compilation from x64, ensuring correct binary artifacts
  • Extracts target triple from args using shell command parsing
  • Conditional step only runs for platforms that specify custom build arguments

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes follow established patterns in the workflow files, use proper conditional logic, and address real CI configuration issues (native ARM64 runner + target installation)
  • No files require special attention

Important Files Changed

Filename Overview
.github/workflows/build.yml Added Windows ARM64 build support with proper runner and target configuration
.github/workflows/release.yml Added Windows ARM64 release support with proper runner and target configuration

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[CI Workflow Triggered] --> B{Platform Matrix}
    B --> C[macOS Latest]
    B --> D[Ubuntu 22.04/24.04]
    B --> E[Ubuntu ARM]
    B --> F[Windows Latest]
    B --> G[Windows 11 ARM - NEW]
    
    G --> H{Check matrix.args}
    H -->|args present| I[Run: rustup target add aarch64-pc-windows-msvc]
    H -->|args null| J[Skip target installation]
    
    I --> K[Build with --target aarch64-pc-windows-msvc]
    J --> L[Build without target args]
    
    C --> M[Standard Build Steps]
    D --> M
    E --> M
    F --> M
    
    M --> N[Checkout → Dependencies → Build]
    K --> N
    L --> N
Loading

Last reviewed commit: 2fea17e

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

2 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

Found the root cause of the Windows ARM64 compile failure.

Root cause

aw-server-rust (the git dep) uses appdirs = "0.2.0" which transitively pulls in winapi = "0.2.8". That version of winapi defines size_t, ULONG_PTR, etc. only for x86 and x86_64 — no aarch64 branch — causing 285 compile errors.

The aw-tauri code itself has already been fixed in this PR (using directories crate), but the git dep brings in the old winapi through aw-server-rust.

Fix

Opened ActivityWatch/aw-server-rust#562 to replace appdirs with dirs in all three affected crates (aw-server, aw-sync, aw-datastore).

Temporarily updated this PR's Cargo.toml to point at the fix branch so CI can be validated now. Will revert to ActivityWatch/aw-server-rust:master once #562 is merged.

@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

Status update

ActivityWatch/aw-server-rust#562 is now CI green (all 7 checks: format, clippy, ubuntu, macOS, windows, Android, coverage) and ready for review/merge.

Current state

  • This PR's Cargo.toml temporarily points to TimeToBuildBob/aw-server-rust:fix/replace-appdirs-with-dirs to validate the fix end-to-end
  • The Build/Lint CI here needs maintainer approval to run (first-time external contributor)

Next steps

  1. Merge fix: replace appdirs with dirs for Windows ARM64 compatibility aw-server-rust#562 (the appdirs → dirs replacement)
  2. Update this PR's Cargo.toml to point back to ActivityWatch/aw-server-rust:master
  3. CI should then pass on the real upstream dependency

Or if preferred: a maintainer can approve the CI here to verify the fix works before merging #562, since this PR's temporary Cargo.toml override already validates the fix.

@0xbrayo — let me know if you'd like me to do step 2 once #562 is merged.

@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

The current CI failure is a transient network error — the runner failed to fetch the aw-webui git submodule from my fork's aw-server-rust repo after 3 retries:

spurious network error (3 tries remaining): could not read from remote repository
revision e493d03c0eb9d54a1495b3a417cffe6dc03123f8 not found

This is infrastructure-level flakiness, not a code issue.

Path forward: Once ActivityWatch/aw-server-rust#562 (the appdirs → dirs fix) is merged, I can update this PR's Cargo.toml to point back to ActivityWatch/aw-server-rust:master. That removes the dependency on my fork entirely and should give clean CI.

@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

CI fix: regenerated Cargo.lock

Root cause found: The aw-webui submodule in both TimeToBuildBob/aw-server-rust fork and ActivityWatch/aw-server-rust master was pinned to commit e493d03c — which no longer exists in the aw-webui repo (likely lost to a force-push or history rewrite). This caused Cargo to fail with "revision not found" every time it tried to fetch the git dependency.

Fixes applied:

  1. Updated the aw-webui submodule in my fork (TimeToBuildBob/aw-server-rust) to c32b6352 (latest valid master commit)
  2. Regenerated Cargo.lock from scratch — it now references my fork with the fixed submodule reference

CI should now be able to fetch the dependencies. Waiting for results.

- Add windows-11-arm runner to matrix for aarch64-pc-windows-msvc
- Add rustup target add step for cross-compilation targets

Previously the Windows ARM64 entry used windows-latest (x64 runner)
which cannot produce correct ARM64 artifacts. windows-11-arm is the
correct native ARM64 runner.

Fixes the issue reported by @0xbrayo in PR ActivityWatch#80.
@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

PR cleaned up — now mergeable

Rebased this PR onto current master and stripped out the temporary Cargo.toml/Cargo.lock changes that were previously added to work around the aw-webui submodule issue.

What's in this PR now:

  • Add windows-11-arm runner to release.yml matrix for aarch64-pc-windows-msvc (native ARM64, not cross-compile from x64)
  • Add rustup target add step for builds with non-default targets

Removed from PR:

The PR is now mergeable and the diff is clean. CI still needs maintainer approval to run (first-time external contributor).

@TimeToBuildBob TimeToBuildBob changed the title ci: fix windows arm64 build issues ci: add Windows ARM64 build support in release workflow Feb 21, 2026
@0xbrayo
Copy link
Copy Markdown
Member

0xbrayo commented Feb 22, 2026

update the cargo.toml to point back to activitywatch master

@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

The Cargo.toml already points to the upstream activitywatch master — the temporary fork references were removed in the cleanup rebase (mentioned in my 'PR cleaned up — now mergeable' comment above from Feb 21). The current PR only changes .github/workflows/release.yml (6 lines, adding the windows-11-arm runner and a rustup target add step). The Cargo.toml and Cargo.lock in this branch are identical to upstream master.

@0xbrayo
Copy link
Copy Markdown
Member

0xbrayo commented Feb 22, 2026

@ellipsis-dev review

@ErikBjare ErikBjare merged commit f7f66e5 into ActivityWatch:master Feb 22, 2026
6 checks passed
@ErikBjare
Copy link
Copy Markdown
Member

@TimeToBuildBob Seems this didn't touch the build.yml? Should also build for Windows ARM64 so we know that it works, before the release workflow is triggered on an actual release (a bad time to notice failing CI)

TimeToBuildBob added a commit to TimeToBuildBob/aw-tauri that referenced this pull request Feb 22, 2026
Adds windows-11-arm runner with aarch64-pc-windows-msvc target to the
build matrix, matching what release.yml already has. This ensures
Windows ARM64 builds are verified on every push/PR, rather than
discovering failures during an actual release.

Also adds the `rustup target add` step for non-default targets.

Requested-by: @ErikBjare in ActivityWatch#202
@TimeToBuildBob
Copy link
Copy Markdown
Contributor Author

Good catch — you're right, build.yml didn't have it. Created #203 to add windows-11-arm to the build matrix (same pattern as release.yml: runner + rustup target add step). This way CI will catch ARM64 build failures before they surprise us during a release.

ErikBjare pushed a commit that referenced this pull request Feb 23, 2026
* ci(build): add Windows ARM64 to build workflow

Adds windows-11-arm runner with aarch64-pc-windows-msvc target to the
build matrix, matching what release.yml already has. This ensures
Windows ARM64 builds are verified on every push/PR, rather than
discovering failures during an actual release.

Also adds the `rustup target add` step for non-default targets.

Requested-by: @ErikBjare in #202

* fix: replace appdirs with dirs to fix Windows ARM64 build

appdirs 0.2.0 pulls in ole32-sys and shell32-sys, which depend on
winapi 0.2.8. That crate lacks aarch64-pc-windows-msvc support —
it only defines ULONG_PTR/LONG_PTR for x86/x86_64 targets, causing
compile errors on Windows ARM64.

Replace appdirs with the dirs 5.0.1 crate, which uses windows-sys
(no winapi dependency at all) and has full ARM64 support.

Path equivalents used:
- user_config_dir("activitywatch") -> config_dir() / "activitywatch"
- user_data_dir("activitywatch")   -> data_dir() / "activitywatch"
- user_cache_dir("activitywatch")  -> cache_dir() / "activitywatch"
- user_log_dir (Windows) -> data_local_dir() / "activitywatch" / "Logs"
- user_log_dir (macOS)   -> home_dir() / "Library" / "Logs" / "activitywatch"

All resulting paths match the previous appdirs behavior.

* fix(windows): add winbase feature to winapi dependency

* ci(build): pre-install WiX on Windows ARM64 to fix TLS bundling error

* ci(build): install WiX to tauri cache dir on Windows ARM64

* fix(ci): pre-install NSIS + WiX for Windows ARM64 TLS workaround

The windows-11-arm runner lacks TLS in its default HTTP client, causing
tauri-bundler's internal downloader to fail for both WiX and NSIS.

Previous commit fixed WiX only. After WiX succeeded, the build failed at
NSIS download with the same 'no TLS backend' error. Now pre-downloads:
- WiX 3.14 binaries
- NSIS 3 base toolset
- nsis_tauri_utils plugin v0.4.1

All downloaded via PowerShell (which has proper TLS) into the exact cache
paths tauri-bundler expects (%LOCALAPPDATA%\tauri\).

* fix(ci): rename extracted nsis-3.08/ to NSIS/ for tauri cache

The nsis-3.zip contains files under nsis-3.08/ directory, but tauri-bundler
expects them at %LOCALAPPDATA%\tauri\NSIS. The bundler normally extracts
the zip then renames nsis-3.08 -> NSIS. Our pre-install step was missing
the rename, so tauri didn't find the cached NSIS and tried to re-download
(which fails due to TLS).

* fix(ci): use correct nsis_tauri_utils version (v0.4.2 for tauri-cli 2.2.7)

tauri-cli 2.2.7 expects nsis_tauri_utils v0.4.2 (not v0.4.1 from older
tauri-v2.2.2 tag). Hash mismatch caused bundler to try re-downloading,
which fails due to missing TLS on windows-11-arm runner.

* ci: use --bundles msi for ARM64, skip NSIS (no TLS backend)

* ci: retry ARM64 MSI build (previous run hit npm ECONNRESET)

---------

Co-authored-by: TimeToBuildBob <timotobuildbob@gmail.com>
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