Feature/UI ux eval dashboard #50
Workflow file for this run
This file contains hidden or 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: Publish Python distributions to PyPI | |
| on: | |
| push: | |
| branches: ["main", "canary", "refresh"] | |
| tags: | |
| - v* | |
| - RC* | |
| pull_request: | |
| merge_group: | |
| jobs: | |
| build-n-publish: | |
| name: Build and publish Python distributions to PyPI | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - uses: actions/checkout@main | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Create virtual environment and install build tools | |
| run: | | |
| python -m venv .venv | |
| venvPython=".venv/bin/python" | |
| venvPip=".venv/bin/pip" | |
| $venvPython -m pip install --upgrade pip | |
| $venvPip install build | |
| - name: Build a binary wheel and a source tarball | |
| run: | | |
| venvPython=".venv/bin/python" | |
| $venvPython -m build --sdist --wheel --outdir dist/ . | |
| version=$($venvPython setup.py --version) | |
| echo "VERSION=$version" >> $GITHUB_ENV | |
| - name: Test wheel | |
| run: | | |
| venvPython=".venv/bin/python" | |
| venvPip=".venv/bin/pip" | |
| venvLemonade=".venv/bin/lemonade-eval" | |
| $venvPython -m pip install --upgrade pip | |
| $venvPip install "dist/lemonade_sdk-${{ env.VERSION }}-py3-none-any.whl[oga-cpu]" | |
| $venvLemonade -i amd/Qwen2.5-0.5B-Instruct-quantized_int4-float16-cpu-onnx oga-load --device cpu --dtype int4 llm-prompt -p "Hello" --max-new-tokens 5 | |
| - name: Publish distribution package to PyPI | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} | |
| - name: Publish distribution package to Test PyPI | |
| if: startsWith(github.ref, 'refs/tags/RC') | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
| repository_url: https://test.pypi.org/legacy/ | |
| # This file was originally licensed under Apache 2.0. It has been modified. | |
| # Modifications Copyright (c) 2025 AMD |