-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c801d5c
Showing
476 changed files
with
163,438 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
# azure pipelines build and test pymapdl | ||
|
||
variables: | ||
ALLOW_PLOTTING: true | ||
package_name: ansys-mapdl | ||
SHELLOPTS: 'errexit:pipefail' | ||
|
||
trigger: | ||
branches: | ||
include: | ||
- '*' | ||
exclude: | ||
- gh-pages | ||
tags: | ||
include: | ||
- '*' | ||
|
||
jobs: | ||
- job: Linux | ||
variables: | ||
python.version: '3.7' # due to VTK 8.1.2 requirement for docbuild | ||
DISPLAY: ':99.0' | ||
MAPDL_IMAGE: 'docker.pkg.github.com/pyansys/mapdl/mapdl:v21.1.0' | ||
PYMAPDL_PORT: 32771 # default won't work on azure devops... | ||
PYMAPDL_START_INSTANCE: FALSE | ||
PYANSYS_OFF_SCREEN: True | ||
pool: | ||
vmImage: 'ubuntu-20.04' | ||
steps: | ||
- task: UsePythonVersion@0 | ||
inputs: | ||
versionSpec: '$(python.version)' | ||
displayName: 'Use Python $(python.version)' | ||
- task: PipAuthenticate@1 | ||
inputs: | ||
artifactFeeds: 'pyansys' | ||
onlyAddExtraIndex: true | ||
|
||
- script: | | ||
uname -a | ||
displayName: Display kernel version | ||
- script: | | ||
.ci/setup_headless_display.sh | ||
pip install -r .ci/requirements_test_xvfb.txt | ||
python .ci/display_test.py | ||
displayName: Install and start a virtual framebuffer | ||
- script: | | ||
pip install -r requirements_build.txt | ||
python setup.py bdist_wheel | ||
pip install dist/ansys_mapdl*.whl | ||
python -c "from ansys import mapdl; print(mapdl.Report())" | ||
displayName: Build, install, and validate installation of ansys-mapdl | ||
- script: | | ||
set -ex | ||
echo $(PAT) | docker login -u $(GH_USERNAME) --password-stdin docker.pkg.github.com | ||
docker pull $(MAPDL_IMAGE) | ||
docker run -e ANSYSLMD_LICENSE_FILE=1055@$(LICENSE_SERVER) --restart always --name mapdl -p $(PYMAPDL_PORT):50052 $(MAPDL_IMAGE) -smp > log.txt & | ||
grep -q 'Server listening on' <(timeout 60 tail -f log.txt) | ||
python -c "from ansys.mapdl import launch_mapdl; print(launch_mapdl())" | ||
displayName: Pull, launch, and validate MAPDL service | ||
- script: | | ||
pip install -r requirements_test.txt | ||
pip install pytest-azurepipelines | ||
pytest -v --junitxml=junit/test-results.xml --cov --cov-report=xml --cov-report=html | ||
displayName: 'Test Core API' | ||
- script: | | ||
cat log.txt | ||
displayName: 'Display MAPDL Logs' | ||
condition: always() | ||
# - script: | | ||
# pip install twine | ||
# python setup.py sdist | ||
# twine upload --skip-existing dist/pyvista* | ||
# displayName: 'Upload to PyPi' | ||
# condition: and(eq(variables['python.version'], '3.7'), contains(variables['Build.SourceBranch'], 'refs/tags/')) | ||
# env: | ||
# TWINE_USERNAME: $(twine.username) | ||
# TWINE_PASSWORD: $(twine.password) | ||
# TWINE_REPOSITORY_URL: "https://upload.pypi.org/legacy/" | ||
|
||
|
||
# - job: Windows | ||
# strategy: | ||
# matrix: | ||
# Python35: | ||
# python.version: '3.5' | ||
# Python36: | ||
# python.version: '3.6' | ||
# Python37: | ||
# python.version: '3.7' | ||
# Python38: | ||
# python.version: '3.8' | ||
# pool: | ||
# vmImage: 'vs2017-win2016' | ||
# steps: | ||
# - task: UsePythonVersion@0 | ||
# inputs: | ||
# versionSpec: $(python.version) | ||
# addToPath: true | ||
# - powershell: | | ||
# powershell .ci/install_opengl.ps1 | ||
# displayName: 'Install OpenGL' | ||
# - template: .ci/build_wheel.yml | ||
# - template: .ci/install_pyansys.yml | ||
# - template: .ci/unit_testing.yml | ||
# - template: .ci/azure-publish-dist.yml | ||
|
||
|
||
# - job: macOS | ||
# strategy: | ||
# matrix: | ||
# Python36: | ||
# python.version: '3.6' | ||
# Python37: | ||
# python.version: '3.7' | ||
# Python38: | ||
# python.version: '3.8' | ||
# pool: | ||
# vmImage: 'macOS-10.15' | ||
# steps: | ||
# - script: .ci/macos-install-python.sh '$(python.version)' | ||
# displayName: Install Python | ||
# - template: .ci/build_wheel.yml | ||
# - template: .ci/install_pyansys.yml | ||
# - template: .ci/unit_testing_allow_error.yml | ||
# - template: .ci/azure-publish-dist.yml | ||
|
||
# docs are built locally (for now) due to MAPDL requirement | ||
# - job: build_docs | ||
# variables: | ||
# gh_user: akaszynski | ||
# gh_repo: pyansys.github.io | ||
# gh_pass: $(github_pat) | ||
# gh_email: $(github_email) | ||
# gh_auth_header: $(echo -n "${gh_user}:$(github_pat)" | base64); | ||
# pool: | ||
# vmImage: 'ubuntu-16.04' | ||
# steps: | ||
# - template: .ci/build_documentation.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
steps: | ||
|
||
- script: | | ||
mkdir -p doc_archive | ||
- script: | | ||
sudo apt install pandoc -qy | ||
pip install -r requirements_docs.txt | ||
make -C docs html | ||
condition: always() # always build docs, regardless of prior steps testing | ||
displayName: 'Build Documentation' | ||
|
||
- task: ArchiveFiles@2 | ||
inputs: | ||
rootFolderOrFile: docs/build/html | ||
includeRootFolder: false | ||
archiveType: 'zip' | ||
archiveFile: doc_archive/ansys-mapdl_docs.zip | ||
displayName: Compress html documentation | ||
|
||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
artifactName: 'documentation' | ||
targetPath: 'doc_archive' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"""Quickly check if VTK off screen plotting works.""" | ||
import pyvista | ||
from pyvista.plotting import system_supports_plotting | ||
|
||
print('system_supports_plotting', system_supports_plotting()) | ||
pyvista.OFF_SCREEN = True | ||
pyvista.plot(pyvista.Sphere()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pyvista>=0.27.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Compiled source # | ||
################### | ||
*.pyc | ||
*.pyd | ||
*.c | ||
*.cpp | ||
*.so | ||
*.o | ||
*.cache | ||
|
||
# OS generated files # | ||
###################### | ||
.fuse_hidden* | ||
*~ | ||
*swp | ||
|
||
# emacs | ||
flycheck* | ||
|
||
# Old files # | ||
_old/ | ||
|
||
# Pip generated folders # | ||
######################### | ||
*.egg-info/ | ||
build/ | ||
dist/ | ||
|
||
# MISC | ||
_build/ | ||
pyansys/Interface.py | ||
*.bat | ||
docs/source/examples/* | ||
*.out | ||
*.tar.gz | ||
|
||
# Testing | ||
factory/ | ||
Testing/ | ||
UnitTesting/ | ||
TODO | ||
test.sh | ||
.pytest_cache/ | ||
tests/.coverage | ||
tests/htmlcov | ||
tests/cyclic/htmlcov | ||
.coverage | ||
*,cover | ||
|
||
\#* | ||
.\#* | ||
/.ipynb_checkpoints | ||
|
||
# test scripts | ||
*.sh | ||
*.cmd | ||
wheelhouse/ | ||
|
||
# jupyterlab | ||
node_modules | ||
yarn.lock | ||
jupyterlab/docker/*.tar.gz | ||
examples/.local | ||
.ipynb_checkpoints/ | ||
|
||
# docker | ||
docker/mapdl/v211 |
Oops, something went wrong.