Files
flash-attention-prebuild-wh…/.github/workflows/_build_manylinux_self_host.yml
T
Junya Morioka df03c553f7 refactor: extract common build steps into reusable composite action
- Create .github/actions/build-and-upload composite action for shared build logic
- Consolidate Python/uv setup, CUDA setup, wheel building, testing, and upload steps
- Update _build_linux.yml to use new composite action (reduced from 136 to 69 lines)
- Update _build_linux_arm_self_host.yml to use composite action with cleanup enabled
- Update _build_linux_self_host.yml for both container and no-container jobs
- Update _build_manylinux_self_host.yml to use composite action
- Reduce code duplication by ~200+ lines across all workflow files
2025-12-21 03:36:44 +09:00

102 lines
2.7 KiB
YAML

# #########################################################
# Build wheels with self-hosted runner
# #########################################################
name: "[manylinux x86_64, self-hosted] Build wheels and upload to GitHub Releases"
on:
workflow_call:
inputs:
flash-attn-version:
description: "Flash-Attention version"
required: true
type: string
python-version:
description: "Python version"
required: true
type: string
torch-version:
description: "PyTorch version"
required: true
type: string
cuda-version:
description: "CUDA version"
required: true
type: string
runner:
description: "Runner type"
required: false
type: string
default: '["self-hosted"]'
is-upload:
description: "Whether to upload the release asset"
required: false
type: boolean
default: true
container-image:
description: "Container image"
required: false
type: string
default: "quay.io/pypa/manylinux_2_28_x86_64"
jobs:
build_wheels_self_hosted:
name: Build wheels and Upload (manylinux x86_64, self-hosted runner)
runs-on: ${{ fromjson(inputs.runner) }}
container:
image: ${{ inputs.container-image }}
defaults:
run:
shell: bash
env:
TERM: xterm-256color
timeout-minutes: 2160
steps:
- name: Install tools
shell: bash
run: |
dnf install -y \
curl \
ca-certificates \
sudo \
wget \
unzip \
zip \
git \
gcc \
gcc-c++ \
clang \
ninja-build \
time \
patchelf
- name: Configure sudo
shell: bash
run: |
echo "root ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
- name: Install gh
shell: bash
run: |
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf -y install gh --repo gh-cli
- uses: actions/checkout@v4
- name: Configure Git safe directory
shell: bash
run: |
git config --global --add safe.directory $(pwd)
- name: Build and upload wheels
uses: ./.github/actions/build-and-upload
with:
flash-attn-version: ${{ inputs.flash-attn-version }}
python-version: ${{ inputs.python-version }}
torch-version: ${{ inputs.torch-version }}
cuda-version: ${{ inputs.cuda-version }}
is-upload: ${{ inputs.is-upload }}
cleanup: "true"