name: Test dynamic matrix on: workflow_dispatch: jobs: create_matrix: name: Create Matrix runs-on: ubuntu-latest outputs: matrix: ${{ steps.create_matrix.outputs.matrix }} steps: - uses: actions/checkout@v4 - name: Create Matrix id: create_matrix run: | python create_matrix.py | tee /tmp/matrix.json echo "matrix=$(cat /tmp/matrix.json)" >> $GITHUB_OUTPUT # ######################################################### # Linux # ######################################################### build_wheels_linux: name: Build Linux runs-on: ubuntu-latest needs: [create_matrix] if: ${{ fromjson(needs.create_matrix.outputs.matrix).linux }} strategy: fail-fast: false matrix: flash-attn-version: ${{ fromjson(needs.create_matrix.outputs.matrix).linux.flash-attn-version }} python-version: ${{ fromjson(needs.create_matrix.outputs.matrix).linux.python-version }} torch-version: ${{ fromjson(needs.create_matrix.outputs.matrix).linux.torch-version }} cuda-version: ${{ fromjson(needs.create_matrix.outputs.matrix).linux.cuda-version }} exclude: ${{ fromjson(needs.create_matrix.outputs.matrix).exclude }} steps: - name: Test Linux run: | echo "Flash Attn Version: ${{ matrix.flash-attn-version }}" echo "Python Version: ${{ matrix.python-version }}" echo "Torch Version: ${{ matrix.torch-version }}" echo "CUDA Version: ${{ matrix.cuda-version }}" build_wheels_linux_self_hosted: name: Build Linux (self-hosted) runs-on: ubuntu-latest needs: [create_matrix] if: ${{ fromjson(needs.create_matrix.outputs.matrix).linux_self_hosted }} strategy: fail-fast: false matrix: flash-attn-version: ${{ fromjson(needs.create_matrix.outputs.matrix).linux_self_hosted.flash-attn-version }} python-version: ${{ fromjson(needs.create_matrix.outputs.matrix).linux_self_hosted.python-version }} torch-version: ${{ fromjson(needs.create_matrix.outputs.matrix).linux_self_hosted.torch-version }} cuda-version: ${{ fromjson(needs.create_matrix.outputs.matrix).linux_self_hosted.cuda-version }} exclude: ${{ fromjson(needs.create_matrix.outputs.matrix).exclude }} steps: - name: Test Linux (self-hosted) run: | echo "Flash Attn Version: ${{ matrix.flash-attn-version }}" echo "Python Version: ${{ matrix.python-version }}" echo "Torch Version: ${{ matrix.torch-version }}" echo "CUDA Version: ${{ matrix.cuda-version }}" update_release_notes: name: Update Release Notes needs: - build_wheels_linux - build_wheels_linux_self_hosted permissions: contents: write if: always() runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: python-version: 3.12