Skip to content

Build(deps): Bump astral-sh/setup-uv from 8.3.2 to 9.0.0 in the actions group #3878

Build(deps): Bump astral-sh/setup-uv from 8.3.2 to 9.0.0 in the actions group

Build(deps): Bump astral-sh/setup-uv from 8.3.2 to 9.0.0 in the actions group #3878

Workflow file for this run

name: GitHub CI
on:
pull_request:
types: [opened, reopened, synchronize, edited]
workflow_dispatch:
push:
tags:
- "*"
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PACKAGE_NAME: pyansys
PACKAGE_NAMESPACE: pyansys
MAIN_PYTHON_VERSION: '3.14'
DOCUMENTATION_CNAME: "docs.pyansys.com"
# attrs,referencing,jeepney - This has MIT license but fails the check
# paramiko,psycopg,psycopg-binary - LGPL licenses, being used by ansys-dynamicreporting-core and ansys-turbogrid-core
LICENSE_WHITELISTING: "attrs,referencing,jeepney,paramiko,psycopg,psycopg-binary"
jobs:
check-vulnerabilities:
name: Check third-party dependencies for vulnerabilities
runs-on: ubuntu-latest
steps:
- name: PyAnsys Vulnerability Check (on PRs)
if: github.event_name == 'pull_request'
uses: ansys/actions/check-vulnerabilities@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
python-package-name: ${{ env.PACKAGE_NAME }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
dev-mode: true
- name: PyAnsys Vulnerability Check (any other case)
if: github.event_name != 'pull_request'
uses: ansys/actions/check-vulnerabilities@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
python-package-name: ${{ env.PACKAGE_NAME }}
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
check-licenses:
name: Check depencencies' licenses
runs-on: ubuntu-latest
steps:
- name: PyAnsys Licenses Check
uses: ansys/actions/check-licenses@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
target: "all"
whitelist-license-check: ${{ env.LICENSE_WHITELISTING }}
docs-style:
name: Documentation Style Check
runs-on: ubuntu-latest
steps:
- name: PyAnsys documentation style checks
uses: ansys/actions/doc-style@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
smoke-tests-core:
name: Build core PyAnsys packages
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ['3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 #v9.0.0
with:
python-version: ${{ matrix.python-version }}
cache-dependency-glob: '**/pyproject.toml'
activate-environment: true
- name: Install core PyAnsys packages
run: |
uv pip install .
uv pip check
- name: Smoke test
run: |
# Check Python version
uv run python --version
# Check installed package version
uv run python -c "from ${{ env.PACKAGE_NAMESPACE }} import __version__; print(__version__)"
smoke-tests-extras:
name: Build extras PyAnsys packages
runs-on: ${{ matrix.os }}
needs: [smoke-tests-core]
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
python-version: ['3.12', '3.13', '3.14']
extras-version: ['fluent-all', 'mapdl-all', 'tools', 'mcp']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 #v9.0.0
with:
python-version: ${{ matrix.python-version }}
cache-dependency-glob: '**/pyproject.toml'
activate-environment: true
- name: Install ${{ matrix.extras-version }} PyAnsys packages
run: |
uv pip install .[${{ matrix.extras-version }}]
uv pip check
- name: Smoke test
run: |
# Check Python version
uv run python --version
# Check installed package version
uv run python -c "from ${{ env.PACKAGE_NAMESPACE }} import __version__; print(__version__)"
wheelhouse-all:
name: Build PyAnsys package wheelhouse
runs-on: ${{ matrix.os }}
needs: [smoke-tests-core]
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ['3.12', '3.13', '3.14']
steps:
- name: Build wheelhouse and perform smoke test
uses: ansys/actions/build-wheelhouse@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
with:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ runner.os }}
python-version: ${{ matrix.python-version }}
target: "all"
whitelist-license-check: ${{ env.LICENSE_WHITELISTING }}
- name: List dependencies (pip freeze)
run: |
uv pip freeze > all-deps-${{ runner.os }}-${{ matrix.python-version }}.txt
cat all-deps-${{ runner.os }}-${{ matrix.python-version }}.txt
- name: Upload dependencies list
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a #v7.0.1
with:
name: all-deps-${{ runner.os }}-${{ matrix.python-version }}
path: all-deps-${{ runner.os }}-${{ matrix.python-version }}.txt
retention-days: 7
docs-build:
name: Building Documentation
runs-on: ubuntu-latest
needs: [docs-style]
steps:
- name: Build documentation
uses: ansys/actions/doc-build@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}
dependencies: "build-essential zip pandoc texlive-latex-extra latexmk texlive-pstricks"
group-dependencies-name: "doc"
skip-dependencies-cache: true
env:
GITHUB_TOKEN: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
doc-deploy-dev:
name: "Deploy development docs"
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: [package]
steps:
- name: Deploy the latest documentation
uses: ansys/actions/doc-deploy-dev@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
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 }}
adapt-landing-page-dev:
uses: ./.github/workflows/update-gh-pages.yml
needs: [doc-deploy-dev]
secrets: inherit
package:
name: Package library
runs-on: ubuntu-latest
needs: [docs-build, smoke-tests-core]
permissions:
attestations: write # Required to upload provenance attestations
contents: read
id-token: write # Required for OIDC authentication to upload provenance attestations
steps:
- name: Build library source and wheel artifacts
uses: ansys/actions/build-library@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
attest-provenance: true
doc-deploy-pr:
name: "Deploy PR documentation"
runs-on: ubuntu-latest
needs: [docs-build]
steps:
- uses: ansys/actions/doc-deploy-pr@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
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 }}
maximum-pr-doc-deployments: 20
release:
name: Release project to GitHub
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [package, smoke-tests-extras, wheelhouse-all]
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
id-token: write # Required for GitHub release
contents: write # Required for GitHub release
steps:
- name: Release to GitHub
uses: ansys/actions/release-github@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
library-name: ${{ env.PACKAGE_NAME }}
additional-artifacts: 'all-deps-Linux-3.12 all-deps-Linux-3.13 all-deps-Linux-3.14 all-deps-Windows-3.12 all-deps-Windows-3.13 all-deps-Windows-3.14 all-deps-macOS-3.12 all-deps-macOS-3.13 all-deps-macOS-3.14'
add-artifact-attestation-notes: true
changelog-release-notes: true
release-pypi:
name: Release project to PyPI
if: github.event_name == 'push' && contains(github.ref, 'refs/tags')
needs: [package, smoke-tests-extras, wheelhouse-all]
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: release
permissions:
id-token: write # Required for OIDC authentication with PyPI
contents: write # Required for OIDC authentication with PyPI
steps:
- name: "Download the library artifacts from build-library step"
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: ${{ env.PACKAGE_NAME }}-artifacts
path: ${{ env.PACKAGE_NAME }}-artifacts
- name: "Upload artifacts to PyPI using trusted publisher"
uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
with:
repository-url: "https://upload.pypi.org/legacy/"
print-hash: true
packages-dir: ${{ env.PACKAGE_NAME }}-artifacts
skip-existing: false
docs-release:
name: Deploy release docs
runs-on: ubuntu-latest
needs: [release, release-pypi]
steps:
- name: Deploy the latest release documentation
uses: ansys/actions/doc-deploy-stable@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
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 }}
adapt-landing-page-release:
uses: ./.github/workflows/update-gh-pages.yml
needs: [docs-release]
secrets: inherit
automerge-prs:
name: Automerge PRs
runs-on: ubuntu-latest
needs: [package, wheelhouse-all]
if: github.event_name == 'pull_request'
permissions:
contents: write
pull-requests: write
steps:
- name: Automerge PRs
uses: ansys/actions/hk-automerge-prs@84b6533ae76f5dde69a1df26c18682160a8121cf # v10.3.5
with:
approver: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
approver-token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}