Skip to content
Merged
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ on:
description: "ANSYS version"
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_branch_suffix:
description: 'Suffix of the branch on standalone'
required: false
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
ANSYS_VERSION:
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_suffix:
description: "Suffix of the branch on standalone"
required: false
Expand All @@ -32,9 +31,8 @@ on:
default: "3.11"
ANSYS_VERSION:
description: "ANSYS version"
required: true
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_suffix:
description: "Suffix of the branch on standalone"
required: false
Expand All @@ -61,7 +59,7 @@ jobs:
- uses: actions/checkout@v4

- name: "Set licensing if necessary"
if: inputs.ANSYS_VERSION > 231
if: ${{ (github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT) > '231' }}
shell: bash
run: |
echo "ANSYS_DPF_ACCEPT_LA=Y" >> $GITHUB_ENV
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
ANSYS_VERSION:
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_suffix:
description: "Suffix of the branch on standalone"
required: false
Expand All @@ -27,9 +26,8 @@ on:
default: '["3.10"]'
ANSYS_VERSION:
description: "ANSYS version to run."
required: true
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_suffix:
description: "Suffix of the branch on standalone"
required: false
Expand Down Expand Up @@ -65,7 +63,7 @@ jobs:
- uses: actions/checkout@v4

- name: "Set licensing if necessary"
if: inputs.ANSYS_VERSION > 231
if: ${{ (github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT) > '231' }}
shell: bash
run: |
echo "ANSYS_DPF_ACCEPT_LA=Y" >> $GITHUB_ENV
Expand Down Expand Up @@ -109,7 +107,7 @@ jobs:
with:
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
standalone_suffix: ${{ inputs.standalone_suffix }}
ANSYS_VERSION : ${{inputs.ANSYS_VERSION}}
ANSYS_VERSION : ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}

- name: "Check licences of packages"
uses: ansys/pydpf-actions/[email protected]
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/examples_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
ANSYS_VERSION:
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_suffix:
description: "Suffix of the branch on standalone"
required: false
Expand All @@ -27,9 +26,8 @@ on:
default: '["3.10"]'
ANSYS_VERSION:
description: "ANSYS version to run."
required: true
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_suffix:
description: "Suffix of the branch on standalone"
required: false
Expand Down Expand Up @@ -105,7 +103,7 @@ jobs:
with:
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
standalone_suffix: ${{ inputs.standalone_suffix }}
ANSYS_VERSION : ${{inputs.ANSYS_VERSION}}
ANSYS_VERSION : ${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}

- name: "Check licences of packages"
uses: ansys/pydpf-actions/[email protected]
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/pydpf-post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
ANSYS_VERSION:
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_suffix:
description: "Suffix of the branch on standalone"
required: false
Expand All @@ -30,9 +29,8 @@ on:
type: string
ANSYS_VERSION:
description: "ANSYS version"
required: true
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_suffix:
description: "Suffix of the branch on standalone"
required: false
Expand Down Expand Up @@ -62,7 +60,7 @@ jobs:
- uses: actions/checkout@v4

- name: "Set licensing if necessary"
if: inputs.ANSYS_VERSION > 231
if: ${{ (github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT) > '231' }}
shell: bash
run: |
echo "ANSYS_DPF_ACCEPT_LA=Y" >> $GITHUB_ENV
Expand Down Expand Up @@ -106,7 +104,7 @@ jobs:
with:
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
standalone_suffix: ${{ inputs.standalone_suffix }}
ANSYS_VERSION : ${{inputs.ANSYS_VERSION}}
ANSYS_VERSION : ${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}

- name: "Check licences of packages"
uses: ansys/pydpf-actions/[email protected]
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:
ANSYS_VERSION:
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
# Can be called manually
workflow_dispatch:
inputs:
Expand All @@ -23,9 +22,8 @@ on:
default: ''
ANSYS_VERSION:
description: "ANSYS version to run."
required: true
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT

env:
PACKAGE_NAME: ansys-dpf-core
Expand Down Expand Up @@ -87,7 +85,7 @@ jobs:
with:
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
standalone_suffix: ${{ inputs.standalone_suffix }}
ANSYS_VERSION : ${{inputs.ANSYS_VERSION}}
ANSYS_VERSION : ${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}

- name: "Check licences of packages"
uses: ansys/pydpf-actions/[email protected]
Expand Down Expand Up @@ -219,21 +217,21 @@ jobs:
- name: "Upload Test Results"
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_docker
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}_docker
path: tests/junit/test-results.xml
timeout-minutes: 5

- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_docker.xml
flags: docker,${{ inputs.ANSYS_VERSION }},${{ matrix.os }},${{ matrix.python-version }}
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}_docker.xml
flags: docker,${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }},${{ matrix.os }},${{ matrix.python-version }}

- name: "Upload test analytics results to Codecov"
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: test_results_${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_${{ inputs.ANSYS_VERSION }}${{ inputs.test_any == 'true' && '_any' || '' }}
flags: ${{ inputs.ANSYS_VERSION }},${{ matrix.os }},${{ matrix.python-version }}${{ inputs.test_any == 'true' && ',any' || '' }}
name: test_results_${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}${{ inputs.test_any == 'true' && '_any' || '' }}
flags: ${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }},${{ matrix.os }},${{ matrix.python-version }}${{ inputs.test_any == 'true' && ',any' || '' }}
26 changes: 12 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
ANSYS_VERSION:
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
wheel:
required: false
type: string
Expand Down Expand Up @@ -44,9 +43,8 @@ on:
default: '["3.10", "3.11", "3.12"]'
ANSYS_VERSION:
description: "ANSYS version"
required: true
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
wheel:
description: "Generate a wheel"
required: false
Expand Down Expand Up @@ -103,7 +101,7 @@ jobs:
- uses: actions/checkout@v4

- name: "Set licensing if necessary"
if: inputs.ANSYS_VERSION > 231
if: ${{ (github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT) > '231' }}
shell: bash
run: |
echo "ANSYS_DPF_ACCEPT_LA=Y" >> $GITHUB_ENV
Expand All @@ -128,9 +126,9 @@ jobs:
with:
path: |
.tox
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ inputs.ANSYS_VERSION }}-${{ hashFiles('requirements/*', 'pyproject.toml') }}
key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}-${{ hashFiles('requirements/*', 'pyproject.toml') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-${{ inputs.ANSYS_VERSION }}-
${{ matrix.os }}-${{ matrix.python-version }}-${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}-

- name: "Build the wheel"
shell: bash
Expand Down Expand Up @@ -194,7 +192,7 @@ jobs:
with:
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
standalone_suffix: ${{ inputs.standalone_suffix }}
ANSYS_VERSION : ${{inputs.ANSYS_VERSION}}
ANSYS_VERSION : ${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}

- name: "Check licences of packages"
uses: ansys/pydpf-actions/[email protected]
Expand Down Expand Up @@ -224,9 +222,9 @@ jobs:
run: |
if [ $MODE == 'PIP' ]; then
if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv.deps+="-e dpf-standalone/v${{inputs.ANSYS_VERSION}}" -x testenv.commands_pre+="uv pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==9.3.20240907.dev0"' >> "$GITHUB_OUTPUT"
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv.deps+="-e dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}" -x testenv.commands_pre+="uv pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==9.3.20240907.dev0"' >> "$GITHUB_OUTPUT"
else
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv.deps+="-e dpf-standalone/v${{inputs.ANSYS_VERSION}}"' >> "$GITHUB_OUTPUT"
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv.deps+="-e dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}"' >> "$GITHUB_OUTPUT"
fi
else
if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then
Expand Down Expand Up @@ -308,21 +306,21 @@ jobs:
- name: "Upload Test Results"
uses: actions/upload-artifact@v4
with:
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}${{ inputs.test_any == 'true' && '_any' || '' }}
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}${{ inputs.test_any == 'true' && '_any' || '' }}
path: tests/junit/test-results.xml

- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # required
file: ./.tox/.cov/coverage.xml
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}${{ inputs.test_any == 'true' && '_any' || '' }}.xml
flags: ${{ inputs.ANSYS_VERSION }},${{ matrix.os }},${{ matrix.python-version }}${{ inputs.test_any == 'true' && ',any' || '' }}
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}${{ inputs.test_any == 'true' && '_any' || '' }}.xml
flags: ${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }},${{ matrix.os }},${{ matrix.python-version }}${{ inputs.test_any == 'true' && ',any' || '' }}

- name: "Upload test analytics results to Codecov"
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: test_results_${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_${{ inputs.ANSYS_VERSION }}${{ inputs.test_any == 'true' && '_any' || '' }}
flags: ${{ inputs.ANSYS_VERSION }},${{ matrix.os }},${{ matrix.python-version }}${{ inputs.test_any == 'true' && ',any' || '' }}
name: test_results_${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}${{ inputs.test_any == 'true' && '_any' || '' }}
flags: ${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }},${{ matrix.os }},${{ matrix.python-version }}${{ inputs.test_any == 'true' && ',any' || '' }}
13 changes: 6 additions & 7 deletions .github/workflows/update_operators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
description: "ANSYS version"
required: false
type: string
default: vars.ANSYS_VERSION_DEFAULT
standalone_branch_suffix:
description: "Suffix of the branch on standalone"
required: false
Expand Down Expand Up @@ -53,7 +52,7 @@ jobs:
- name: "Update ansys-grpc-dpf"
shell: bash
run: |
wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION }}/dist -name "ansys_grpc_dpf-*" -type f)
wheel_file=$(find ./dpf-standalone/${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}/dist -name "ansys_grpc_dpf-*" -type f)
echo $wheel_file
rm -r src/ansys/grpc
unzip -o $wheel_file "ansys/**/*" -d src/
Expand All @@ -63,7 +62,7 @@ jobs:
- name: "Update ansys-dpf-gate"
shell: bash
run: |
wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION }}/dist -name "ansys_dpf_gate-*" -type f)
wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}/dist -name "ansys_dpf_gate-*" -type f)
echo $wheel_file
rm -r src/ansys/dpf/gate/generated
unzip -o $wheel_file "ansys/dpf/gate/generated/*" -d src/
Expand All @@ -74,7 +73,7 @@ jobs:
- name: "Update ansys-dpf-gatebin lin"
shell: bash
run: |
wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION }}/dist -name "ansys_dpf_gatebin-*linux1*" -type f)
wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}/dist -name "ansys_dpf_gatebin-*linux1*" -type f)
echo $wheel_file
rm -r src/ansys/dpf/gatebin
unzip -o $wheel_file "ansys/**/*" -d src/
Expand All @@ -83,7 +82,7 @@ jobs:
- name: "Update ansys-dpf-gatebin win"
shell: bash
run: |
wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ANSYS_VERSION }}/dist -name "ansys_dpf_gatebin-*win*" -type f)
wheel_file=$(find ./dpf-standalone/v${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}/dist -name "ansys_dpf_gatebin-*win*" -type f)
echo $wheel_file
unzip -o $wheel_file "ansys/**/*" -d src/
chmod -R 777 src/ansys/dpf/gatebin
Expand Down Expand Up @@ -132,9 +131,9 @@ jobs:
src/ansys/dpf/core/operators/*
doc/source/_static/dpf_operators.html
commit-message: update generated code
title: Update generated code for DPF ${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}${{ github.event.inputs.standalone_branch_suffix || '' }} on ${{ github.ref_name }}
title: Update generated code for DPF ${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}${{ github.event.inputs.standalone_branch_suffix || '' }} on ${{ github.ref_name }}
body: An update of generated code has been triggered either manually or by an update in the dpf-standalone repository.
branch: maint/update_code_for_${{ github.event.inputs.ANSYS_VERSION || vars.ANSYS_VERSION_DEFAULT }}${{ github.event.inputs.standalone_branch_suffix || '' }}_on_${{ github.ref_name }}
branch: maint/update_code_for_${{ github.event.inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}${{ github.event.inputs.standalone_branch_suffix || '' }}_on_${{ github.ref_name }}
labels: server-sync
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
reviewers: ${{ github.ref_name == 'master' && 'ansys/dpf_integration_proxies' || '' }}
Expand Down
Loading