90 lines
2.5 KiB
YAML
90 lines
2.5 KiB
YAML
name: GPU Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
gpu-build:
|
|
name: ${{ matrix.name }}
|
|
runs-on: ${{ matrix.runner }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- runner: windows-2022
|
|
name: Windows amd64 (CUDA + OpenCL)
|
|
install_cuda: true
|
|
|
|
- runner: ubuntu-22.04
|
|
name: Linux amd64 (CUDA + OpenCL)
|
|
install_cuda: true
|
|
|
|
- runner: ubuntu-22.04-arm
|
|
name: Linux arm64 (CUDA + OpenCL)
|
|
install_cuda: true
|
|
|
|
- runner: macos-15-intel
|
|
name: macOS amd64 (Metal)
|
|
install_cuda: false
|
|
|
|
- runner: macos-15
|
|
name: macOS arm64 (Metal)
|
|
install_cuda: false
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
|
|
- name: Install CUDA Toolkit
|
|
if: ${{ matrix.install_cuda }}
|
|
uses: Jimver/cuda-toolkit@v0.2.35
|
|
with:
|
|
cuda: '12.8.1'
|
|
method: 'network'
|
|
|
|
- name: Install OpenCL development files (Linux)
|
|
if: ${{ matrix.install_cuda && !startsWith(matrix.runner, 'windows') }}
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install -y ocl-icd-opencl-dev
|
|
|
|
- name: Install Ninja
|
|
shell: bash
|
|
run: |
|
|
if command -v ninja &>/dev/null; then
|
|
echo "Ninja already installed"
|
|
elif command -v apt-get &>/dev/null; then
|
|
sudo apt-get update && sudo apt-get install -y ninja-build
|
|
elif command -v brew &>/dev/null; then
|
|
brew install ninja
|
|
elif command -v choco &>/dev/null; then
|
|
choco install ninja
|
|
fi
|
|
|
|
- name: Build extension (Windows)
|
|
if: ${{ startsWith(matrix.runner, 'windows') }}
|
|
shell: cmd
|
|
run: |
|
|
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
|
|
mv "C:\Program Files\Git\usr\bin\link.exe" "C:\Program Files\Git\usr\bin\link-git.exe"
|
|
set GEN=ninja
|
|
set CC=clang-cl
|
|
set CXX=clang-cl
|
|
make release
|
|
|
|
- name: Build extension
|
|
if: ${{ !startsWith(matrix.runner, 'windows') }}
|
|
shell: bash
|
|
run: |
|
|
GEN=ninja make release
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v6
|
|
with:
|
|
name: ufsecp-gpu-${{ matrix.runner }}
|
|
path: |
|
|
build/release/extension/ufsecp/ufsecp.duckdb_extension
|
|
if-no-files-found: warn
|