Skip to content
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

CI: test WSL2 #1781

Closed
AkihiroSuda opened this issue Sep 7, 2023 · 2 comments · Fixed by #1883
Closed

CI: test WSL2 #1781

AkihiroSuda opened this issue Sep 7, 2023 · 2 comments · Fixed by #1883
Labels
area/test Tests and CI help wanted Extra attention is needed platform/Windows

Comments

@AkihiroSuda
Copy link
Member

Follow-up to:

runs-on: windows-2022-8-cores (larger runner) is known to support Hyper-V, but not sure if it supports WSL2.
Probably it should work: https://techcommunity.microsoft.com/t5/itops-talk-blog/wsl2-now-available-on-windows-server-2022/ba-p/3447570

@pendo324
Copy link
Contributor

I can't find the documentation about windows-2022-8-cores on the GitHub larger runner page, but as long as it supports virtualization, WSL2 should work.

We're planning on using a Windows Server runner to test Finch's usage of this feature as well (the work-in-progress PR is here if you're interested in the entire process, but what's more interesting is probably the PowerShell script we're planning to run). For some details on how we're planning on doing it:

  1. Install WinGet, and use it to install the other dependencies required to run Lima on Windows, but its not 100% necessary. Technically, you can just install via MSIs
    1. Unfortunately, this is not so simple on Windows Server right now, but it does come pre-installed with all other (modern) editions of Windows
    2. If this comes preinstalled on the GitHub provided runners, that would simplify things considerably
  2. Install Git for Windows (provides git.exe, ssh.exe, cygpath.exe, tar.exe, gzip.exe, make.exe and more). Finch will do this via WinGet. Only the MinGit release is required
    1. Example winget command: winget install -e --id Git.MinGit
  3. Install go. The most supported way seems to be by using the MSI installer directly.
    1. Example of installing go: Invoke-WebRequest -Uri 'https://go.dev/dl/go1.21.0.windows-amd64.msi' -OutFile 'go1.21.0.windows-amd64.msi'; Start-Process msiexec.exe -Wait -ArgumentList '/I C:\Users\Administrator\setup\go1.21.0.windows-amd64.msi /quiet'
  4. Enable WSL2 (requires restart)
    1. wsl --install

From here, the runner should be setup, and the remaining steps should be very similar to how the CI is run on macOS/Linux (clone repo, make, run tests), with the key difference being specifying the usage of the experimental wsl2.yaml.

I guess a maintainer would have to add the runner to this repo in order to test anything right?

@AkihiroSuda
Copy link
Member Author

windows-2022-8-cores

Added by myself. This is a “larger” runner managed by GitHub.
https://docs.github.com/en/actions/using-github-hosted-runners/about-larger-runners/about-larger-runners

@AkihiroSuda AkihiroSuda added the help wanted Extra attention is needed label Sep 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test Tests and CI help wanted Extra attention is needed platform/Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants