From 529ea5c44bad9138501665a672410a188d17e682 Mon Sep 17 00:00:00 2001 From: Alan Agius <17563226+alan-agius4@users.noreply.github.com> Date: Wed, 14 Jan 2026 08:06:51 +0000 Subject: [PATCH] refactor: remove setup-wsl action This is no longer used in the CLI repo. --- .../bazel/setup/setup-ci-bazelrc.mjs | 3 +- github-actions/setup-wsl/action.yml | 150 ------------------ 2 files changed, 1 insertion(+), 152 deletions(-) delete mode 100644 github-actions/setup-wsl/action.yml diff --git a/github-actions/bazel/setup/setup-ci-bazelrc.mjs b/github-actions/bazel/setup/setup-ci-bazelrc.mjs index 113aa1445..71afa9028 100755 --- a/github-actions/bazel/setup/setup-ci-bazelrc.mjs +++ b/github-actions/bazel/setup/setup-ci-bazelrc.mjs @@ -16,8 +16,7 @@ const bazelRcContent = ` build --announce_rc # Avoids re-downloading NodeJS/browsers all the time. -# Replace path to make it compatable with WSL -build --repository_cache=${escapedCachePath.replace(/c:\//i, '/mnt/c/')} +build --repository_cache=${escapedCachePath} # More details on failures build --verbose_failures=true diff --git a/github-actions/setup-wsl/action.yml b/github-actions/setup-wsl/action.yml deleted file mode 100644 index 1ead6ea16..000000000 --- a/github-actions/setup-wsl/action.yml +++ /dev/null @@ -1,150 +0,0 @@ -name: 'Setup WSL' -description: 'Sets up WSL for the current Windows VM' -author: 'Angular' - -inputs: - wsl_firewall_interface: - description: Interface alias for the WSL firewall. - default: 'vEthernet (WSL)' - required: false - wsl_networking_mode: - description: Networking mode for the WSL config - default: NAT - required: false - -outputs: - cmd_path: - description: WSL unix path pointing to `cmd.exe` of the host system. - value: ${{steps.wsl_paths.outputs.cmd_path}} - npm_path: - description: WSL unix path pointing to `npm` of the host system. - value: ${{steps.wsl_paths.outputs.npm_path}} - git_path: - description: WSL unix path pointing to `git` of the host system. - value: ${{steps.wsl_paths.outputs.git_path}} - tmp_path: - description: WSL unix path pointing to the temporary directory in the host system. - value: ${{steps.wsl_paths.outputs.tmp_path}} - wsl_root_path: - description: Windows path pointing to the WSL file system root (using a symlink). - value: D:\wsl_root - wsl_root_unc_path: - description: UNC Windows path pointing to the WSL file system root. - value: \\\\wsl.localhost\Ubuntu-24.04 - repo_path: - description: Path to the copied repository directory (as Unix wsl path) - value: ${{steps.disk_path.outputs.repo}} - -runs: - using: composite - steps: - # Configure the WSL VM. - # Note: `memory` by default is 50% of the Windows host machine. We want to try - # a higher percentage to leverage more of the GitHub Windows machines. - # They have 16GB by default. See: https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners. - - uses: Vampire/setup-wsl@6a8db447be7ed35f2f499c02c6e60ff77ef11278 # v6.0.0 - with: - # Workaround for https://github.com/Vampire/setup-wsl/issues/76 - distribution: Ubuntu-24.04 - wsl-conf: | - [interop] - appendWindowsPath=false - [wsl2] - firewall=false - localhostForwarding=false - memory=14GB - networkingMode=${{inputs.wsl_networking_mode}} - wsl-shell-command: bash --login -eo pipefail - additional-packages: | - curl - ca-certificates - g++ - unzip - zip - git - python3 - tar - - - name: Determining paths for common WSL usage (e.g. path to cmd, npm, git) - id: wsl_paths - shell: bash - run: | - cmd_path=$(which cmd.exe) - cmd_wsl_path=$(wsl exec wslpath -u $cmd_path) - npm_path=$(which npm) - npm_wls_path=$(wsl exec wslpath -u "$npm_path") - tmp_dir_wsl_path=$(wsl exec wslpath -u "/tmp") - - git_bin=$(which git) - git_bin_wsl_path=$(wsl exec wslpath -u "$git_bin") - - echo "wsl_home=$(wsl exec wslpath -u "$HOME")" >> $GITHUB_OUTPUT - echo "cmd_path=$cmd_wsl_path" >> $GITHUB_OUTPUT - echo "npm_path=$npm_wls_path" >> $GITHUB_OUTPUT - echo "tmp_path=$tmp_dir_wsl_path" >> $GITHUB_OUTPUT - echo "git_path=$git_bin_wsl_path" >> $GITHUB_OUTPUT - - - name: Disable WSL <> Host virtual network firewall (to allow for testing) - shell: powershell - run: Set-NetFirewallProfile -Profile Public -DisabledInterfaceAliases "${{inputs.wsl_firewall_interface}}" - - - name: Create link to WSL drive - shell: powershell - run: New-Item -ItemType SymbolicLink -Path "D:\wsl_root" -Target "\\wsl.localhost\Ubuntu-24.04" - - - name: Linking workspace into WSL for fast disk access - shell: wsl-bash {0} - id: disk_path - env: - WSLENV: 'GITHUB_OUTPUT/p' - run: | - repo_path="$HOME/repo" - cp -R . $repo_path - - echo "repo=$repo_path" >> $GITHUB_OUTPUT - echo "Repo path is: $repo_path" - - - name: Restore WSL NVM cache - id: cache-nvm - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1 - with: - path: ~/.cache/wsl_nvm_cache.tar.gz - key: wsl-nvm-cache-v1-${{hashFiles('**/.nvmrc')}} - - - name: Extract NVM inside WSL - if: steps.cache-nvm.outputs.cache-hit == 'true' - shell: wsl-bash {0} - run: | - cache_archive="${{steps.wsl_paths.outputs.wsl_home}}/.cache/wsl_nvm_cache.tar.gz" - mkdir -p ~/.nvm - tar -xzf "$cache_archive" -C ~/.nvm - - - name: Download NVM inside WSL - shell: wsl-bash {0} - if: steps.cache-nvm.outputs.cache-hit != 'true' - run: | - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash - export NVM_DIR="$HOME/.nvm" - # Note: Specify `--install` due to https://github.com/nvm-sh/nvm/issues/1985. - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --install - - - name: Setup NVM inside WSL - shell: wsl-bash {0} - run: | - # Note: this is needed to load NVM in this step otherwise nvm will not be found. - export NVM_DIR="$HOME/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - - cd ${{steps.disk_path.outputs.repo}} - - nvm install - npm i -g pnpm@10 - - - name: Archive NVM inside WSL - shell: wsl-bash {0} - if: steps.cache-nvm.outputs.cache-hit != 'true' - run: | - wsl_home="${{steps.wsl_paths.outputs.wsl_home}}" - mkdir -p "${wsl_home}/.cache" - cache_archive="${wsl_home}/.cache/wsl_nvm_cache.tar.gz" - tar -czf "$cache_archive" -C ~/.nvm .