From f3d7cde6b90749f6f46aadf1bdbd4b73f91486ac Mon Sep 17 00:00:00 2001 From: killian <63927363+KillianLucas@users.noreply.github.com> Date: Tue, 9 Apr 2024 06:45:57 +0000 Subject: [PATCH] Begin --- .github/workflows/up.yml | 61 ++++++++++++++++++++++++++++++++++++++++ unix.sh | 39 +++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 .github/workflows/up.yml create mode 100644 unix.sh diff --git a/.github/workflows/up.yml b/.github/workflows/up.yml new file mode 100644 index 0000000..607fa56 --- /dev/null +++ b/.github/workflows/up.yml @@ -0,0 +1,61 @@ +name: Cross-Platform Test + +on: [push, pull_request] + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - os: macos-10.15 + script: ./unix.sh + - os: macos-11 + script: ./unix.sh + - os: macos-12 + script: ./unix.sh + - os: windows-2016 + script: .\windows.ps1 + - os: windows-2019 + script: .\windows.ps1 + - os: windows-2022 + script: .\windows.ps1 + - os: ubuntu-18.04 + script: ./unix.sh + - os: ubuntu-20.04 + 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 + - os: ubuntu-latest + distro: debian:11 + script: ./unix.sh + - os: ubuntu-latest + distro: centos:7 + script: ./unix.sh + - os: ubuntu-latest + distro: centos:8 + script: ./unix.sh + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Set up Docker container + if: matrix.distro + uses: addnab/docker-run-action@v2 + with: + image: ${{ matrix.distro }} + options: -v ${{ github.workspace }}:/workspace + run: | + cd /workspace + ${{ matrix.script }} + + - name: Run script on macOS and Windows + if: matrix.os != 'ubuntu-latest' || matrix.distro == '' + run: ${{ matrix.script }} + shell: ${{ matrix.os == 'windows-latest' || matrix.os == 'windows-2019' || matrix.os == 'windows-2022' ? 'pwsh' : 'bash' }} diff --git a/unix.sh b/unix.sh new file mode 100644 index 0000000..96e8bcf --- /dev/null +++ b/unix.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +echo "Starting Open Interpreter installation..." +sleep 2 +echo "This will take approximately 5 minutes..." +sleep 2 + +# Define pyenv location +pyenv_root="$HOME/.pyenv/bin/pyenv" + +# Check if pyenv is installed +if ! command -v $pyenv_root &> /dev/null +then + echo "pyenv is not installed. Installing now..." + curl https://pyenv.run | zsh #zsh is the default shell for mac now. Changing this may cause install to fail +else + echo "pyenv is already installed." +fi + +PYENV_VERSION='3.11.7' + +$pyenv_root init + +$pyenv_root install $PYENV_VERSION --skip-existing + +$pyenv_root init + +$pyenv_root global $PYENV_VERSION + +$pyenv_root exec pip install open-interpreter + +$pyenv_root shell $PYENV_VERSION +$pyenv_root pip install open-interpreter +$pyenv_root shell --unset + +echo "" +echo "Open Interpreter has been installed. Run the following command to use it: " +echo "" +echo "interpreter" \ No newline at end of file