BUILD: Clean up dependencies #2026
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
name: GitHub CI CD | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
env: | |
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | |
MAIN_PYTHON_VERSION: '3.10' | |
PACKAGE_NAME: 'PyAEDT' | |
DOCUMENTATION_CNAME: 'aedt.docs.pyansys.com' | |
MEILISEARCH_API_KEY: ${{ secrets.MEILISEARCH_API_KEY }} | |
MEILISEARCH_HOST_URL: ${{ vars.MEILISEARCH_HOST_URL }} | |
MEILISEARCH_PUBLIC_API_KEY: ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }} | |
ON_CI: True | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# # ================================================================================================= | |
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | |
# # ================================================================================================= | |
# TODO: Si if we can use ansys/actions | |
test-tk-linux: | |
name: Toolkit VM | |
runs-on: [ self-hosted, Linux, pyaedt, toolkits] | |
env: | |
ANSYSEM_ROOT242: '/ansys_inc/AnsysEM/v242/Linux64' | |
ANS_NODEPCHECK: '1' | |
steps: | |
- name: Install Git and checkout project | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Create virtual environment | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
python -m venv .venv | |
source .venv/bin/activate | |
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U | |
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U | |
python -c "import sys; print(sys.executable)" | |
- name: Install pyaedt and tests dependencies | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .venv/bin/activate | |
pip install .[tests] | |
pip install pytest-azurepipelines | |
- name: Install CI dependencies (e.g. vtk-osmesa) | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .venv/bin/activate | |
# Uninstall conflicting dependencies | |
pip uninstall --yes vtk | |
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa | |
- name: Install pyedb WIP version | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .venv/bin/activate | |
pip uninstall --yes pyedb | |
pip install git+https://github.com/ansys/pyedb.git@fix/padstack-definition | |
- name: Run tests on _unittest_solvers | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .venv/bin/activate | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
pytest _unittest_solvers/test_45_workflows.py::TestClass::test_08_configure_a3d -vvv | |
# # ================================================================================================= | |
# # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | |
# # ================================================================================================= | |
# TODO: Si if we can use ansys/actions | |
test-ci-linux: | |
name: CI VM | |
runs-on: [ self-hosted, Linux, pyaedt] | |
env: | |
ANSYSEM_ROOT242: '/opt/AnsysEM/v242/Linux64' | |
ANS_NODEPCHECK: '1' | |
steps: | |
- name: Install Git and checkout project | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
- name: Create virtual environment | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
python -m venv .venv | |
source .venv/bin/activate | |
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U | |
python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U | |
python -c "import sys; print(sys.executable)" | |
- name: Install pyaedt and tests dependencies | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .venv/bin/activate | |
pip install .[tests] | |
pip install pytest-azurepipelines | |
- name: Install CI dependencies (e.g. vtk-osmesa) | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .venv/bin/activate | |
# Uninstall conflicting dependencies | |
pip uninstall --yes vtk | |
pip install --extra-index-url https://wheels.vtk.org vtk-osmesa | |
- name: Install pyedb WIP version | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .venv/bin/activate | |
pip uninstall --yes pyedb | |
pip install git+https://github.com/ansys/pyedb.git@fix/padstack-definition | |
- name: Run tests on _unittest_solvers | |
run: | | |
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH | |
source .venv/bin/activate | |
pytest _unittest_solvers/test_45_workflows.py::TestClass::test_08_configure_a3d -vvv | |
# # # ================================================================================================= | |
# # # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | |
# # # ================================================================================================= | |
# # TODO: Si if we can use ansys/actions | |
# test-solvers-linux: | |
# name: Testing solvers and coverage (Linux) | |
# if: github.event.pull_request.draft == false | |
# runs-on: [ self-hosted, Linux, pyaedt, toolkits] | |
# needs: [test-specific-linux] | |
# env: | |
# ANSYSEM_ROOT242: '/ansys_inc/AnsysEM/v242/Linux64' | |
# ANS_NODEPCHECK: '1' | |
# steps: | |
# - name: Install Git and checkout project | |
# uses: actions/checkout@v4 | |
# - name: Setup Python | |
# uses: actions/setup-python@v5 | |
# with: | |
# python-version: ${{ env.MAIN_PYTHON_VERSION }} | |
# - name: Create virtual environment | |
# run: | | |
# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH | |
# python -m venv .venv | |
# source .venv/bin/activate | |
# python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pip -U | |
# python -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org wheel setuptools -U | |
# python -c "import sys; print(sys.executable)" | |
# - name: Install pyaedt and tests dependencies | |
# run: | | |
# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH | |
# source .venv/bin/activate | |
# pip install .[tests] | |
# pip install pytest-azurepipelines | |
# - name: Install CI dependencies (e.g. vtk-osmesa) | |
# run: | | |
# source .venv/bin/activate | |
# # Uninstall conflicting dependencies | |
# pip uninstall --yes vtk | |
# pip install --extra-index-url https://wheels.vtk.org vtk-osmesa | |
# - name: Run tests on _unittest_solvers | |
# run: | | |
# export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT242 }}/common/mono/Linux64/lib64:${{ env.ANSYSEM_ROOT242 }}/Delcross:$LD_LIBRARY_PATH | |
# source .venv/bin/activate | |
# pytest --durations=50 -v --cov=ansys.aedt.core --cov-report=xml --cov-report=html --junitxml=junit/test-results.xml _unittest_solvers | |
# - uses: codecov/codecov-action@v4 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# name: codecov-system-solver-tests | |
# file: ./coverage.xml | |
# flags: system,solver | |
# - name: Upload pytest test results | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: pytest-solver-results | |
# path: junit/test-results.xml | |
# if: ${{ always() }} | |