Skip to content

Blackjax v1.1.0

Blackjax v1.1.0 #35

Workflow file for this run

name: Release
on:
release:
types:
- created
jobs:
release-job:
name: Build and publish on PyPi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Build sdist and wheel
run: |
python -m pip install -U pip
python -m pip install build
python -m build
- name: Check that the package version matches the Release name
run: |
grep -Rq "^Version: ${GITHUB_REF:10}$" blackjax.egg-info/PKG-INFO
- name: Check sdist install and imports
run: |
mkdir -p test-sdist
cd test-sdist
python -m venv venv-sdist
venv-sdist/bin/python -m pip install ../dist/blackjax-*.tar.gz
venv-sdist/bin/python -c "import blackjax"
- name: Check wheel install and imports
run: |
mkdir -p test-wheel
cd test-wheel
python -m venv venv-wheel
venv-wheel/bin/python -m pip install ../dist/blackjax-*.whl
venv-wheel/bin/python -c "import blackjax"
- name: Publish to PyPi
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
test-install-job:
name: Test install from PyPi
needs: release-job
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Give PyPI some time to update the index
run: sleep 240
- name: Attempt install from PyPI
run: |
pip install blackjax==${GITHUB_REF:10}