Skip to content

bump python version for docs build #123

bump python version for docs build

bump python version for docs build #123

Workflow file for this run

name: CI
on: [push, pull_request]
permissions: read-all
jobs:
build:
strategy:
fail-fast: false
matrix:
config:
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
python-arch: 'x86_64'
python-version: '3.8'
numpy-version: '1.17.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
python-arch: 'x86_64'
python-version: '3.9'
numpy-version: '1.19.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
python-arch: 'x86_64'
python-version: '3.10'
numpy-version: '1.21.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
python-arch: 'x86_64'
python-version: '3.11'
numpy-version: '1.23.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_x86_64
python-arch: 'x86_64'
python-version: '3.12'
numpy-version: '1.26.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_aarch64
python-arch: 'aarch64'
python-version: '3.8'
numpy-version: '1.19.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_aarch64
python-arch: 'aarch64'
python-version: '3.9'
numpy-version: '1.19.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_aarch64
python-arch: 'aarch64'
python-version: '3.10'
numpy-version: '1.21.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_aarch64
python-arch: 'aarch64'
python-version: '3.11'
numpy-version: '1.23.*'
- os-image: ubuntu-latest
os-name: linux
docker-image: quay.io/pypa/manylinux2014_aarch64
python-arch: 'aarch64'
python-version: '3.12'
numpy-version: '1.26.*'
- os-image: macos-latest
os-name: mac
macos-min-version: '10.9'
python-arch: 'x86_64'
python-version: '3.8'
numpy-version: '1.17.*'
- os-image: macos-latest
os-name: mac
macos-min-version: '10.9'
python-arch: 'x86_64'
python-version: '3.9'
numpy-version: '1.19.*'
- os-image: macos-latest
os-name: mac
macos-min-version: '10.9'
python-arch: 'x86_64'
python-version: '3.10'
numpy-version: '1.21.*'
- os-image: macos-latest
os-name: mac
macos-min-version: '10.9'
python-arch: 'x86_64'
python-version: '3.11'
numpy-version: '1.23.*'
- os-image: macos-latest
os-name: mac
macos-min-version: '10.9'
python-arch: 'x86_64'
python-version: '3.12'
numpy-version: '1.26.*'
- os-image: windows-2019
os-name: windows
python-arch: 'x86_64'
python-version: '3.8'
numpy-version: '1.17.*'
- os-image: windows-2019
os-name: windows
python-arch: 'x86_64'
python-version: '3.9'
numpy-version: '1.19.*'
- os-image: windows-2019
os-name: windows
python-arch: 'x86_64'
python-version: '3.10'
numpy-version: '1.21.*'
- os-image: windows-2019
os-name: windows
python-arch: 'x86_64'
python-version: '3.11'
numpy-version: '1.23.*'
- os-image: windows-2019
os-name: windows
python-arch: 'x86_64'
python-version: '3.12'
numpy-version: '1.26.*'
runs-on: ${{ matrix.config.os-image }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up QEMU
if: matrix.config.python-arch == 'aarch64'
uses: docker/setup-qemu-action@v3
- name: Build wheels (Linux)
if: matrix.config.os-name == 'linux'
run: docker run --rm -e PYTHON_ARCH -e PYTHON_VERSION -e NUMPY_VERSION -v `pwd`:/io ${{ matrix.config.docker-image }} /io/.github/scripts/build-linux.sh
env:
PYTHON_ARCH: ${{ matrix.config.python-arch }}
PYTHON_VERSION: ${{ matrix.config.python-version }}
NUMPY_VERSION: ${{ matrix.config.numpy-version }}
- name: Build wheels (macOS)
if: matrix.config.os-name == 'mac'
run: .github/scripts/build-macos.sh
env:
MACOS_MIN_VERSION: ${{ matrix.config.macos-min-version }}
PYTHON_ARCH: ${{ matrix.config.python-arch }}
PYTHON_VERSION: ${{ matrix.config.python-version }}
NUMPY_VERSION: ${{ matrix.config.numpy-version }}
- name: Setup Python (Windows)
if: matrix.config.os-name == 'windows'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python-version }}
- name: Remove pre-installed vcpkg
if: matrix.config.os-name == 'windows'
run: |
rm -rf "$VCPKG_INSTALLATION_ROOT"
echo "VCPKG_INSTALLATION_ROOT=" >> $GITHUB_ENV
echo "VCPKG_ROOT=" >> $GITHUB_ENV
shell: bash
- name: Build wheels (Windows)
if: matrix.config.os-name == 'windows'
run: .github/scripts/build-windows.ps1
shell: pwsh
env:
PYTHON_VERSION: ${{ matrix.config.python-version }}
PYTHON_ARCH: ${{ matrix.config.python-arch }}
NUMPY_VERSION: ${{ matrix.config.numpy-version }}
- name: Store wheels as artifacts
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
docs:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Download wheels from artifact storage
uses: actions/download-artifact@v3
with:
name: wheels
path: dist
- name: Install lensfunpy from wheel
run: |
pip install dist/lensfunpy*cp310*manylinux*x86_64*.whl
pip install -r dev-requirements.txt
- name: Build docs
run: sphinx-build -b html docs dist-docs
- name: Store docs HTML as artifact
uses: actions/upload-artifact@v3
with:
name: docs
path: dist-docs
publish-wheels:
runs-on: ubuntu-latest
needs: [build, docs]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download wheels from artifact storage
uses: actions/download-artifact@v3
with:
name: wheels
path: dist
- name: Setup Python
uses: actions/setup-python@v4
- name: Upload wheels to PyPI
run: |
pip install twine
twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} --skip-existing dist/*
publish-docs:
runs-on: ubuntu-latest
needs: [publish-wheels]
permissions:
contents: write
steps:
- name: Download docs HTML from artifact storage
uses: actions/download-artifact@v3
with:
name: docs
path: dist-docs
- name: Upload docs to GitHub Pages
uses: peaceiris/actions-gh-pages@47a6d63ea8b47b19328e258563aa1fbe224c0a23
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./dist-docs