Skip to content

removed model check #91

removed model check

removed model check #91

Workflow file for this run

name: Test Ollama on Self-Hosted Runner
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: self-hosted
env:
GDAL_VERSION: "3.11.0" # Adjust this to match `brew info gdal`
steps:
- uses: actions/checkout@v4
- name: Install Ollama (on MacOS)
run: |
if ! command -v ollama &> /dev/null; then
brew install ollama
else
echo "Ollama is already installed."
fi
- name: Start Ollama
run: ollama serve &
- name: Wait for Ollama to be ready
run: sleep 10
- name: Pull the required model
run: ollama pull gemma3:12b
- name: Install GDAL via Homebrew
run: brew install gdal
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: pip
- name: Set GDAL build env and install dependencies
run: |
export CPLUS_INCLUDE_PATH=/opt/homebrew/opt/gdal/include
export C_INCLUDE_PATH=/opt/homebrew/opt/gdal/include
export LDFLAGS="-L/opt/homebrew/opt/gdal/lib"
export CPPFLAGS="-I/opt/homebrew/opt/gdal/include"
export DYLD_LIBRARY_PATH="/opt/homebrew/opt/gdal/lib:$DYLD_LIBRARY_PATH"
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
# Match Python GDAL version with brew GDAL version
pip install GDAL==$GDAL_VERSION
- name: Run tests with real Ollama server
run: |
python -c "import osgeo.gdal as gdal; print('GDAL loaded:', gdal.VersionInfo())"
pytest tests