Add support for pgf output #265
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: teeplot | |
on: | |
- push | |
- pull_request | |
- workflow_dispatch | |
jobs: | |
build: | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9, "3.10", 3.11, 3.12, 3.13] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox tox-gh-actions | |
# Install TeX distribution for PGF output from matplotlib | |
- name: Install TeX distribution for PGF output (Ubuntu) | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y texlive-latex-extra texlive-xetex | |
- name: Install TeX distribution for PGF output (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
choco install miktex -y | |
echo "C:\Program Files\MiKTeX\miktex\bin\x64" >> $env:GITHUB_PATH | |
- name: Install TeX distribution for PGF output (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
brew install --cask mactex-no-gui | |
echo "/Library/TeX/texbin" >> $GITHUB_PATH | |
- name: Test with tox | |
run: tox | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools wheel twine | |
- run: python setup.py sdist bdist_wheel | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |