-
-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Objective
Enable cross-platform testing on Linux, macOS, and Windows to ensure compatibility and catch platform-specific bugs early.
Implementation
1. Add OS Matrix to Test Job
Extend the existing matrix strategy to include multiple operating systems:
strategy:
fail-fast: false
matrix:
rust:
- ${{ needs.msrv.outputs.version }}
- stable
os:
- ubuntu-latest
- macos-latest
- windows-latest2. Platform-Specific Considerations
- Path Separators: Ensure tests handle both
/(Unix) and\(Windows) - Line Endings: CRLF (Windows) vs LF (Unix/macOS)
- File Permissions: Unix permissions don't apply on Windows
- Case Sensitivity: Windows filesystem is case-insensitive
- Symbolic Links: May require special handling on Windows
3. Conditional Steps
Add platform-specific steps if needed:
- name: Platform-specific setup (Windows)
if: runner.os == 'Windows'
run: # Windows-specific commands
- name: Platform-specific setup (macOS)
if: runner.os == 'macOS'
run: # macOS-specific commands4. Cache Optimization
Adjust cache keys for multi-platform:
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
key: test-${{ matrix.rust }}-${{ matrix.os }}
save-if: ${{ github.ref == 'refs/heads/main' }}Benefits
- Platform Compatibility: Catch OS-specific bugs before users do
- Wider Audience: Confidence for users on all major platforms
- Production Ready: Enterprise-grade cross-platform support
- Early Detection: CI catches platform issues immediately
Test Plan
- Matrix configuration validated
- Tests pass on Ubuntu
- Tests pass on macOS
- Tests pass on Windows
- Cache strategy optimized for multi-OS
- No platform-specific test failures
- CI runtime remains acceptable (<5 min total)
Acceptance Criteria
- Test job runs on ubuntu-latest, macos-latest, windows-latest
- All 157 tests pass on all platforms
- Platform-specific edge cases handled
- Cache keys include OS identifier
- Workflow summary shows results per platform
- No regression in CI performance
Parent: #175
Metadata
Metadata
Assignees
Labels
No labels