maint: bump sphinx from 8.0.2 to 8.1.3 #1931
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
# check spelling, codestyle | |
name: GitHub CI | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
env: | |
MAIN_PYTHON_VERSION: '3.10' | |
PACKAGE_NAME: 'ansys-math-core' | |
PACKAGE_NAMESPACE: 'ansys.math.core' | |
MAPDL_PACKAGE: ghcr.io/ansys/mapdl | |
MAPDL_IMAGE_VERSION_DOCS_BUILD: v24.1-ubuntu-student | |
DOCUMENTATION_CNAME: 'math.docs.pyansys.com' | |
PYMAPDL_START_INSTANCE: FALSE | |
PYANSYS_OFF_SCREEN: True | |
PYMAPDL_PORT: 21000 # default won't work on GitHub runners | |
PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners | |
USE_CACHE: true | |
RESET_PIP_CACHE: 0 | |
RESET_AUTOSUMMARY_CACHE: 0 | |
RESET_EXAMPLES_CACHE: 0 | |
RESET_DOC_BUILD_CACHE: 0 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
update-changelog: | |
name: "Update CHANGELOG (on release)" | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- uses: ansys/actions/doc-deploy-changelog@v8 | |
with: | |
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | |
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} | |
code-style: | |
name: "Code style" | |
runs-on: ubuntu-latest | |
steps: | |
- name: PyAnsys code style checks | |
uses: ansys/actions/code-style@v8 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
doc-style: | |
name: "Documentation Style Check" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "PyAnsys documentation style checks" | |
uses: ansys/actions/doc-style@v8 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
smoke-tests: | |
name: "Build and Smoke tests" | |
runs-on: ${{ matrix.os }} | |
needs: [code-style] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
python-version: ['3.10', '3.11', '3.12'] | |
# Only perform wheelhouse builds for Windows and macOS when releasing | |
should-release: | |
- ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }} | |
exclude: | |
- should-release: false | |
os: macos-latest | |
- should-release: false | |
os: windows-latest | |
steps: | |
- name: "Build wheelhouse and perform smoke test" | |
uses: ansys/actions/build-wheelhouse@v8 | |
with: | |
library-name: ${{ env.PACKAGE_NAME }} | |
operating-system: ${{ matrix.os }} | |
python-version: ${{ matrix.python-version }} | |
check-vulnerabilities-dev: | |
name: "Check library vulnerabilities (development mode)" | |
if: github.ref != 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check library vulnerabilities with development mode" | |
uses: ansys/actions/check-vulnerabilities@v8 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
python-package-name: ${{ env.PACKAGE_NAME }} | |
dev-mode: true | |
check-vulnerabilities-main: | |
name: "Check library vulnerabilities (default mode - only on main)" | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check library vulnerabilities with default mode" | |
uses: ansys/actions/check-vulnerabilities@v8 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
python-package-name: ${{ env.PACKAGE_NAME }} | |
build-test: | |
name: "Build and unit testing" | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
needs: [smoke-tests] | |
strategy: | |
matrix: | |
mapdl-version: [ | |
'v23.1-ubuntu', | |
'v23.2.0', | |
'v24.1-ubuntu-student', | |
] | |
outputs: | |
DISTRIBUTED_MODE: ${{ steps.distributed_mode.outputs.distributed_mode }} | |
steps: | |
- name: "Install Git and checkout project" | |
uses: actions/checkout@v4 | |
- name: "Login in Github Container registry" | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: "Pull, launch, and validate MAPDL service" | |
id: start_mapdl | |
env: | |
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
MAPDL_VERSION: ${{ env.MAPDL_IMAGE_VERSION_DOCS_BUILD }} | |
DISTRIBUTED_MODE: "dmp" | |
run: | | |
export INSTANCE_NAME=MAPDL_0 | |
.ci/start_mapdl.sh & export DOCKER_PID=$! | |
echo "Launching MAPDL service at PID: $DOCKER_PID" | |
echo "DOCKER_PID=$(echo $DOCKER_PID)" >> $GITHUB_OUTPUT | |
- name: "Setup Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: "Install OS packages" | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pandoc xvfb libgl1-mesa-glx | |
- name: "Cache pip" | |
if: env.USE_CACHE == true | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: Python-v${{ env.RESET_PIP_CACHE }}-${{ runner.os }}-${{ matrix.mapdl-version }}-${{ hashFiles('pyproject.toml') }} | |
restore-keys: | | |
Python-v${{ env.RESET_PIP_CACHE }}-${{ runner.os }}-${{ matrix.mapdl-version }} | |
- name: "Unit testing requirements installation" | |
run: | | |
python -m pip install .[tests] | |
- name: "Test virtual framebuffer" | |
run: | | |
xvfb-run python .ci/display_test.py | |
- name: "Retrieve PyMAPDL version" | |
id: version | |
run: | | |
echo "PYMAPDL_VERSION=$(python -c 'from ansys.mapdl.core import __version__; print(__version__)')" >> $GITHUB_OUTPUT | |
echo "PyMAPDL version is: $(python -c "from ansys.mapdl.core import __version__; print(__version__)")" | |
- name: "Waiting for the services to be up" | |
timeout-minutes: 15 | |
run: | | |
.ci/waiting_services.sh | |
- name: "Unit testing" | |
run: | | |
pytest -v --durations=10 --maxfail=10 \ | |
--reruns 7 --reruns-delay 3 --only-rerun MapdlExitedError --only-rerun EmptyRecordError \ | |
--cov=ansys.math.core --cov-report=xml:${{ matrix.mapdl-version }}-remote.xml \ | |
--cov-report=html --cov-report term | |
- name: "Upload coverage to Codecov" | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # required | |
name: ${{ matrix.mapdl-version }}-remote.xml | |
flags: remote,${{ matrix.mapdl-version }} | |
- name: "Upload coverage artifacts" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.mapdl-version }}-remote.xml | |
path: ./${{ matrix.mapdl-version }}-remote.xml | |
- name: "Display Docker files structures" | |
if: always() | |
env: | |
MAPDL_INSTANCE: MAPDL_0 | |
LOG_NAMES: logs-build-tests-${{ matrix.mapdl-version }} | |
run: | | |
.ci/display_logs.sh | |
- name: "Collect MAPDL logs on failure" | |
if: always() | |
env: | |
MAPDL_VERSION: ${{ env.MAPDL_IMAGE_VERSION_DOCS_BUILD }} | |
MAPDL_INSTANCE: MAPDL_0 | |
LOG_NAMES: logs-build-tests-${{ matrix.mapdl-version }} | |
run: | | |
.ci/collect_mapdl_logs.sh | |
- name: "Tar logs" | |
if: always() | |
run: | | |
cp log.txt ./logs-build-tests-${{ matrix.mapdl-version }}/ | |
tar cvzf ./logs-build-tests-${{ matrix.mapdl-version }}.tgz ./logs-build-tests-${{ matrix.mapdl-version }} | |
- name: "Upload logs to GitHub" | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-build-tests-${{ matrix.mapdl-version }}.tgz | |
path: ./logs-build-tests-${{ matrix.mapdl-version }}.tgz | |
- name: "Display MAPDL Logs" | |
if: always() | |
run: cat log.txt | |
doc-build: | |
name: "Doc building" | |
runs-on: ubuntu-latest | |
needs: [doc-style] | |
outputs: | |
ANSYSMATH_VERSION: ${{ steps.version.outputs.ANSYSMATH_VERSION }} | |
env: | |
PYMAPDL_PORT: 21000 # default won't work on GitHub runners | |
PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners | |
PYMAPDL_START_INSTANCE: FALSE | |
steps: | |
- name: "Install Git and checkout project" | |
uses: actions/checkout@v4 | |
- name: "Login in Github container registry" | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: "Pull, launch, and validate MAPDL service" | |
id: start_mapdl | |
env: | |
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }} | |
MAPDL_VERSION: ${{ env.MAPDL_IMAGE_VERSION_DOCS_BUILD }} | |
DISTRIBUTED_MODE: "dmp" | |
run: | | |
export INSTANCE_NAME=MAPDL_0 | |
.ci/start_mapdl.sh &> mapdl_launch.log & export DOCKER_PID=$! | |
echo "Launching MAPDL service at PID: $DOCKER_PID" | |
echo "DOCKER_PID=$(echo $DOCKER_PID)" >> $GITHUB_OUTPUT | |
- name: "Setup Python" | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: "Cache pip" | |
if: env.USE_CACHE == true | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }} | |
restore-keys: | | |
Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }} | |
- name: "Install ansys-math-core and documentation requirements" | |
run: | | |
pip install .[doc] | |
- name: "Retrieve AnsysMath version" | |
id: version | |
run: | | |
echo "ANSYSMATH_VERSION=$(python -c 'from ansys.math.core import __version__; print(__version__)')" >> $GITHUB_OUTPUT | |
echo "AnsysMath version is: $(python -c "from ansys.math.core import __version__; print(__version__)")" | |
- name: "Cache examples" | |
if: env.USE_CACHE == true | |
uses: actions/cache@v4 | |
with: | |
path: doc/source/examples | |
key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }}-${{ github.sha }} | |
restore-keys: | | |
Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }} | |
- name: "Cache docs build directory" | |
if: env.USE_CACHE == true | |
uses: actions/cache@v4 | |
with: | |
path: doc/_build | |
key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }}-${{ github.sha }} | |
restore-keys: | | |
doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }} | |
- name: "Cache autosummary" | |
if: env.USE_CACHE == true | |
uses: actions/cache@v4 | |
with: | |
path: doc/source/**/_autosummary/*.rst | |
key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }}-${{ github.sha }} | |
restore-keys: | | |
autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ steps.version.outputs.ANSYSMATH_VERSION }} | |
- name: "Waiting for the services to be up" | |
timeout-minutes: 15 | |
run: | | |
.ci/waiting_services.sh | |
- name: "Run Ansys documentation building action" | |
uses: ansys/actions/doc-build@v8 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
skip-install: true | |
checkout: false | |
sphinxopts: -j auto --keep-going | |
requires-xvfb: true | |
dependencies: pandoc | |
check-links: false | |
- name: "Display Docker files structures" | |
if: always() | |
env: | |
MAPDL_INSTANCE: MAPDL_0 | |
LOG_NAMES: logs-build-docs | |
run: | | |
.ci/display_logs.sh | |
- name: "Collect MAPDL logs on failure" | |
if: always() | |
env: | |
MAPDL_VERSION: ${{ env.MAPDL_IMAGE_VERSION_DOCS_BUILD }} | |
MAPDL_INSTANCE: MAPDL_0 | |
LOG_NAMES: logs-build-docs | |
run: | | |
.ci/collect_mapdl_logs.sh | |
- name: "Tar logs" | |
if: always() | |
run: | | |
cp -f doc/_build/latex/*.log ./logs-build-docs/ | |
cp log.txt ./logs-build-docs/ | |
tar cvzf ./logs-build-docs.tgz ./logs-build-docs | |
- name: "Upload logs to GitHub" | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs-build-docs.tgz | |
path: ./logs-build-docs.tgz | |
- name: "Display MAPDL Logs" | |
if: always() | |
run: cat log.txt | |
package: | |
name: "Package library" | |
needs: [doc-build, build-test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Build library source and wheel artifacts" | |
uses: ansys/actions/build-library@v8 | |
with: | |
library-name: ${{ env.PACKAGE_NAME }} | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
doc-deploy-dev: | |
name: "Deploy development documentation" | |
# Deploy development only when merging to main | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: [check-vulnerabilities-main, package] | |
steps: | |
- name: "Deploy the latest documentation" | |
uses: ansys/actions/doc-deploy-dev@v8 | |
with: | |
cname: ${{ env.DOCUMENTATION_CNAME }} | |
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | |
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} | |
release: | |
name: "Release project to public PyPI and GitHub" | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | |
needs: [package, update-changelog] | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Release to the public PyPI repository" | |
uses: ansys/actions/release-pypi-public@v8 | |
with: | |
library-name: ${{ env.PACKAGE_NAME }} | |
twine-username: "__token__" | |
twine-token: ${{ secrets.PYPI_TOKEN }} | |
- name: "Release to GitHub" | |
uses: ansys/actions/release-github@v8 | |
with: | |
library-name: ${{ env.PACKAGE_NAME }} | |
doc-deploy-stable: | |
name: "Deploy stable documentation" | |
# Deploy release documentation when creating a new tag | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
needs: [release] | |
steps: | |
- name: "Deploy the stable documentation" | |
uses: ansys/actions/doc-deploy-stable@v8 | |
with: | |
cname: ${{ env.DOCUMENTATION_CNAME }} | |
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} | |
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }} | |
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }} |