update HISTORY.rst #37
Workflow file for this run
This file contains 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Build and test the python package | |
on: | |
push: | |
branches: | |
- 'releases/**' | |
jobs: | |
build: | |
name: Build whl from source | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.9 | |
- name: Get tags | |
run: git fetch --tags origin | |
- name: Install pypa/build | |
run: >- | |
python -m | |
pip install | |
build wheel | |
--user | |
- name: Build a binary wheel and a source tarball | |
run: | | |
echo `pwd` | |
echo `git describe --tags` | |
python setup.py -q sdist bdist_wheel --universal | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist-pip-whl | |
path: | | |
dist | |
test-the-wheel: | |
name: Install whl and run demo | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Dump GitHub context | |
id: github_context_step | |
run: echo '${{ toJSON(github) }}' | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.9 | |
- name: Download the whl | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist-pip-whl | |
- name: Install tensorboardX from whl | |
run: pip install tensorboardX*.whl | |
- name: Install torch torchvision for demo | |
run: pip install torch torchvision | |
- name: Print version | |
run: python -c "import tensorboardX; print(tensorboardX.__version__)" | |
- name: Run examples | |
run: | | |
cd examples | |
python demo.py | |
- name: Archive demo artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: demo-results | |
path: | | |
examples/runs | |