Nightly #489
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: Nightly | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Runs at midnight every night | |
| workflow_dispatch: # Enables manual triggering of the workflow | |
| jobs: | |
| tests: | |
| strategy: | |
| matrix: | |
| python: ["3.10", "3.13"] | |
| uses: ./.github/workflows/testing.yml | |
| with: | |
| python: ${{ matrix.python }} | |
| args: -m "smoke or sanity" | |
| ui-tests: | |
| uses: ./.github/workflows/ui-testing.yml | |
| build-and-publish: | |
| needs: [tests] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python: ["3.10"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: pdm-project/setup-pdm@v4 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - name: Install dependencies | |
| run: | | |
| pip install tox tox-pdm | |
| - name: Build the package | |
| run: | | |
| export GUIDELLM_BUILD_TYPE=nightly | |
| tox -e build | |
| - name: Find wheel artifact | |
| id: find-asset-whl | |
| run: | | |
| echo "::set-output name=asset::$(find dist -name '*.whl')" | |
| - name: Find tar.gz artifact | |
| id: find-asset-targz | |
| run: | | |
| echo "::set-output name=asset::$(find dist -name '*.tar.gz')" | |
| - name: Push wheel to PyPI | |
| uses: neuralmagic/nm-actions/actions/[email protected] | |
| with: | |
| username: ${{ secrets.PYPI_PUBLIC_USER }} | |
| password: ${{ secrets.PYPI_PUBLIC_AUTH }} | |
| whl: ${{ steps.find-asset-whl.outputs.asset }} | |
| - name: Push tar.gz to PyPI | |
| uses: neuralmagic/nm-actions/actions/[email protected] | |
| with: | |
| username: ${{ secrets.PYPI_PUBLIC_USER }} | |
| password: ${{ secrets.PYPI_PUBLIC_AUTH }} | |
| whl: ${{ steps.find-asset-targz.outputs.asset }} | |
| - name: Upload build artifacts | |
| id: artifact-upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nightly-build-artifacts | |
| path: dist/* | |
| compression-level: 6 | |
| if-no-files-found: error | |
| retention-days: 30 | |
| - name: Log artifact location | |
| run: | | |
| echo "Artifacts uploaded to: ${{ steps.artifact-upload.outputs.artifact-url }}" | |
| publish-ui-build: | |
| needs: [ui-tests] | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: "Set GIT_TAG" | |
| id: vars | |
| run: | | |
| if [ -z "${{ github.ref_name }}" ]; then | |
| echo "TAG=latest" >> $GITHUB_ENV | |
| else | |
| echo "TAG=${{ github.ref_name }}" >> $GITHUB_ENV | |
| fi | |
| - name: Build app to root | |
| id: build | |
| run: | | |
| # Export vars to ensure they are loaded before build | |
| export $(grep -v '^#' .env.staging | xargs) | |
| # Set asset prefix and base path with git tag | |
| ASSET_PREFIX=https://blog.vllm.ai/guidellm/ui/nightly | |
| BASE_PATH=/ui/nightly | |
| GIT_SHA=${{ github.sha }} | |
| export ASSET_PREFIX=${ASSET_PREFIX} | |
| export BASE_PATH=${BASE_PATH} | |
| export GIT_SHA=${GIT_SHA} | |
| npm run build | |
| - name: Update latest build in GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./src/ui/out | |
| destination_dir: ui/nightly | |
| keep_files: false | |
| user_name: ${{ github.actor }} | |
| user_email: ${{ github.actor }}@users.noreply.github.com | |
| publish_branch: gh-pages | |
| build-and-push-container: | |
| needs: [tests] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Buildah build | |
| id: build-image | |
| uses: redhat-actions/buildah-build@v2 | |
| with: | |
| image: ${{ github.event.repository.name }} | |
| build-args: | | |
| GUIDELLM_BUILD_TYPE=nightly | |
| tags: nightly | |
| containerfiles: | | |
| ./Containerfile | |
| - name: Push To ghcr.io | |
| id: push-to-ghcr | |
| uses: redhat-actions/push-to-registry@v2 | |
| with: | |
| image: ${{ steps.build-image.outputs.image }} | |
| tags: ${{ steps.build-image.outputs.tags }} | |
| username: ${{ github.actor }} | |
| password: ${{ github.token }} | |
| registry: ghcr.io/${{ github.repository_owner }} |