Skip to content

Changed version to 0.3.2 #166

Changed version to 0.3.2

Changed version to 0.3.2 #166

Workflow file for this run

on:
push:
branches:
- main
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
container:
image: python:3.11.5
options: --shm-size=8gb
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Package
run: |
python -mpip install .
python -mpip install setuptools wheel
python setup.py sdist bdist_wheel
- name: Upload Distribution as Artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*
- name: Test with pytest
run: |
pip install pytest pytest-cov importlib-resources
ulimit -n 4096
pytest -vvv
docs:
runs-on: ubuntu-latest
container:
image: python:3.11.5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
python -mpip install .
python -mpip install \
Sphinx \
pydata-sphinx-theme \
sphinx_design \
numpydoc \
sphinx_copybutton \
sphinx-tabs \
matplotlib
- name: Sphinx build
run: |
sphinx-build doc _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
pypi_release:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
# - name: Publish to PyPI
# if: success()
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
# run: |
# twine upload dist/*
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image on push
if: github.event_name == 'push'
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile_GPU
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/pytme:latest
- name: Build and push Docker image on release
if: github.event_name == 'release'
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile_GPU
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/pytme:${{ github.event.release.tag_name }}