Skip to content

build: bump sphinx from 7.4.7 to 8.1.3 #879

build: bump sphinx from 7.4.7 to 8.1.3

build: bump sphinx from 7.4.7 to 8.1.3 #879

Workflow file for this run

name: CI
on:
pull_request:
workflow_dispatch:
push:
tags:
- "*"
branches:
- main
env:
MAIN_PYTHON_VERSION: "3.10"
DOCUMENTATION_CNAME: 'twin.docs.pyansys.com'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
doc-style:
name: "Running documentation style checks"
runs-on: ubuntu-latest
steps:
- name: "Running documentation style checks"
uses: ansys/actions/doc-style@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
doc-build:
name: "Building library documentation"
runs-on: pytwin-win10
needs: doc-style
steps:
- name: "Install Git and clone project"
uses: actions/checkout@v4
- name: "Set up Python"
uses: ansys/actions/_setup-python@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
use-cache: true
- name: "Copy source files for DPF server installation"
shell: bash
run: |
cp -r ~ansys/Documents/devEnv/pyansys/pytwin/ansys_dpf_server_win_v2024.1.pre0/ ./
- name: "Create virtual environment and Install Python library"
run: |
python -m venv .venv --clear
.venv\Scripts\Activate.ps1
python -m pip install pip -U
python -m pip install poetry
poetry install
- name: "Install documentation dependencies, including DPF server"
run: |
.venv\Scripts\Activate.ps1
poetry install --with doc
cd ansys_dpf_server_win_v2024.1.pre0
pip install -e .
cd ..
- name: Setup headless display
uses: pyvista/setup-headless-display-action@v2
- name: "Clean documentation build folder"
run: |
.venv\Scripts\Activate.ps1
doc/make.bat clean
- name: "Build HTML documentation"
run: |
.venv\Scripts\Activate.ps1
doc/make.bat html
env:
ANSYS_DPF_ACCEPT_LA: Y
- name: "Upload HTML documentation artifact"
uses: actions/upload-artifact@v4
with:
name: documentation-html
path: doc/_build/html
retention-days: 7
build-library:
name: "Smoke test and building"
runs-on: ubuntu-latest
steps:
- name: "Build library source and wheel artifacts"
uses: ansys/actions/build-library@v8
with:
library-name: "pytwin"
python-version: ${{ env.MAIN_PYTHON_VERSION }}
tests:
name: Test library
needs: build-library
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-20.04]
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Install Ubuntu dependencies for RomViewerSharedLib.so
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update
sudo apt-get install libosmesa6
- name: Setup headless display
if: matrix.os == 'windows-latest'
uses: pyvista/setup-headless-display-action@v2
- name: Run pytest
uses: ansys/actions/tests-pytest@v8
with:
python-version: ${{ matrix.python-version }}
pytest-extra-args: "--cov=pytwin --cov-report=term --cov-report=xml:.cov/coverage.xml --cov-report=html:.cov/html"
env:
ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }}
- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.python-version }}_${{ matrix.os }}_pytest.html
path: .cov/html
retention-days: 7
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
check-licenses:
name: "Check library dependencies ship with valid licenses"
runs-on: ubuntu-latest
steps:
- name: "Validate third party licenses"
uses: ansys/actions/check-licenses@v8
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
release-pypi-public:
name: "Release to public PyPI"
runs-on: ubuntu-latest
needs: [tests, doc-build]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
steps:
- name: "Release to the public PyPI repository"
uses: ansys/actions/release-pypi-public@v8
with:
library-name: "pytwin"
twine-username: "__token__"
twine-token: ${{ secrets.PYPI_TOKEN }}
doc-deploy-dev:
name: "Deploy developers documentation"
runs-on: ubuntu-latest
needs: doc-build
if: github.ref == 'refs/heads/main'
steps:
- name: "Deploy the latest documentation"
uses: ansys/actions/doc-deploy-dev@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}
doc-deploy-stable:
name: "Deploy stable documentation"
runs-on: ubuntu-latest
needs: doc-build
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
steps:
- name: "Deploy the stable documentation"
uses: ansys/actions/doc-deploy-stable@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}