Skip to content

Commit

Permalink
Merge branch 'main' into feat/apdl_submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
clatapie committed Oct 18, 2024
2 parents 04dac45 + ffdcfa9 commit 81027b1
Show file tree
Hide file tree
Showing 206 changed files with 4,781 additions and 411,672 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cache_cleaner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1

- name: Cleanup PR caches
if: github.event_name != 'workflow_dispatch'
Expand Down
155 changes: 63 additions & 92 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,17 @@ env:
DPF_PORT: 21004
MAPDL_PACKAGE: ghcr.io/ansys/mapdl
ON_CI: True
PYTEST_ARGUMENTS: '-vvv -ra --durations=10 --maxfail=3 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html'
PYTEST_ARGUMENTS: '-vvv --color=yes -ra --durations=10 --maxfail=3 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html'
BUILD_CHEATSHEET: True

# Following env vars when changed will "reset" the mentioned cache,
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...
# You should go up in number, if you go down (or repeat a previous value)
# you might end up reusing a previous cache if it haven't been deleted already.
# It applies 7 days retention policy by default.
RESET_EXAMPLES_CACHE: 2
RESET_DOC_BUILD_CACHE: 2
RESET_AUTOSUMMARY_CACHE: 2
RESET_EXAMPLES_CACHE: 0
RESET_DOC_BUILD_CACHE: 0
RESET_AUTOSUMMARY_CACHE: 0

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -69,28 +70,20 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: ansys/actions/doc-deploy-changelog@v7
- uses: ansys/actions/doc-deploy-changelog@v8
with:
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}


branch-name:
# Only if the event is a pull request and the branch name is not from the pre-commit-ci bot
if: github.event_name == 'pull_request' && github.head_ref != 'pre-commit-ci-update-config'
name: Check the name of the branch
runs-on: ubuntu-latest
steps:
- name: Check branch name
uses: ansys/actions/branch-name-style@v7


commit-name:
pull-request-name:
if: github.event_name == 'pull_request'
name: Check the name of the commit
name: Check the name of the pull-request
runs-on: ubuntu-latest
steps:
- name: Check commit name
uses: ansys/actions/commit-style@v7
- name: Check pull-request name
uses: ansys/actions/check-pr-title@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -103,7 +96,7 @@ jobs:
folder: ["doc", "examples"]
steps:
- name: "Ansys documentation style checks"
uses: ansys/actions/doc-style@v7
uses: ansys/actions/doc-style@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: ${{ matrix.folder }}
Expand All @@ -129,7 +122,7 @@ jobs:
os: macos-latest
steps:
- name: "Build wheelhouse and perform smoke test"
uses: ansys/actions/build-wheelhouse@v7
uses: ansys/actions/build-wheelhouse@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
operating-system: ${{ matrix.os }}
Expand All @@ -156,9 +149,10 @@ jobs:
PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners
PYMAPDL_START_INSTANCE: FALSE
ON_DOCUMENTATION: TRUE
GRPC_ENABLE_FORK_SUPPORT: false # See #3434
steps:
- name: "Install Git and checkout project"
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1

- name: "Login in Github container registry"
uses: docker/[email protected]
Expand Down Expand Up @@ -262,11 +256,28 @@ jobs:
- name: "Install docs build requirements"
run: |
pip uninstall ansys-sphinx-theme
pip install .[doc]
- name: "Waiting for the services to be up"
run: |
.ci/waiting_services.sh
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true

- name: Check Quarto Version
shell: bash
run: |
quarto --version
- name: "Install Poppler for PDF to PNG conversion"
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y poppler-utils
- name: "Build documentation"
run: |
Expand Down Expand Up @@ -324,7 +335,7 @@ jobs:
- name: "Display files structure"
if: always()
env:
MAPDL_INSTANCE: mapdl
MAPDL_INSTANCE: MAPDL_0
LOG_NAMES: logs-build-docs
run: |
.ci/display_logs.sh
Expand All @@ -338,7 +349,7 @@ jobs:

steps:
- name: "Install Git and checkout project"
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1

- name: Get event type and user to check permissions.
id: get_user
Expand All @@ -357,6 +368,7 @@ jobs:
- uses: tspascoal/get-user-teams-membership@v3
id: is_organization_member
if: ${{ github.actor != 'dependabot[bot]' }}
with:
username: ${{ steps.get_user.outputs.user }}
organization: ansys
Expand All @@ -366,7 +378,7 @@ jobs:
- id: set-matrix
env:
extended_testing: ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }}
auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' }}
auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' || github.actor == 'dependabot[bot]' }}
run: .ci/build_matrix.sh

build-test-remote:
Expand All @@ -392,7 +404,7 @@ jobs:

steps:
- name: "Install Git and checkout project"
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1

- name: "Login in Github container registry"
uses: docker/[email protected]
Expand Down Expand Up @@ -548,23 +560,23 @@ jobs:
if: always()
env:
MAPDL_VERSION: ${{ matrix.mapdl-version }}
MAPDL_INSTANCE: mapdl
LOG_NAMES: logs-${{ matrix.mapdl-version }}
MAPDL_INSTANCE: MAPDL_0
LOG_NAMES: logs-remote-${{ matrix.mapdl-version }}
run: |
.ci/collect_mapdl_logs.sh
- name: "Upload logs to GitHub"
if: always()
uses: actions/upload-artifact@v4
with:
name: logs-${{ matrix.mapdl-version }}.tgz
path: ./logs-${{ matrix.mapdl-version }}.tgz
name: logs-remote-${{ matrix.mapdl-version }}.tgz
path: ./logs-remote-${{ matrix.mapdl-version }}.tgz

- name: "Display files structure"
if: always()
env:
MAPDL_INSTANCE: mapdl
LOG_NAMES: logs-${{ matrix.mapdl-version }}
MAPDL_INSTANCE: MAPDL_0
LOG_NAMES: logs-remote-${{ matrix.mapdl-version }}
run: |
.ci/display_logs.sh
Expand All @@ -576,10 +588,11 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: "Install Git and checkout project"
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1

- uses: tspascoal/get-user-teams-membership@v3
id: is_organization_member
if: ${{ github.actor != 'dependabot[bot]' }}
with:
username: ${{ github.actor }}
organization: ansys
Expand All @@ -595,7 +608,7 @@ jobs:
RUN_ALL_TEST: ${{ inputs.run_all_tests }}
ON_PUSH: ${{ github.event_name == 'push' }}
HAS_TAG: ${{ contains(github.ref, 'refs/tags') }}
auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' }}
auth_user: ${{ steps.is_organization_member.outputs.isTeamMember == 'true' || github.actor == 'dependabot[bot]' }}
run: .ci/build_matrix.sh

build-test-ubuntu-local:
Expand All @@ -622,7 +635,7 @@ jobs:

steps:
- name: "Install Git and checkout project"
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
Expand Down Expand Up @@ -695,14 +708,14 @@ jobs:
id: attatch-to-pr
uses: EndBug/add-and-commit@v9
with:
message: Update the image cache
message: "chore: update the image cache"
committer_name: GitHub Actions
committer_email: [email protected]
add: './tests/.image_cache/*.png'

- name: "PR comment with reactions"
if: ${{ steps.attatch-to-pr.outputs.pushed == 'true' }}
uses: thollander/actions-comment-pull-request@v2
uses: thollander/actions-comment-pull-request@v3
with:
message: |
Hello! :wave:
Expand All @@ -711,7 +724,7 @@ jobs:
This commit does not re-run the CICD workflows (since no changes are made in the codebase) therefore you will see the actions showing in their status `Expected — Waiting for status to be reported`. Do not worry. You commit workflow is still running [here](https://github.com/ansys/pymapdl/pull/${{ github.event.pull_request.number }}/checks?sha=${{ github.event.pull_request.head.sha }}) :smile:
You might want to rerun the test to make sure that everything is passing. You can retrigger the CICD sending an empty commit `git commit -m "Empty comment to trigger CICD" --allow-empty`.
You might want to rerun the test to make sure that everything is passing. You can retrigger the CICD sending an empty commit `git commit -m "chore: empty comment to trigger CICD" --allow-empty`.
You will see this message everytime your commit changes the image cache but you are not attaching the updated cache. :nerd_face:
Expand Down Expand Up @@ -753,7 +766,7 @@ jobs:

steps:
- name: "Install Git and checkout project"
uses: actions/checkout@v4.1.7
uses: actions/checkout@v4.2.1
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
Expand Down Expand Up @@ -848,7 +861,7 @@ jobs:
ON_LOCAL: TRUE

steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.1

# Skipping because it is installed locally.
# - name: Setup Python
Expand Down Expand Up @@ -916,7 +929,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: "Build library source and wheel artifacts"
uses: ansys/actions/build-library@v7
uses: ansys/actions/build-library@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
python-version: ${{ env.MAIN_PYTHON_VERSION }}
Expand All @@ -934,13 +947,13 @@ jobs:
contents: write
steps:
- name: "Release to the public PyPI repository"
uses: ansys/actions/release-pypi-public@v7
uses: ansys/actions/release-pypi-public@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
use-trusted-publisher: true

- name: "Release to GitHub"
uses: ansys/actions/release-github@v7
uses: ansys/actions/release-github@v8
with:
library-name: ${{ env.PACKAGE_NAME }}
additional-artifacts: "minimum_requirements.txt"
Expand All @@ -956,42 +969,13 @@ jobs:
needs: [release]
steps:
- name: "Deploy the stable documentation"
# TODO: testing SEO improvements. This branch avoids creating a
# sitemap.xml pages in opposite to v5.
uses: ansys/actions/doc-deploy-stable@feat/seo-improvements
uses: ansys/actions/doc-deploy-stable@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}
render-last: '5'


doc-index-stable:
name: "Deploy stable docs index"
runs-on: ubuntu-latest
needs: upload-docs-release
steps:
- name: "Install Git and clone project"
uses: actions/[email protected]

- name: "Install the package requirements"
run: pip install -e .

- name: "Get the version to PyMeilisearch"
run: |
VERSION=$(python -c "from ansys.mapdl.core import __version__; print('.'.join(__version__.split('.')[:2]))")
VERSION_MEILI=$(python -c "from ansys.mapdl.core import __version__; print('-'.join(__version__.split('.')[:2]))")
echo "Calculated VERSION: $VERSION"
echo "Calculated VERSION_MEILI: $VERSION_MEILI"
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV
- name: "Deploy the latest documentation index"
uses: ansys/actions/doc-deploy-index@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }}
index-name: pymapdl-v${{ env.VERSION_MEILI }}
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}


upload-dev-docs:
Expand All @@ -1001,25 +985,12 @@ jobs:
needs: [docs-build]
steps:
- name: "Deploy the latest documentation"
# TODO: testing SEO improvements. This branch reuses the "index.html" from the stable version
uses: ansys/actions/doc-deploy-dev@feat/seo-improvements
uses: ansys/actions/doc-deploy-dev@v8
with:
cname: ${{ env.DOCUMENTATION_CNAME }}
token: ${{ secrets.GITHUB_TOKEN }}


doc-index-dev:
name: "Deploy dev index docs"
runs-on: ubuntu-latest
needs: upload-dev-docs
steps:
- name: "Deploy the latest documentation index"
uses: ansys/actions/doc-deploy-index@v7
with:
cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev
index-name: pymapdl-vdev
host-url: ${{ vars.MEILISEARCH_HOST_URL }}
api-key: ${{ env.MEILISEARCH_API_KEY }}
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
bot-email: ${{ secrets.PYANSYS_CI_BOT_EMAIL }}


notify:
Expand Down Expand Up @@ -1047,7 +1018,7 @@ jobs:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4.1.7
- uses: actions/checkout@v4.2.1
- name: "Set up Julia"
uses: julia-actions/setup-julia@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_clean_untagged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:

- name: "Perform versions cleanup - except certain tags"
uses: ansys/actions/hk-package-clean-untagged@v7
uses: ansys/actions/hk-package-clean-untagged@v8
with:
package-name: 'mapdl'
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading

0 comments on commit 81027b1

Please sign in to comment.