-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add pyaedt integration examples (#89)
* MISC: move example in pyaedt integration * MISC: use non_graphical in pyaedt examples Note: current CI does not work when non_graphical is set to False as the runner isn't available to launch the AEDT Desktop application. * MISC: add forgotten import in example * CI: fix nightly commit counter with pyaedt * CI: removing examples from ci_cd * CI: adding nightly workflow of examples * CI: change workflow name * CI: deactivate doc index jobs * CI: fix job needs
- Loading branch information
1 parent
c0d2944
commit 8242672
Showing
9 changed files
with
152 additions
and
120 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
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,78 @@ | ||
name: Nightly legacy examples | ||
|
||
on: | ||
# Schedule this workflow every day at UTC 2:00. | ||
schedule: | ||
- cron: '0 2 * * *' | ||
|
||
env: | ||
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER) }} | ||
PYEDB_USE_LEGACY: '1' | ||
PYEDB_CI_NO_DISPLAY: '1' | ||
MAIN_PYTHON_VERSION_WINDOWS_SELFHOSTED: '3.9' | ||
VTK_OSMESA: 'vtk-osmesa==9.2.20230527.dev0' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
|
||
legacy-examples: | ||
name: "Check legacy examples" | ||
runs-on: [ windows, pyedb, self-hosted ] | ||
steps: | ||
- name: "Install Git and clone project" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Set up Python" | ||
uses: ansys/actions/_setup-python@main | ||
with: | ||
python-version: ${{ env.MAIN_PYTHON_VERSION_WINDOWS_SELFHOSTED }} | ||
use-cache: false | ||
|
||
- name: Create Python venv | ||
run: | | ||
python -m venv .venv | ||
. .venv\Scripts\Activate.ps1 | ||
- name: "Update pip" | ||
run: | | ||
. .venv\Scripts\Activate.ps1 | ||
python -m pip install -U pip | ||
- name: Install pyedb | ||
run: | | ||
. .venv\Scripts\Activate.ps1 | ||
pip install .[full] | ||
- name: "Clone pyaedt on specific branch" | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ansys/pyaedt | ||
path: "external/pyaedt" | ||
ref: "maint/use_pyedb" | ||
|
||
- name: "Install Pyaedt" | ||
run: | | ||
.\.venv\Scripts\Activate.ps1 | ||
pip install --no-cache-dir external/pyaedt[full] | ||
- name: "Install specific vtk version with OSMesa bundled" | ||
run: | | ||
.\.venv\Scripts\Activate.ps1 | ||
pip uninstall vtk -y | ||
# Note: the vtk-osmesa used is 9.2.X as 9.3.0 is not working | ||
# well with the use of pyvista in our tests atm. | ||
# TODO: update once a stable versio is working | ||
pip install --extra-index-url https://wheels.vtk.org ${{ env.VTK_OSMESA }} | ||
- name: Execute legacy examples (except pyaedt related and 01) | ||
run: | | ||
. .venv\Scripts\Activate.ps1 | ||
Get-ChildItem -Recurse -Path examples/legacy -Filter *.py -File | ForEach-Object { | ||
Write-Host "Executing example $($_.FullName)" | ||
$time = Measure-Command {python $_.FullName} | ||
Write-Host "Time taken for example $($_.FullName): $($time.TotalSeconds) seconds" | ||
} |
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
File renamed without changes.
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
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
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
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
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