ci: add windows and macos test matrix#128
Open
AlexCannonball wants to merge 4 commits into
Open
Conversation
cd39b5f to
09a5a05
Compare
911b4e8 to
0124fda
Compare
0124fda to
1eb9710
Compare
- Use `floor_char_boundary` in `offset_to_position` to safely handle offsets inside multi-byte UTF-8 sequences. - Replace hardcoded byte offset with dynamic search in tests to account for potential line ending shifts. - Add `.gitattributes` to enforce LF line endings across all platforms. - Fixes CI panics on windows-latest runners.
c004f08 to
2ccafe8
Compare
- Use `Url::from_file_path` and `Url::from_directory_path` to ensure consistent URI formatting (slashes and drive letters) on Windows. - Replace manual path string concatenation with OS-native URI generation.
f9f5dc0 to
4233c94
Compare
Contributor
Author
Cross-Platform FixesThe extended CI uncovered a Windows-specific panic and several test regressions:
|
Owner
|
I’ll be taking a look at all these PRs over the weekend! Thanks for your contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Resolves #115. This PR introduces a cross-platform testing matrix to ensure
protolsbuilds and runs correctly on Windows and macOS (both Intel and Apple Silicon), alongside the existing Linux Dev Container tests.Changes
test-cross-platformjob to.github/workflows/ci.yml.x86_64-pc-windows-msvc(Ensures binary links correctly on Windows).x86_64-apple-darwinandaarch64-apple-darwin.aarch64-unknown-linux-gnucompilation check.cargo buildon all targets to verify compilation and linking (critical for C-bindings like tree-sitter).cargo testexecution: Tests run on native architectures and macOS (via Rosetta 2), but are skipped for Linux ARM on x86 runners to prevent execution errors.Swatinem/rust-cachekeyed by target architecture to optimize build times across the matrix.Technical Notes
dtolnay/rust-toolchain@stable. While the project has arust-toolchain.toml, this action ensures the correct native targets are added for cross-compilation during the setup phase..exeand macOS binaries are properly generated, satisfying the requirement for build verification beyond just test harnesses.