Skip to content

CI Release

CI Release #307

Workflow file for this run

name: CI Release
on:
push:
tags:
- "v*"
schedule:
- cron: "0 13 * * 0"
workflow_dispatch:
inputs:
ansys_version:
description: "ANSYS version"
required: false
type: string
standalone_branch_suffix:
description: 'Suffix of the branch on standalone'
required: false
default: ''
#┌───────────── minute (0 - 59)
#│ ┌───────────── hour (0 - 23)
#│ │ ┌───────────── day of the month (1 - 31)
#│ │ │ ┌───────────── month (1 - 12)
#│ │ │ │ ┌───────────── day of the week (0 - 6), 0 being Sunday
#│ │ │ │ │
#│ │ │ │ │
#│ │ │ │ │
#* * * * *
env:
DOCUMENTATION_CNAME: 'dpf.docs.pyansys.com'
jobs:
debug:
runs-on: ubuntu-latest
steps:
- name: Show the Github context for the triggered event
run: echo "$GITHUB_CONTEXT"
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
style:
name: "Style Check"
runs-on: ubuntu-latest
steps:
- uses: ansys/actions/code-style@v8
with:
use-python-cache: false
build_linux1:
name: "Build linux1 wheel"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Install requirements"
run: pip install -r requirements/requirements_build.txt
- name: "Build the manylinux1 wheel"
shell: bash
id: wheel
run: |
python .ci/build_wheel.py -p manylinux1
cd dist
export name=`ls ansys_dpf_core*.whl`
echo ${name}
echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT
cd ..
- name: "Upload wheel any as artifact"
uses: actions/upload-artifact@v4
with:
name: ${{ steps.wheel.outputs.wheel_name }}
path: dist/${{ steps.wheel.outputs.wheel_name }}
tests:
name: "Test ${{ matrix.test_any && 'any' || 'platform-specific' }} wheel"
uses: ./.github/workflows/tests.yml
strategy:
matrix:
include:
- python_versions: '["3.10"]'
wheel: true
wheelhouse: true
DOCSTRING: true
test_any: false
- python_versions: '["3.11", "3.12", "3.13"]'
wheel: false
wheelhouse: true
DOCSTRING: false
test_any: false
- python_versions: '["3.10"]'
wheel: true
wheelhouse: false
DOCSTRING: false
test_any: true
- python_versions: '["3.11", "3.12", "3.13"]'
wheel: false
wheelhouse: false
DOCSTRING: false
test_any: true
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_LAST_RELEASED }}
python_versions: ${{ matrix.python_versions }}
wheel: ${{ matrix.wheel }}
wheelhouse: ${{ matrix.wheelhouse }}
DOCSTRING: ${{ matrix.DOCSTRING }}
test_any: ${{ matrix.test_any }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
secrets: inherit
docs:
uses: ./.github/workflows/docs.yml
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_LAST_RELEASED }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
event_name: ${{ github.event_name }}
secrets: inherit
examples:
uses: ./.github/workflows/examples.yml
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_LAST_RELEASED }}
python_versions: '["3.10", "3.11", "3.12", "3.13"]'
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
secrets: inherit
tests-retro:
name: "Test DPF ${{ matrix.version }} compatibility"
strategy:
fail-fast: false
matrix:
version:
- ${{ fromJson(vars.ANSYS_VERSIONS_RETRO) }}
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: ${{ matrix.version }}
python_versions: '["3.10"]'
DOCSTRING: false
standalone_suffix: ${{ matrix.version == '241' && '.sp01' || '' }}
secrets: inherit
tests-pydpf-post:
name: "Test PyDPF-Post with ${{ matrix.version}}"
strategy:
fail-fast: false
matrix:
version:
- ${{ fromJson(vars.ANSYS_VERSIONS_RETRO) }}
standalone_suffix:
- ""
test_docstrings:
- "false"
include:
- version: ${{ vars.ANSYS_VERSION_LAST_RELEASED }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
test_docstrings": "true"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: ${{ matrix.version }}
standalone_suffix: ${{ matrix.version == '241' && '.sp01' || matrix.standalone_suffix }}
test_docstrings: ${{ matrix.test_docstrings }}
secrets: inherit
docker_tests:
name: "Build and Test on Docker"
uses: ./.github/workflows/test_docker.yml
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_LAST_RELEASED }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
secrets: inherit
docker_examples:
name: "Run examples on Docker"
uses: ./.github/workflows/examples_docker.yml
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_LAST_RELEASED }}
python_versions: '["3.10", "3.11", "3.12", "3.13"]'
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '' }}
secrets: inherit
draft_release:
name: "Draft Release"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [style, tests, docs, examples, tests-retro, docker_tests]
runs-on: ubuntu-latest
steps:
- name: "Download artifacts"
uses: actions/download-artifact@v4
- name: "Display downloaded files"
run: ls -R
- name: "Create draft release"
uses: softprops/action-gh-release@v1
with:
files: |
./**/*.whl
./**/*.zip
draft: true
generate_release_notes: true