add python 3.12 #51
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: Github Actions (Pypi and Conda for Linux) | |
on: [push] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 5 | |
matrix: | |
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup base conda for Python 3.7 | |
uses: s-weigand/setup-conda@v1 | |
with: | |
update-conda: true | |
python-version: 3.7 | |
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 info -a | |
conda create -q -n test-environment python=${{ matrix.python-version }} pytest-cov | |
- name: Build and Test cythoninstallhelpers for Python ${{ matrix.python-version }} | |
run: | | |
export TMPDIR=${{ runner.TEMP }} | |
export CONDA_BLD_PATH=$TMPDIR | |
conda info -a | |
conda build --python ${{ matrix.python-version }} cythoninstallhelpers/conda.recipe | |
- name: Upload cythoninstallhelpers | |
env: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_GITHUBACTION_TOKEN }} | |
ANACONDA_USERNAME: MaxBo | |
#TWINE_REPOSITORY: pypi | |
#TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/ | |
#TWINE_USERNAME: MaxBo | |
#TWINE_PASSWORD: ${{ secrets.TWINE_GITHUBACTION_TOKEN }} | |
CONDA_BLD_PATH: ${{ runner.TEMP }} | |
#if: ${{ github.ref_type == 'TAG' }} | |
run: | | |
conda info --envs | |
/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/cythoninstallhelpers-*.tar.bz2 | |
- name: Build and test cythonarrays and matrixconverters | |
run: | | |
export TMPDIR=${{ runner.TEMP }} | |
export CONDA_BLD_PATH=$TMPDIR | |
conda install -c maxbo cythoninstallhelpers | |
conda build --python ${{ matrix.python-version }} cythonarrays/conda.recipe | |
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 | |
conda install -y --use-local cythoninstallhelpers cythonarrays matrixconverters | |
python -m pip install sphinx sphinxcontrib-napoleon sphinx-autodoc-typehints 'mistune<2' m2r2 | |
sphinx-apidoc -f --separate -o docs_rst/cythoninstallhelpers cythoninstallhelpers/src/cythoninstallhelpers | |
sphinx-apidoc -f --separate -o docs_rst/cythonarrays cythonarrays/src/cythonarrays | |
sphinx-apidoc -f --separate -o docs_rst/matrixconverters matrixconverters/src/matrixconverters | |
sphinx-build docs_rst ../docs | |
- name: Deploy Docs to gh-pages | |
if: ${{ matrix.python-version == '3.12' }} | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: ../docs # The folder the action should deploy. | |
- name: Upload files for cythonarrays and matrixconverters | |
env: | |
ANACONDA_TOKEN: ${{ secrets.ANACONDA_GITHUBACTION_TOKEN }} | |
ANACONDA_USERNAME: MaxBo | |
#TWINE_REPOSITORY: pypi | |
#TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/ | |
#TWINE_USERNAME: MaxBo | |
#TWINE_PASSWORD: ${{ secrets.TWINE_GITHUBACTION_TOKEN }} | |
CONDA_BLD_PATH: ${{ runner.TEMP }} | |
#if: ${{ github.ref_type == 'TAG' }} | |
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/cythonarrays-*.tar.bz2 | |
anaconda -t $ANACONDA_TOKEN upload --skip-existing --user $ANACONDA_USERNAME $CONDA_BLD_PATH/linux-64/matrixconverters-*.tar.bz2 | |