Skip to content

Commit

Permalink
Working on some smoke testing
Browse files Browse the repository at this point in the history
  • Loading branch information
riedgar-ms committed May 10, 2024
1 parent c7bba78 commit 10b709e
Showing 1 changed file with 35 additions and 4 deletions.
39 changes: 35 additions & 4 deletions .github/workflows/pypi_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,9 @@ jobs:
name: sdist_files
path: dist/*.tar.gz

publish_wheels:
permissions:
id-token: write
name: Publish wheels on pypi

assemble_wheels:
name: Combine wheels
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
Expand All @@ -134,6 +133,38 @@ jobs:
path: ./dist/*
name: collected_dist_files

test_wheels:
name: Test Wheels
needs: [assemble_wheels]
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-12, macos-latest]
python-version: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/download-artifact@v4
with:
name: collected_dist_files
path: wheelhouse
- run: pip install guidance -f ./wheelhouse/
name: Install guidance from wheels
- run: pip install transformers torch
name: Other installs
- run: python -c "import guidance; lm = guidance.models.Transformers('gpt2'); lm += '1,2,3,4,5,' + gen('num', max_tokens=5); assert lm['num'].startswith("6")"
name: Run smoke test

publish_wheels:
permissions:
id-token: write
name: Publish wheels on pypi
needs: [test_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: collected_dist_files
path: wheelhouse

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags')
Expand Down

0 comments on commit 10b709e

Please sign in to comment.