Skip to content

v0.3.3 Release

v0.3.3 Release #31

Workflow file for this run

# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
name: Deploy
on:
release:
types: [created]
jobs:
tests-and-coverage:
runs-on: ubuntu-latest
strategy:
matrix:
botorch: ['latest', 'pinned']
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies (latest Botorch)
env:
ALLOW_BOTORCH_LATEST: true
ALLOW_LATEST_GPYTORCH_LINOP: true
run: |
# use latest Botorch
pip install git+https://github.com/cornellius-gp/gpytorch.git
pip install git+https://github.com/pytorch/botorch.git
pip install -e ".[unittest]"
if: matrix.botorch == 'latest'
- name: Install dependencies (pinned Botorch)
run: |
# will install the version of Botorch that is pinned in setup.py
pip install -e ".[unittest]"
if: matrix.botorch == 'pinned'
- name: Import Ax
run: |
python scripts/import_ax.py
- name: Tests
run: |
pytest -ra
publish-stable-website:
needs: tests-and-coverage # only run if test step succeeds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
# use stable Botorch
pip install -e ".[tutorial]"
- name: Publish latest website
env:
DOCUSAURUS_PUBLISH_TOKEN: ${{ secrets.DOCUSAURUS_PUBLISH_TOKEN }}
run: |
bash scripts/publish_site.sh -d -k python3 -v ${{ github.event.release.tag_name }}
deploy:
needs: tests-and-coverage # only run if test step succeeds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Install dependencies
run: |
# use stable Botorch
pip install -e ".[dev,mysql,notebook]"
pip install wheel
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Build wheel
run: |
python setup.py sdist bdist_wheel
- name: Deploy to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
verbose: true