Files
Daniel Hiltgen a84b315e7b test: harden flaky updater and transfer unit tests (#17378)
app/updater: TestBackgoundChecker / TestAutoUpdateDisabledSkipsDownload hit 'TempDir RemoveAll cleanup: directory not empty' on macOS because the background checker goroutine keeps writing staged files into UpdateStageDir while t.TempDir cleanup runs. The checker's context is cancelled by the time cleanup runs, and after cancellation a new download cannot reach the filesystem (DownloadNewRelease aborts at its HEAD request before any write), so it suffices to wait for any in-flight download to drain. Add a test-only waitDownloadIdle helper (polls the existing cancelDownload sentinel under its lock) and register it via t.Cleanup so TempDir cleanup runs after staged-file handles close. No production code changes.

x/transfer: TestDownloadParallelism asserted elapsed <= 1s against 50ms-per-blob delays, too tight for Windows hosted runners' ~15ms timer granularity and shared-runner jitter. Each blob costs two server sleeps (resolve GET + body GET), so model the serial baseline from the deterministic request count, raise per-blob latency to 100ms so timer quantization is a small fraction of each delay, and key the budget to 75% of the serial baseline so the check still proves parallelism while tolerating jitter.
2026-07-24 13:23:30 -07:00
..

Ollama for macOS and Windows

Download

Development

Desktop App

go generate ./... &&
go run ./cmd/app

UI Development

Setup

Install required tools:

go install github.com/tkrajina/typescriptify-golang-structs/tscriptify@latest

Develop UI (Development Mode)

  1. Start the React development server (with hot-reload):
cd ui/app
npm install
npm run dev
  1. In a separate terminal, run the Ollama app with the -dev flag:
go generate ./... &&
OLLAMA_DEBUG=1 go run ./cmd/app -dev

The -dev flag enables:

Build

Windows

Dependencies - either build a local copy of ollama, or use a github release

# Local dependencies
.\scripts\deps_local.ps1

# Release dependencies
.\scripts\deps_release.ps1 0.6.8

Build

.\scripts\build_windows.ps1

macOS

CI builds with Xcode 14.1 for OS compatibility prior to v13. If you want to manually build v11+ support, you can download the older Xcode here, extract, then mv ./Xcode.app /Applications/Xcode_14.1.0.app then activate with:

export CGO_CFLAGS="-O3 -mmacosx-version-min=12.0"
export CGO_CXXFLAGS="-O3 -mmacosx-version-min=12.0"
export CGO_LDFLAGS="-mmacosx-version-min=12.0"
export SDKROOT=/Applications/Xcode_14.1.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
export DEVELOPER_DIR=/Applications/Xcode_14.1.0.app/Contents/Developer

Dependencies - either build a local copy of Ollama, or use a GitHub release:

# Local dependencies
./scripts/deps_local.sh

# Release dependencies
./scripts/deps_release.sh 0.6.8

Build

./scripts/build_darwin.sh