Skip to content

Commit

Permalink
Migrate wheel yml
Browse files Browse the repository at this point in the history
  • Loading branch information
mthrok committed Sep 3, 2024
1 parent 6f5bcc0 commit 1aaf9b4
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 57 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build_wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Wheel"

on:
workflow_dispatch:
pull_request:
paths-ignore:
- "docs/**"
- "examples/**"
- "*.md"
branches:
- main
push:
paths-ignore:
- "docs/**"
- "examples/**"
- "*.md"
branches:
- main

jobs:
#############################################################################
# linux (CUDA-12.1)
#############################################################################
linux-py312-cu121:
name: "Ubuntu (Python 3.12, CUDA 12.1)"
uses: ./.github/workflows/wheel_build_cuda.yml
with:
python-version: "cp312-cp312"
cu-version: "12.1"

linux-py311-cu121:
name: "Ubuntu (Python 3.11, CUDA 12.1)"
uses: ./.github/workflows/wheel_build_cuda.yml
with:
python-version: "cp311-cp311"
cu-version: "12.1"

linux-py310-cu121:
name: "Ubuntu (Python 3.10, CUDA 21.1)"
uses: ./.github/workflows/wheel_build_cuda.yml
with:
python-version: "cp310-cp310"
cu-version: "12.1"
run-test: true
57 changes: 0 additions & 57 deletions .github/workflows/build_wheel_cuda.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/wheel_build_cuda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build Wheel

on:
workflow_call:
inputs:
os-build:
type: string
default: "ubuntu-latest"
os-test:
type: string
default: "4-core-ubuntu-gpu-t4"
python-version:
required: true
type: string
run-test:
type: boolean
default: false
cu-version:
required: true
type: string

jobs:
build:
runs-on: ${{ inputs.os-build }}
container:
image: pytorch/manylinux2_28-builder:cuda${{ inputs.cu-version }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Build Wheel
env:
CUDACXX: "/usr/local/cuda-${{ inputs.cu-version }}/bin/nvcc"
SPDL_USE_CUDA: "1"
SPDL_USE_NVCODEC: "1"
SPDL_USE_NVJPEG: "1"
SPDL_USE_NPPI: "1"
SPDL_LINK_STATIC_NVJPEG: "0"
SPDL_USE_TRACING: "1"
SPDL_BUILD_STUB: "0"
run: |
python3 -m pip uninstall -y cmake
./packaging/build_wheel.sh ${{ inputs.python-version }}
./packaging/audit_wheel.sh
- uses: actions/upload-artifact@v4
with:
name: spdl.manylinux.${{ inputs.python-version }}.${{ inputs.cu-version }}
path: ./wheelhouse
if-no-files-found: error
retention-days: 1
overwrite: true

0 comments on commit 1aaf9b4

Please sign in to comment.