Skip to content

Commit 639b122

Browse files
CI: Leverage new vtk-osmesa logic in CI (#1651)
1 parent 1ac8182 commit 639b122

File tree

2 files changed

+24
-34
lines changed

2 files changed

+24
-34
lines changed

.github/workflows/ci_cd.yml

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ jobs:
424424
- name: "Install os packages"
425425
run: |
426426
sudo apt update
427-
sudo apt install libgl1-mesa-glx xvfb -y
427+
sudo apt install libgl1-mesa-glx -y
428428
429429
- name: Create Python venv
430430
run: |
@@ -447,9 +447,9 @@ jobs:
447447
retry_on: error
448448
timeout_minutes: 40
449449
command: |
450-
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
450+
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
451451
. .venv/bin/activate
452-
xvfb-run pytest tests/system -n auto --dist loadfile -v --cov
452+
pytest tests/system -n auto --dist loadfile -v --cov
453453
454454
- name: "Create coverage files"
455455
run: |
@@ -499,7 +499,7 @@ jobs:
499499
- name: "Install os packages"
500500
run: |
501501
sudo apt update
502-
sudo apt install libgl1-mesa-glx xvfb -y
502+
sudo apt install libgl1-mesa-glx -y
503503
504504
- name: Create Python venv
505505
run: |
@@ -522,9 +522,9 @@ jobs:
522522
retry_on: error
523523
timeout_minutes: 40
524524
command: |
525-
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
525+
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
526526
. .venv/bin/activate
527-
xvfb-run pytest tests/system -n auto --dist loadfile -v --cov
527+
pytest tests/system -n auto --dist loadfile -v --cov
528528
529529
- name: "Create coverage files"
530530
run: |
@@ -574,7 +574,7 @@ jobs:
574574
- name: "Install os packages"
575575
run: |
576576
sudo apt update
577-
sudo apt install libgl1-mesa-glx xvfb -y
577+
sudo apt install libgl1-mesa-glx -y
578578
579579
- name: Create Python venv
580580
run: |
@@ -597,9 +597,9 @@ jobs:
597597
retry_on: error
598598
timeout_minutes: 40
599599
command: |
600-
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
600+
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
601601
. .venv/bin/activate
602-
xvfb-run pytest tests/unit -n auto --dist loadfile -v --cov
602+
pytest tests/unit -n auto --dist loadfile -v --cov
603603
604604
- name: "Create coverage files"
605605
run: |
@@ -649,7 +649,7 @@ jobs:
649649
- name: "Install os packages"
650650
run: |
651651
sudo apt update
652-
sudo apt install libgl1-mesa-glx xvfb -y
652+
sudo apt install libgl1-mesa-glx -y
653653
654654
- name: Create Python venv
655655
run: |
@@ -672,9 +672,9 @@ jobs:
672672
retry_on: error
673673
timeout_minutes: 40
674674
command: |
675-
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
675+
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
676676
. .venv/bin/activate
677-
xvfb-run pytest tests/unit -n auto --dist loadfile -v --cov
677+
pytest tests/unit -n auto --dist loadfile -v --cov
678678
679679
- name: "Create coverage files"
680680
run: |
@@ -713,6 +713,9 @@ jobs:
713713
with:
714714
persist-credentials: false
715715

716+
- name: Set up headless display
717+
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
718+
716719
- name: Setup Python
717720
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
718721
with:
@@ -746,13 +749,6 @@ jobs:
746749
. .venv\Scripts\Activate.ps1
747750
python -m pip install .
748751
749-
- name: Install CI dependencies (e.g. vtk-osmesa)
750-
run: |
751-
.venv\Scripts\Activate.ps1
752-
# Uninstall conflicting dependencies
753-
pip uninstall --yes vtk
754-
pip install --index-url https://wheels.vtk.org vtk-osmesa==9.3.1
755-
756752
- name: Run PyAEDT tests
757753
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
758754
env:
@@ -813,6 +809,9 @@ jobs:
813809
with:
814810
persist-credentials: false
815811

812+
- name: Set up headless display
813+
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
814+
816815
- name: Install OS packages
817816
run: |
818817
sudo apt update
@@ -844,28 +843,18 @@ jobs:
844843
env:
845844
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
846845
run: |
847-
export LD_LIBRARY_PATH=${ANSYSEM}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
846+
export LD_LIBRARY_PATH="${ANSYSEM}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
848847
. .venv/bin/activate
849848
pip install --no-cache-dir external/pyaedt[tests]
850849
851850
- name: Install PyEDB
852851
env:
853852
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
854853
run: |
855-
export LD_LIBRARY_PATH=${ANSYSEM}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
854+
export LD_LIBRARY_PATH="${ANSYSEM}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
856855
. .venv/bin/activate
857856
python -m pip install .
858857
859-
- name: Install CI dependencies (e.g. vtk-osmesa)
860-
env:
861-
ANSYSEM: ${{ env.ANSYSEM_ROOT252 }}
862-
run: |
863-
export LD_LIBRARY_PATH=${ANSYSEM}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
864-
. .venv/bin/activate
865-
# Uninstall conflicting dependencies
866-
pip uninstall --yes vtk
867-
pip install --index-url https://wheels.vtk.org vtk-osmesa==9.3.1
868-
869858
- name: Run PyAEDT tests
870859
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
871860
env:
@@ -875,7 +864,7 @@ jobs:
875864
retry_on: error
876865
timeout_minutes: 50
877866
command: |
878-
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
867+
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
879868
. .venv/bin/activate
880869
pytest -v external/pyaedt/tests/system/general/test_01_3dlayout_edb.py
881870
pytest -v external/pyaedt/tests/system/general/test_01_configuration_files.py
@@ -890,7 +879,7 @@ jobs:
890879
retry_on: error
891880
timeout_minutes: 50
892881
command: |
893-
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
882+
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
894883
. .venv/bin/activate
895884
pytest -v external/pyaedt/tests/system/solvers/test_45_workflows.py
896885
pytest -v external/pyaedt/tests/system/solvers/test_00_analyze.py
@@ -904,7 +893,7 @@ jobs:
904893
retry_on: error
905894
timeout_minutes: 50
906895
command: |
907-
export LD_LIBRARY_PATH=${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64:$LD_LIBRARY_PATH
896+
export LD_LIBRARY_PATH="${{ env.ANSYSEM_ROOT252 }}/common/mono/Linux64/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
908897
. .venv/bin/activate
909898
pytest -v external/pyaedt/tests/system/extensions/test_cutout.py
910899
pytest -v external/pyaedt/tests/system/extensions/test_configure_layout.py
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Leverage new \`\`vtk-osmesa\`\` logic in CI

0 commit comments

Comments
 (0)