Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianLucas committed Apr 9, 2024
1 parent f3d7cde commit c088d4b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
script: ./unix.sh
- os: ubuntu-latest
script: ./unix.sh
# Using Docker for specific Linux distributions and versions
- os: ubuntu-latest
distro: debian:10
script: ./unix.sh
Expand Down Expand Up @@ -55,7 +54,7 @@ jobs:
cd /workspace
${{ matrix.script }}
- name: Run script on macOS and Windows
if: matrix.os != 'ubuntu-latest' || matrix.distro == ''
- name: Run script on non-Docker environments
if: matrix.distro == ''
run: ${{ matrix.script }}
shell: ${{ matrix.os == 'windows-latest' || matrix.os == 'windows-2019' || matrix.os == 'windows-2022' ? 'pwsh' : 'bash' }}
shell: ${{ contains(matrix.os, 'windows') && 'pwsh' || 'bash' }}
42 changes: 42 additions & 0 deletions windows.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
Write-Output "Starting Open Interpreter installation..."
Start-Sleep -Seconds 2
Write-Output "This will take approximately 5 minutes..."
Start-Sleep -Seconds 2

# Check if pyenv is installed
$pyenvRoot = "${env:USERPROFILE}\.pyenv\pyenv-win"
$pyenvBin = "$pyenvRoot\bin\pyenv.bat"
if (!(Get-Command $pyenvBin -ErrorAction SilentlyContinue)) {
# Download and install pyenv-win
$pyenvInstaller = "install-pyenv-win.ps1"
$pyenvInstallUrl = "https://raw.githubusercontent.com/pyenv-win/pyenv-win/master/pyenv-win/install-pyenv-win.ps1"
Invoke-WebRequest -Uri $pyenvInstallUrl -OutFile $pyenvInstaller
& powershell -ExecutionPolicy Bypass -File $pyenvInstaller
Remove-Item -Path $pyenvInstaller
}

# Check if Rust is installed
if (!(Get-Command rustc -ErrorAction SilentlyContinue)) {
Write-Output "Rust is not installed. Installing now..."
$rustupUrl = "https://win.rustup.rs/x86_64"
$rustupFile = "rustup-init.exe"
Invoke-WebRequest -Uri $rustupUrl -OutFile $rustupFile
Start-Process -FilePath .\$rustupFile -ArgumentList '-y', '--default-toolchain', 'stable' -Wait
Remove-Item -Path .\$rustupFile
}

# Use the full path to pyenv to install Python
& "$pyenvBin" init
& "$pyenvBin" install 3.11.7 --skip-existing

# Turn on this Python and install OI
$env:PYENV_VERSION="3.11.7"
& pip install open-interpreter

# Get us out of this vers of Python (which was just used to setup OI, which should stay in that vers of Python...?)
Remove-Item Env:\PYENV_VERSION

Write-Output ""
Write-Output "Open Interpreter has been installed. Run the following command to use it: "
Write-Output ""
Write-Output "interpreter"

0 comments on commit c088d4b

Please sign in to comment.