DLCPosVideo
: Use provided epoch, multithread matplotlib
#1479
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
name: Test package building | |
on: | |
push: | |
branches: | |
- master | |
- maint/* | |
- '!test_branch' | |
- '!documentation' | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- master | |
- maint/* | |
workflow_dispatch: # Manually trigger with 'Run workflow' button | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- run: | | |
pip install --upgrade build twine | |
pip install importlib_metadata==7.2.1 # twine #977 | |
- name: Build sdist and wheel | |
run: python -m build | |
- run: twine check dist/* | |
- name: Upload sdist and wheel artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
- name: Build git archive | |
run: mkdir archive && git archive -v -o archive/archive.tgz HEAD | |
- name: Upload git archive artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: archive | |
path: archive/ | |
test-package: | |
runs-on: ubuntu-latest | |
needs: [build] | |
strategy: | |
matrix: | |
package: ['wheel', 'sdist', 'archive'] | |
steps: | |
- name: Download sdist and wheel artifacts | |
if: matrix.package != 'archive' | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
- name: Download git archive artifact | |
if: matrix.package == 'archive' | |
uses: actions/download-artifact@v4 | |
with: | |
name: archive | |
path: archive/ | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Display Python version | |
run: python -c "import sys; print(sys.version)" | |
- name: Update pip | |
run: pip install --upgrade pip | |
- name: Install wheel | |
if: matrix.package == 'wheel' | |
run: pip install dist/*.whl | |
- name: Install sdist | |
if: matrix.package == 'sdist' | |
run: pip install dist/*.tar.gz | |
- name: Install archive # requires tag | |
if: matrix.package == 'archive' && startsWith(github.ref, 'refs/tags/') | |
run: pip install archive/archive.tgz | |
publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
needs: [test-package] | |
environment: | |
name: pypi | |
url: https://pypi.org/p/spyglass-neuro | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |