Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 37 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ env:
PYMAPDL_START_INSTANCE: FALSE
PYANSYS_OFF_SCREEN: True
DOCKER_PACKAGE: docker.pkg.github.com/pyansys/pymapdl/mapdl
DOCKER_IMAGE_VERSION_DOCS_BUILD: v21.2.1

jobs:

Expand Down Expand Up @@ -126,11 +127,44 @@ jobs:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
GH_USERNAME: ${{ secrets.GH_USERNAME }}
GH_PAT: ${{ secrets.REPO_DOWNLOAD_PAT }}
MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:v21.2.1'

- name: Build Documentation
MAPDL_IMAGE: '${{ env.DOCKER_PACKAGE }}:${{ env.DOCKER_IMAGE_VERSION_DOCS_BUILD }}'

- name: Retrieve PyMAPDL version
run: |
echo "::set-output name=PYMAPDL_VERSION::$(python -c "from ansys.mapdl.core import __version__; print(__version__)")"
echo "PyMAPDL version is: $(python -c "from ansys.mapdl.core import __version__; print(__version__)")"
id: version

- name: Cache examples
uses: actions/cache@v2
with:
path: doc/source/examples
key: Examples-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }}
restore-keys: |
Examples-${{ steps.version.outputs.PYMAPDL_VERSION }}

- name: Cache docs build directory
uses: actions/cache@v2
with:
path: doc/build
key: doc-build-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this mean that this will be different each time?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes... but...

since the "restore-key" is used as a glob pattern, it will match the last version of the cache. I need to "create" a different sha every time, otherwise you cannot store the cache if there is another workflow run going on.

I hope this makes sense.

restore-keys: |
doc-build-${{ steps.version.outputs.PYMAPDL_VERSION }}

- name: Cache autosummary
uses: actions/cache@v2
with:
path: doc/source/**/_autosummary/*.rst
key: autosummary-rst-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }}
restore-keys: |
autosummary-rst-${{ steps.version.outputs.PYMAPDL_VERSION }}

- name: Install Docs Build Requirements
run: |
pip install -r requirements/requirements_docs.txt

- name: Build Documentation
run: |
xvfb-run make -C doc html SPHINXOPTS="-j auto -w build_errors.txt -N"

# Verify that sphinx generates no warnings
Expand Down
10 changes: 1 addition & 9 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@ comment:

coverage:
status:
project:
default:
# basic
# target: 50%
threshold: 0%
# advanced
if_not_found: success
if_ci_failed: error
if_no_uploads: error
project: false
patch:
default:
# basic
Expand Down