Update linux-conda.yml #14
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: Build Matrixconverters for Linux | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
tags: | |
- '[vV][0-9]+(\.[0-9]+)*([-\.]\S+)?' | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
matrix: | |
python-version: [3.8, 3.9, '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup base conda for Python 3.11 | |
uses: s-weigand/setup-conda@v1 | |
with: | |
update-conda: true | |
python-version: 3.11 | |
conda-channels: MaxBo, conda-forge, defaults | |
- name: Install dependencies and set channels | |
run: | | |
conda install conda-build conda-verify anaconda-client twine readme_renderer | |
conda create -q -n test-environment python=${{ matrix.python-version }} pytest-cov | |
- name: Build and test matrixconverters | |
run: | | |
export TMPDIR=${{ runner.TEMP }} | |
export CONDA_BLD_PATH=$TMPDIR | |
conda build --python ${{ matrix.python-version }} matrixconverters/conda.recipe | |
- name: Create Docs | |
if: ${{ matrix.python-version == '3.12' }} | |
run: | | |
/usr/share/miniconda/bin/conda shell.bash activate test-environment | |
export PATH=$HOME/.local/bin:$PATH | |
cd matrixconverters | |
pip install sphinx sphinxcontrib-napoleon sphinx-autodoc-typehints 'mistune<2' m2r2 | |
pip install . | |
sphinx-apidoc -f --separate -o docs_rst/matrixconverters src/matrixconverters | |
sphinx-build docs_rst ../docs | |
- name: Deploy Docs to gh-pages | |
if: ${{ matrix.python-version == '3.12' }} | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: docs # The folder the action should deploy. | |
- name: Upload files for matrixconverters | |
env: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_GITHUBACTION_TOKEN }} | |
ANACONDA_USERNAME: MaxBo | |
CONDA_BLD_PATH: ${{ runner.TEMP }} | |
run: | | |
/usr/share/miniconda/bin/conda shell.bash activate test-environment | |
export PATH=$HOME/.local/bin:$PATH | |
anaconda -t $ANACONDA_TOKEN upload --skip-existing --user $ANACONDA_USERNAME $CONDA_BLD_PATH/linux-64/matrixconverters-*.tar.bz2 | |