Skip to content

test

test #15

name: Build and Release
on:
push:
branches: [main, ci]
pull_request:
branches: [main]
workflow_dispatch: {} # Allow manual trigger
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-with-cuda:
runs-on: ubuntu-latest
container:
image: pytorch/pytorch:2.6.0-cuda12.6-cudnn9-devel
steps:
- name: Install build dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
cmake ninja-build git
pip install --no-cache-dir build wheel setuptools ninja
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set CUDA_HOME
run: |
# Find nvcc location
NVCC_PATH=$(which nvcc)
# Extract CUDA installation directory (remove /bin/nvcc from path)
export CUDA_HOME=$(dirname $(dirname $NVCC_PATH))
echo "CUDA_HOME=${CUDA_HOME}" >> $GITHUB_ENV
echo "Found CUDA installation at: ${CUDA_HOME}"
# Also add to PATH if needed
echo "${CUDA_HOME}/bin" >> $GITHUB_PATH
- name: Verify CUDA installation
run: |
nvcc -V
echo "CUDA_HOME: ${CUDA_HOME}"
ls -la ${CUDA_HOME}/bin
echo "PATH: $PATH"
pwd
ls . -alh
ls cutlass -alh
ls gemm_int8 -alh
- name: Build wheel
run: bash .github/scripts/real-build.sh
env:
CUDA_PATH: ${CUDA_HOME}
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: wheel
path: dist/*.whl
retention-days: 7
publish-release:
needs: build-with-cuda
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' # Only run on main branch
permissions:
contents: write
steps:
- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
name: wheel
path: wheels/
- name: List wheels
run: ls -la wheels/
- name: Create/Update Release
uses: softprops/action-gh-release@v2.0.8
with:
files: wheels/*.whl
prerelease: true
name: Latest Build from main
tag_name: continuous-release
make_latest: true
draft: false
target_commitish: ${{ github.sha }}