Skip to content

CI Release

CI Release #187

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 of the standalone."
required: false
default: '251'
standalone_branch_suffix:
description: 'Suffix of the branch on standalone'
required: false
default: '.pre0'
#┌───────────── 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'
MAIN_PYTHON_VERSION: '3.9'
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@v6
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:
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
python_versions: '["3.9", "3.10", "3.11"]'
wheel: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }}

Check failure on line 82 in .github/workflows/ci_release.yml

View workflow run for this annotation

GitHub Actions / CI Release

Invalid workflow file

The workflow is not valid. .github/workflows/ci_release.yml (Line: 82, Col: 14): Unrecognized named-value: 'env'. Located at position 26 within expression: matrix.python-version == env.MAIN_PYTHON_VERSION .github/workflows/ci_release.yml (Line: 92, Col: 14): Unrecognized named-value: 'env'. Located at position 26 within expression: matrix.python-version == env.MAIN_PYTHON_VERSION

Check failure on line 82 in .github/workflows/ci_release.yml

View workflow run for this annotation

GitHub Actions / CI Release

Invalid workflow file

The workflow is not valid. .github/workflows/ci_release.yml (Line: 82, Col: 14): Unrecognized named-value: 'env'. Located at position 26 within expression: matrix.python-version == env.MAIN_PYTHON_VERSION .github/workflows/ci_release.yml (Line: 92, Col: 14): Unrecognized named-value: 'env'. Located at position 26 within expression: matrix.python-version == env.MAIN_PYTHON_VERSION
wheelhouse: true
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
tests_any:
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
python_versions: '["3.9", "3.10", "3.11"]'
wheel: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }}
wheelhouse: false
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
test_any: true
secrets: inherit
docs:
uses: ./.github/workflows/docs.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
event_name: ${{ github.event_name }}
secrets: inherit
examples:
uses: ./.github/workflows/examples.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
python_versions: '["3.9", "3.10", "3.11"]'
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
retro_241:
name: "retro 241"
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: "241"
python_versions: '["3.9"]'
standalone_suffix: '.sp01'
DOCSTRING: false
secrets: inherit
retro_232:
name: "retro 232"
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: "232"
python_versions: '["3.9"]'
DOCSTRING: false
secrets: inherit
retro_231:
name: "retro 231"
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: "231"
python_versions: '["3.9"]'
DOCSTRING: false
secrets: inherit
retro_222:
name: "retro 222"
uses: ./.github/workflows/tests.yml
with:
ANSYS_VERSION: "222"
python_versions: '["3.9"]'
DOCSTRING: false
secrets: inherit
pydpf-post_251:
name: "PyDPF-Post with 251"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
test_docstrings: "true"
secrets: inherit
pydpf-post_242:
name: "PyDPF-Post with 242"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "242"
secrets: inherit
pydpf-post_241:
name: "PyDPF-Post with 241"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "241"
secrets: inherit
pydpf-post_232:
name: "PyDPF-Post with 232"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "232"
secrets: inherit
pydpf-post_231:
name: "PyDPF-Post with 231"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "231"
secrets: inherit
pydpf-post_222:
name: "PyDPF-Post with 222"
uses: ./.github/workflows/pydpf-post.yml
with:
ANSYS_VERSION: "222"
secrets: inherit
docker_tests:
name: "Build and Test on Docker"
uses: ./.github/workflows/test_docker.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
docker_examples:
name: "Run examples on Docker"
uses: ./.github/workflows/examples_docker.yml
with:
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
python_versions: '["3.9", "3.10", "3.11"]'
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
secrets: inherit
draft_release:
name: "Draft Release"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs: [style, tests, docs, examples, retro_232, retro_231, retro_222, docker_tests]
runs-on: ubuntu-latest
steps:
- name: "Download artifacts"
uses: actions/download-artifact@v3
- 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