Wheels #156
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wheels | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 2 * * *" | |
jobs: | |
Build-Wheels: | |
runs-on: [self-hosted, V100] | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Azure CLI | |
run: | | |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash | |
- name: Azure login | |
uses: azure/login@v1 | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- id: generate-token | |
name: Generate token | |
run: | | |
AZ_TOKEN=$(az account get-access-token --query accessToken) | |
echo "::add-mask::$AZ_TOKEN" | |
echo "access_token=$AZ_TOKEN" >> "$GITHUB_OUTPUT" | |
- name: Patch setup.py | |
run: | | |
sed -i 's/name\=\"triton\"/name="triton-nightly"/g' python/setup.py | |
export LATEST_DATE=$(TZ=UTC0 git show --quiet --date='format-local:%Y%m%d%H%M%S' --format="%cd") | |
sed -i -r "s/version\=\"(.*)\"/version=\"\1-dev"$LATEST_DATE"\"/g" python/setup.py | |
echo "" >> python/setup.cfg | |
echo "[build_ext]" >> python/setup.cfg | |
echo "base-dir=/project" >> python/setup.cfg | |
- name: Build wheels | |
run: | | |
export CIBW_MANYLINUX_X86_64_IMAGE="quay.io/pypa/manylinux2014_x86_64:latest" | |
#export CIBW_MANYLINUX_PYPY_X86_64_IMAGE="quay.io/pypa/manylinux2014_x86_64:latest" | |
export CIBW_BEFORE_BUILD="pip install cmake;" | |
export CIBW_SKIP="{cp,pp}{35,36}-*" | |
export CIBW_BUILD="{cp,pp}3*-manylinux_x86_64" | |
python3 -m cibuildwheel python --output-dir wheelhouse | |
- name: Publish wheels to Azure DevOps | |
run: | | |
python3 -m twine upload -r Triton-Nightly -u TritonArtifactsSP -p ${{ steps.generate-token.outputs.access_token }} --config-file utils/nightly.pypirc --non-interactive --verbose wheelhouse/* |