Skip to content

Commit 0c3f8e6

Browse files
committed
fix(github-actions): use ubuntu instead of debian
Fixes windows CI due to Vampire/setup-wsl#76
1 parent 11fa17f commit 0c3f8e6

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

github-actions/setup-wsl/action.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ outputs:
3434
value: C:\wsl_root
3535
wsl_root_unc_path:
3636
description: UNC Windows path pointing to the WSL file system root.
37-
value: \\\\wsl.localhost\Debian
37+
value: \\\\wsl.localhost\Ubuntu-24.04
3838
repo_path:
3939
description: Path to the copied repository directory (as Unix wsl path)
4040
value: ${{steps.disk_path.outputs.repo}}
@@ -46,8 +46,10 @@ runs:
4646
# Note: `memory` by default is 50% of the Windows host machine. We want to try
4747
# a higher percentage to leverage more of the GitHub Windows machines.
4848
# They have 16GB by default. See: https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners.
49-
- uses: Vampire/setup-wsl@6819906081f7afebe0cfc34e838b6f8405045672
49+
- uses: Vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6.0.0
5050
with:
51+
# Workaround for https://github.com/Vampire/setup-wsl/issues/76
52+
distribution: Ubuntu-24.04
5153
wsl-conf: |
5254
[interop]
5355
appendWindowsPath=false
@@ -56,7 +58,7 @@ runs:
5658
localhostForwarding=false
5759
memory=14GB
5860
networkingMode=${{inputs.wsl_networking_mode}}
59-
wsl-shell-command: bash --login -euo pipefail
61+
wsl-shell-command: bash --login -eo pipefail
6062
additional-packages: |
6163
curl
6264
ca-certificates
@@ -92,7 +94,7 @@ runs:
9294

9395
- name: Create link to WSL drive
9496
shell: powershell
95-
run: New-Item -ItemType SymbolicLink -Path "C:\wsl_root" -Target "\\wsl.localhost\Debian"
97+
run: New-Item -ItemType SymbolicLink -Path "C:\wsl_root" -Target "\\wsl.localhost\Ubuntu-24.04"
9698

9799
- name: Linking workspace into WSL for fast disk access
98100
shell: wsl-bash {0}
@@ -106,26 +108,30 @@ runs:
106108
echo "repo=$repo_path" >> $GITHUB_OUTPUT
107109
echo "Repo path is: $repo_path"
108110
109-
- name: Cache for nvm, yarn profile caches.
111+
- name: Cache for nvm, pnpm profile caches.
110112
uses: actions/cache@v4
111113
with:
112114
path: |
113-
C:\\wsl_root\\Debian\\root\\.nvm\\versions
114-
C:\\wsl_root\\Debian\\root\\.yarn\\berry\cache
115-
key: "${{ runner.os }}-wsl-cache-v${{inputs.cache_version}}-${{hashFiles('**/.nvmrc')}}-${{hashFiles('**/yarn.lock')}}"
115+
C:\\wsl_root\\root\\.nvm\\versions
116+
C:\\wsl_root\\root\\.pnpm-store\\v3
117+
key: "${{ runner.os }}-wsl-cache-v${{inputs.cache_version}}-${{hashFiles('**/.nvmrc')}}-${{hashFiles('**/pnpm-lock.yaml')}}"
116118
restore-keys: |
117119
${{ runner.os }}-wsl-cache-v${{inputs.cache_version}}-
118-
119120
- name: Setup nvm
120121
shell: wsl-bash {0}
121122
run: |
122123
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
123124
export NVM_DIR="$HOME/.nvm"
124125
# Note: Specify `--install` due to https://github.com/nvm-sh/nvm/issues/1985.
125126
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --install
126-
127-
- name: Installing Node and npm (in WSL)
127+
- name: Installing Node and pnpm (in WSL)
128128
run: |
129+
# Note: this is needed to load NVM in this step otherwise nvm will not be found.
130+
export NVM_DIR="$HOME/.nvm"
131+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
132+
129133
cd ${{steps.disk_path.outputs.repo}}
134+
130135
nvm install
136+
npm i -g pnpm@10
131137
shell: wsl-bash {0}

0 commit comments

Comments
 (0)