mirror of
https://github.com/ROCm/ROCm.git
synced 2026-02-21 03:00:39 -05:00
[PUBLISHING] Enable nightlies on Azure DevOps (#1729)
This reenables nightly builds and uploads them to a public AzDO, where you can use pip to install a specific version or the latest as normal. For example: `python -m pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/ triton-nightly`
This commit is contained in:
committed by
GitHub
parent
dd2d5f417f
commit
035381aa28
30
.github/workflows/wheels.yml
vendored
30
.github/workflows/wheels.yml
vendored
@@ -1,24 +1,41 @@
|
||||
name: Wheels
|
||||
on:
|
||||
workflow_dispatch:
|
||||
#schedule:
|
||||
# - cron: "0 0 * * *"
|
||||
schedule:
|
||||
- cron: "0 2 * * *"
|
||||
|
||||
jobs:
|
||||
|
||||
Build-Wheels:
|
||||
|
||||
runs-on: [self-hosted, V100]
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- 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' --format="%cd")
|
||||
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
|
||||
@@ -33,7 +50,6 @@ jobs:
|
||||
export CIBW_BUILD="{cp,pp}3*-manylinux_x86_64 cp3*-musllinux_x86_64"
|
||||
python3 -m cibuildwheel python --output-dir wheelhouse
|
||||
|
||||
|
||||
- name: Upload wheels to PyPI
|
||||
- name: Publish wheels to Azure DevOps
|
||||
run: |
|
||||
python3 -m twine upload wheelhouse/* -u __token__ -p ${{ secrets.PYPY_API_TOKEN }}
|
||||
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/*
|
||||
|
||||
6
utils/nightly.pypirc
Normal file
6
utils/nightly.pypirc
Normal file
@@ -0,0 +1,6 @@
|
||||
[distutils]
|
||||
Index-servers =
|
||||
Triton-Nightly
|
||||
|
||||
[Triton-Nightly]
|
||||
Repository = https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/upload/
|
||||
Reference in New Issue
Block a user