11name : Build and Release flashinfer-aot-modules wheels
22
33on :
4- workflow_dispatch :
5- inputs :
6- tag :
7- description : ' Tag (e.g., v1.2.3) to build wheels for'
8- required : true
9- type : string
4+ # workflow_dispatch:
5+ # inputs:
6+ # tag:
7+ # description: 'Tag (e.g., v1.2.3) to build wheels for'
8+ # required: true
9+ # type: string
10+
11+ pull_request :
12+ branches :
13+ - main
1014
1115env :
1216 FLASHINFER_CUDA_ARCH_LIST : " 7.5 8.0 8.9 9.0 10.0 10.3 12.0"
@@ -15,52 +19,52 @@ jobs:
1519 validate-tag :
1620 runs-on : ubuntu-latest
1721 steps :
18- - name : Validate tag format
19- run : |
20- if [[ ! "${{ inputs.tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([a-z0-9]+)?$ ]]; then
21- echo "Error: Tag '${{ inputs.tag }}' does not match the expected format (e.g., v1.2.3 or v1.2.3.post1 or v1.2.3rc1)"
22- exit 1
23- fi
24- echo "✓ Tag format is valid: ${{ inputs.tag }}"
25-
26- - name : Check out tag
27- uses : actions/checkout@v4
28- with :
29- ref : ${{ inputs.tag }}
30- submodules : true
31-
32- - name : Verify tag matches version.txt
33- run : |
34- # Extract version from tag (remove 'v' prefix)
35- TAG_VERSION="${{ inputs.tag }}"
36- TAG_VERSION="${TAG_VERSION#v}"
37-
38- # Check version.txt - this is the source of truth
39- if [ ! -f "version.txt" ]; then
40- echo "Error: version.txt file not found!"
41- exit 1
42- fi
43-
44- VERSION_TXT=$(cat version.txt | tr -d '[:space:]')
45-
46- if [ "$TAG_VERSION" != "$VERSION_TXT" ]; then
47- echo "❌ CRITICAL ERROR: version.txt does not match tag!"
48- echo " Tag version: $TAG_VERSION"
49- echo " version.txt: $VERSION_TXT"
50- echo ""
51- echo "Please update version.txt to match the release version before creating a release."
52- echo "The tag should be 'v$VERSION_TXT' (e.g., if version.txt contains '1.2.3', tag should be 'v1.2.3')"
53- exit 1
54- fi
55-
56- echo "✓ version.txt matches tag version: $VERSION_TXT"
22+ # - name: Validate tag format
23+ # run: |
24+ # if [[ ! "${{ inputs.tag }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+([a-z0-9]+)?$ ]]; then
25+ # echo "Error: Tag '${{ inputs.tag }}' does not match the expected format (e.g., v1.2.3 or v1.2.3.post1 or v1.2.3rc1)"
26+ # exit 1
27+ # fi
28+ # echo "✓ Tag format is valid: ${{ inputs.tag }}"
29+
30+ # - name: Check out tag
31+ # uses: actions/checkout@v4
32+ # with:
33+ # ref: ${{ inputs.tag }}
34+ # submodules: true
35+
36+ # - name: Verify tag matches version.txt
37+ # run: |
38+ # # Extract version from tag (remove 'v' prefix)
39+ # TAG_VERSION="${{ inputs.tag }}"
40+ # TAG_VERSION="${TAG_VERSION#v}"
41+
42+ # # Check version.txt - this is the source of truth
43+ # if [ ! -f "version.txt" ]; then
44+ # echo "Error: version.txt file not found!"
45+ # exit 1
46+ # fi
47+
48+ # VERSION_TXT=$(cat version.txt | tr -d '[:space:]')
49+
50+ # if [ "$TAG_VERSION" != "$VERSION_TXT" ]; then
51+ # echo "❌ CRITICAL ERROR: version.txt does not match tag!"
52+ # echo " Tag version: $TAG_VERSION"
53+ # echo " version.txt: $VERSION_TXT"
54+ # echo ""
55+ # echo "Please update version.txt to match the release version before creating a release."
56+ # echo "The tag should be 'v$VERSION_TXT' (e.g., if version.txt contains '1.2.3', tag should be 'v1.2.3')"
57+ # exit 1
58+ # fi
59+
60+ # echo "✓ version.txt matches tag version: $VERSION_TXT"
5761
5862 build-wheel :
5963 # needs: validate-tag
6064 strategy :
6165 fail-fast : false
6266 matrix :
63- cuda : ["129 "] # ['126 ', '128 ', '129 ', '130 ']
67+ cuda : ["12.9 "] # ['12.6 ', '12.8 ', '12.9 ', '13.0 ']
6468 arch : ["x86_64"] # ['x86_64', 'aarch64']
6569
6670 # Use self-hosted runners with specific labels based on architecture
@@ -69,31 +73,26 @@ jobs:
6973 steps :
7074 - uses : actions/checkout@v4
7175 with :
72- ref : ${{ inputs.tag }}
76+ # ref: ${{ inputs.tag }}
7377 submodules : true
7478
7579 - name : Build wheel in container
80+ env :
81+ DOCKER_IMAGE : ${{ matrix.arch == 'aarch64' && format('pytorch/manylinux2_28_aarch64-builder:cuda{0}', matrix.cuda) || format('pytorch/manylinux2_28_builder:cuda{0}', matrix.cuda) }}
7682 run : |
7783 chown -R $CI_UID:$CI_GID ${{ github.workspace }}
78- # Create output directory for wheels
79- mkdir -p ${{ github.workspace }}/wheel-output
8084
8185 # Run the build script inside the container with proper mounts
8286 docker run --rm \
8387 -v ${{ github.workspace }}:/workspace \
84- -v ${{ github.workspace }}/wheel-output:/output \
8588 -e CUDA_VERSION="${{ matrix.cuda }}" \
8689 -e ARCH="${{ matrix.arch }}" \
8790 -e FLASHINFER_CUDA_ARCH_LIST="${FLASHINFER_CUDA_ARCH_LIST}" \
88- -e OUTPUT_DIR="/output" \
8991 --user $CI_UID:$CI_GID \
9092 -w /workspace \
91- flashinfer/flashinfer-ci-cu ${{ matrix.cuda }} \
93+ ${{ env.DOCKER_IMAGE }} \
9294 bash /workspace/scripts/build_flashinfer_aot_modules_whl.sh
93-
94- # Move wheels to the expected location for artifact upload
95- mv wheel-output/* flashinfer-aot-modules/dist/ 2>/dev/null || true
96- timeout-minutes : 300
95+ timeout-minutes : 180
9796
9897 - name : Display wheel size
9998 run : du -h flashinfer-aot-modules/dist/*
0 commit comments