Files
ollama37/.github/workflows/tesla-k80-ci.yml
Shang Chieh Tseng a171c8a087 Fix test workflows to use build artifacts instead of local binary
- Build workflow now uploads ollama binary as artifact with 7-day retention
- Test workflows download artifact instead of expecting local binary
- Eliminates 'ollama binary not found' error when running tests
- Enables build-once, test-multiple-times workflow pattern
- Added binary verification step to confirm artifact download
2025-10-30 12:07:28 +08:00

52 lines
1.2 KiB
YAML

name: Tesla K80 Build
on:
workflow_dispatch: # Manual trigger only
jobs:
build:
runs-on: self-hosted
# Use specific labels if you want to target a particular self-hosted runner
# runs-on: [self-hosted, linux, cuda, tesla-k80]
timeout-minutes: 60 # Prevent hung jobs
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for accurate versioning
- name: Clean previous build
run: |
rm -rf build
rm -f ollama
- name: Configure CMake
run: |
CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ cmake -B build
env:
CMAKE_BUILD_TYPE: Release
- name: Build C++/CUDA components
run: |
CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ cmake --build build -j$(nproc)
timeout-minutes: 30
- name: Build Go binary
run: |
go build -v -o ollama .
- name: Verify binary was created
run: |
ls -lh ollama
./ollama --version
- name: Upload ollama binary as artifact
uses: actions/upload-artifact@v4
with:
name: ollama-binary
path: ollama
retention-days: 7