Skip to content

Fix Windows CI compatibility and binary build issues #214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 8, 2025

Fixes Windows compatibility issues in the CI pipeline as referenced in PR #213, enabling cross-platform testing on Windows and macOS in addition to Linux.

Issues Fixed

1. GitHub Actions Syntax Issues

The original PR had incorrect conditional syntax that would cause workflow failures. Fixed if conditions to use proper GitHub Actions syntax:

- if: runner.os == 'Linux'
+ if: ${{ runner.os == 'Linux' }}

2. Windows Binary Build Problem

The build-npm.mjs script was not generating Windows executables with the required .exe extension, causing runtime failures on Windows:

- await $`GOOS=${platform.os} GOARCH=${platform.arch} go build -o npm/${platform['node-os'] || platform.os}-${platform['node-arch']}/rslint ./cmd/rslint`;
+ const binaryName = platform.os === 'windows' ? 'rslint.exe' : 'rslint';
+ await $`GOOS=${platform.os} GOARCH=${platform.arch} go build -o npm/${platform['node-os'] || platform.os}-${platform['node-arch']}/${binaryName} ./cmd/rslint`;

3. Platform-Specific Caching Conflicts

Updated cache keys to be OS-specific to prevent cache conflicts between different platforms:

- key: 'vscode-test'
+ key: vscode-test-${{ matrix.os }}

Changes Made

  • Multi-platform CI: Added matrix strategy to run tests on Ubuntu, Windows, and macOS
  • Conditional Dependencies: Linux-specific packages (xvfb) now only install on Linux
  • Binary Compatibility: Windows builds now correctly generate .exe executables
  • Cache Isolation: Each platform gets its own cache namespace
  • Runner Optimization: Final status job uses standard ubuntu-latest runner

Testing

  • ✅ YAML syntax validated
  • ✅ GitHub Actions conditional logic verified
  • ✅ Build process tested and functional
  • ✅ TypeScript compilation passes
  • ✅ Linting passes with only pre-existing warnings

The CI will now properly test RSLint across all three major platforms, ensuring Windows users have a fully functional linting experience.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@Copilot Copilot AI changed the title [WIP] Fixing Windows Compatibility Issues in CI for RSLint Fix Windows CI compatibility and binary build issues Aug 8, 2025
@Copilot Copilot AI requested a review from hardfist August 8, 2025 16:34
Copilot finished work on behalf of hardfist August 8, 2025 16:34
@hardfist hardfist closed this Aug 12, 2025
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