Skip to content

.github/rust: build and test on windows#149

Merged
npry merged 8 commits intomainfrom
npry/ci.windows
Apr 29, 2026
Merged

.github/rust: build and test on windows#149
npry merged 8 commits intomainfrom
npry/ci.windows

Conversation

@npry
Copy link
Copy Markdown
Collaborator

@npry npry commented Apr 28, 2026

Run rust ci against x86_64-pc-windows-{msvc,gnu}.

Some associated bugfixes (review commit-by-commit), and also cleaned up the rust build with rustup override in the composite action and cargo env vars.

ts_cli_util and ts_python don't run tests successfully on *-windows-gnu — I believe ts_python is because it gets confused about the fact that the rust lib name is also tailscale and for whatever reason that name collision just isn't handled properly on this platform, where ts_cli_util seems to have a linking issue when the tracy feature flag is on (which it is by default). I strip them out of the --workspace --all-features tests with --exclude and then run ts_cli_util in a separate test phase with default features — not that it has any tests, but a) it could add them in the future, and we should run those b) the step is also a placeholder for any other crates that may need special-casing like this in the future

Updates #65 -- not closing because I want to look at the other langs as well

@npry npry force-pushed the npry/ci.windows branch 30 times, most recently from 9aac466 to 3345167 Compare April 29, 2026 16:40
@npry npry force-pushed the npry/ci.windows branch 9 times, most recently from 0fcafa5 to b43fb17 Compare April 29, 2026 17:50
@npry npry marked this pull request as ready for review April 29, 2026 18:39
Comment thread ts_time/src/lib.rs
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Comment thread .github/workflows/ci.yml Outdated
@npry npry force-pushed the npry/ci.windows branch from 4010fa3 to 5236500 Compare April 29, 2026 20:30
npry added 8 commits April 29, 2026 17:06
Since `Instant` is a monotonic counter, it's not generally safe to add
and subtract `Duration`s from it without controlling for under/overflow.
While overflow may be relatively safely assumed not to occur, that's not
the case for underflow: in the `ts_tunnel` tests, a `TimeRange` was
constructed with an 1000s window around `Instant::now()`, but the
testing VMs are ephemeral and so hadn't been alive for 1k seconds, which
induced a panic. This clamps the range to the provided `Instant` on
overflow in `ts_time::TimeRange::new_around`.

Unfortunately there's no `saturating_{sub,add}` for
`std::time::Instant`, which I would've preferred here.

Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: I614ccd1ec53f91f731f34d63d242b3906a6a6964
Doesn't make sense to install this by default anymore.

Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: Ie552891d4598b0a0e110443e6ed939926a6a6964
Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: I6cb998776295caa85f3e80fc7ce687846a6a6964
Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: Icde2069d2d79f712581889e70078f0676a6a6964
Rather than specifying the toolchain everywhere via `+$TOOLCHAIN`, use
`rustup override set` in the composite action. Configure common items
in the rust ci action via env vars.

Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: I98fcdb1e9f3b358c958d0a5f23af91a76a6a6964
Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: I4b10b5e80f8562ead1bf039fd5c192be6a6a6964
It doesn't seem to work here, just don't depend on it or use it on this
platform.

Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: Ia64e4899b2373672e3c2768742453e836a6a6964
Updates #65

Signed-off-by: Nathan Perry <nathan@tailscale.com>
Change-Id: I5381bc94a5817a69cd848df929b5860c6a6a6964
@npry npry force-pushed the npry/ci.windows branch from 5236500 to 4169695 Compare April 29, 2026 21:06
@npry npry merged commit 4169695 into main Apr 29, 2026
22 checks passed
@npry npry deleted the npry/ci.windows branch April 29, 2026 22:25
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.

2 participants