Skip to content

GitHub Actions: add cross-platform release and CI workflows#2

Merged
alpaim merged 14 commits into
mainfrom
gh-actions
Mar 7, 2026
Merged

GitHub Actions: add cross-platform release and CI workflows#2
alpaim merged 14 commits into
mainfrom
gh-actions

Conversation

@alpaim
Copy link
Copy Markdown
Owner

@alpaim alpaim commented Mar 7, 2026

This PR adds cross-platform release and CI workflows.

Changes Made

1. Cargo.toml

Added feature flags for different platform backends:

  • cuda - NVIDIA GPU support
  • metal - Apple Silicon GPU support
  • accelerate - Apple Intel CPU acceleration
  • mkl - Intel CPU acceleration (MKL)

Set default-features = false on candle crates to allow feature-based selection.

2. .github/workflows/release.yml

New workflow for official releases.

Trigger: Push tags matching v* (e.g., v1.0.0)

Jobs - Builds 6 platforms in parallel:

  • Linux CPU (x86_64) - with MKL
  • Linux CUDA (x86_64) - with CUDA 12.4
  • Windows CPU (x64) - with MKL
  • Windows CUDA (x64) - with CUDA 12.4
  • macOS ARM64 - with Metal
  • macOS x64 - with Accelerate

Release: Creates GitHub Release marked as latest: true

3. .github/workflows/ci.yml

New workflow for CI/build verification.

Trigger: Push to main branch

Jobs: Same 6 platform builds as release

Artifacts: Uploaded with commit hash in filename (e.g., vecBox-abc1234-bin-linux-cpu-x86_64.tar.gz)

4. .github/actions/get-tag-name/action.yml

Fixed versioning logic:

  • Tag push → uses actual tag name (e.g., v1.0.0)
  • Main branch → uses build number (e.g., v15)
  • Other branches → uses branch name + build + hash

5. .github/actions/windows-setup-cuda/action.yml

  • Downloads and installs CUDA Toolkit 12.4 redistributables
  • Fixed directory structure preservation (now keeps bin/, lib/ structure)
  • Removed duplicate libcublasLt download
  • Uses PowerShell's Invoke-WebRequest (not curl alias)

6. .github/actions/linux-setup-cuda/action.yml

New action for CUDA 12.4 installation on Ubuntu.

  • Installs via NVIDIA's apt repository
  • Sets up CUDA_PATH and LD_LIBRARY_PATH

@alpaim alpaim merged commit 0be0778 into main Mar 7, 2026
@alpaim alpaim deleted the gh-actions branch March 11, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant