Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,22 @@ jobs:
- checkout
- run: system_profiler SPHardwareDataType

create_installables:
docker:
- image: cimg/python:3.12.0
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo apt-get update
sudo apt-get install -y curl libgmp-dev libmpfr-dev libmpc-dev libssl-dev libxml2-dev libxslt1-dev zlib1g-dev wine64
pip install --upgrade pip
pip install .
- run:
name: Create installables
command: |
./create_installables.sh
# chatgpt_api_integration_test_tinygrad:
# macos:
# xcode: "16.0.0"
Expand Down Expand Up @@ -216,4 +232,5 @@ workflows:
- discovery_integration_test
- chatgpt_api_integration_test_mlx
- test_macos_m1
- create_installables
# - chatgpt_api_integration_test_tinygrad
53 changes: 53 additions & 0 deletions create_installables.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@

# Create standalone executables using PyInstaller

# Ensure we are in the correct directory
cd "$(dirname "$0")"

# Create a virtual environment if it doesn't exist
if [ ! -d ".venv" ]; then
python3 -m venv .venv
fi

# Activate the virtual environment
source .venv/bin/activate

# Upgrade pip and install required packages
pip install --upgrade pip setuptools wheel pyinstaller

# Function to create standalone executable for a given platform
create_executable() {
local platform=$1

echo "Creating standalone executable for $platform..."

if [ "$platform" == "linux" ]; then
pyinstaller --onefile exo/main.py --name exo-linux
elif [ "$platform" == "macos" ]; then
# Install Homebrew if not already installed (for macOS)
if ! command -v brew &> /dev/null; then
echo "Homebrew not found. Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi

pyinstaller --onefile exo/main.py --name exo-macos
elif [ "$platform" == "windows" ]; then
# Install Wine if not already installed (for cross-compiling Windows executables on Linux)
if ! command -v wine &> /dev/null; then
echo "Wine not found. Installing Wine..."
sudo apt-get update && sudo apt-get install -y wine64
fi

pyinstaller --onefile exo/main.py --name exo-windows.exe --add-data "exo;exo"
else
echo "Unsupported platform: $platform"
exit 1
fi

echo "Standalone executable for $platform created successfully."
}

# Create executables for all target platforms (Linux, macOS, Windows)
create_executable linux
create_executable macos
#/bin/bash