From 4b6fb8aa27e39cb0c1b83b0e30f6382bdeb091a9 Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Thu, 15 Feb 2024 12:26:19 +0100 Subject: [PATCH 1/8] Add Linux test --- .github/workflows/ci_cd.yml | 81 ++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 76d6b4ed..aed3f001 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -73,7 +73,7 @@ jobs: name: "Windows Tests AEDT" strategy: matrix: - python-version: [ '3.8', '3.10' ] + python-version: [ '3.10' ] fail-fast: false runs-on: [self-hosted, pyaedt, toolkits, Windows] needs: [smoke-tests] @@ -143,6 +143,85 @@ jobs: env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + tests_linux: + name: "Linux Tests" + strategy: + matrix: + python-version: [ '3.10' ] + fail-fast: false + runs-on: [ self-hosted, pyaedt, toolkits, Linux ] + needs: [ smoke-tests ] + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Create Python venv + run: | + python -m venv .venv_linux + export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + + - name: Install packages for testing + run: | + source .venv_linux/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)" + python -m pip install --upgrade pip + pip install --upgrade build wheel + pip install .[tests] + pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pytest-azurepipelines + env: + ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} + + - name: Test AEDT Common API + timeout-minutes: 5 + run: | + export ANS_NODEPCHECK=1 + export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + source .venv_linux/bin/activate + pytest -v -m aedt_common_api + env: + ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} + + - name: Test Common API + timeout-minutes: 5 + run: | + export ANS_NODEPCHECK=1 + export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + source .venv_linux/bin/activate + pytest -v -m common_api + env: + ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} + + - name: Test EDB API + timeout-minutes: 5 + run: | + export ANS_NODEPCHECK=1 + export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + source .venv_linux/bin/activate + pytest -v -m edb_api + env: + ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} + + - name: Test REST API + timeout-minutes: 5 + run: | + export ANS_NODEPCHECK=1 + export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + source .venv_linux/bin/activate + pytest -v -m rest_api + env: + ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} + build-library: name: "Build library artifacts" runs-on: ubuntu-latest From d046cefe32e9627fcc065cf6f1638c4502bb3983 Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Tue, 5 Mar 2024 14:56:40 +0100 Subject: [PATCH 2/8] Linux CI --- .github/workflows/ci_cd.yml | 36 +++++++++++++----------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 8a0dd91f..a77d2384 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -131,7 +131,7 @@ jobs: python-version: ${{ matrix.python-version }} tests_windows_aedt: - name: "Windows Tests AEDT" + name: "Windows Tests" strategy: matrix: python-version: [ '3.10' ] @@ -210,21 +210,21 @@ jobs: matrix: python-version: [ '3.10' ] fail-fast: false - runs-on: [ self-hosted, pyaedt, toolkits, Linux ] + runs-on: [self-hosted, pyaedt, toolkits, Linux] needs: [ smoke-tests ] steps: - uses: actions/checkout@v4 - name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Create Python venv run: | python -m venv .venv_linux - export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 - export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH - name: Install packages for testing run: | @@ -236,52 +236,42 @@ jobs: pip install --upgrade build wheel pip install .[tests] pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org pytest-azurepipelines - env: - ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} - name: Test AEDT Common API timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 - export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + export ANSYSEM_ROOT232=/ansys_inc/v241/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m aedt_common_api - env: - ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} - name: Test Common API timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 - export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + export ANSYSEM_ROOT232=/ansys_inc/v241/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m common_api - env: - ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} - name: Test EDB API timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 - export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + export ANSYSEM_ROOT232=/ansys_inc/v241/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m edb_api - env: - ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} - name: Test REST API timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT232=/ansys_inc/v232/Linux64 - export LD_LIBRARY_PATH=$ANSYSEM_ROOT232/common/mono/Linux64/lib64:$ANSYSEM_ROOT232/Delcross:$LD_LIBRARY_PATH + export ANSYSEM_ROOT232=/ansys_inc/v241/Linux64 + export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m rest_api - env: - ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} build-library: name: "Build library artifacts" From afea38148d8a6cd30230620940b88a8572339a09 Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Tue, 5 Mar 2024 16:19:13 +0100 Subject: [PATCH 3/8] Linux CI --- .github/workflows/ci_cd.yml | 8 ++++++++ pytest.ini | 8 ++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index a77d2384..aaf05840 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -245,6 +245,8 @@ jobs: export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m aedt_common_api + env: + ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} - name: Test Common API timeout-minutes: 5 @@ -254,6 +256,8 @@ jobs: export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m common_api + env: + ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} - name: Test EDB API timeout-minutes: 5 @@ -263,6 +267,8 @@ jobs: export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m edb_api + env: + ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} - name: Test REST API timeout-minutes: 5 @@ -272,6 +278,8 @@ jobs: export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m rest_api + env: + ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }} build-library: name: "Build library artifacts" diff --git a/pytest.ini b/pytest.ini index c42a2838..69a9333f 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,6 +1,6 @@ [pytest] markers = - tests_common_api: mark tests related to the common api - tests_aedt_api: mark tests related to the aedt api - tests_edb_api: mark tests related to the edb api - tests_rest_api: mark tests related to the rest api + common_api: mark tests related to the common api + aedt_common_api: mark tests related to the aedt api + edb_api: mark tests related to the edb api + rest_api: mark tests related to the rest api From 93a6feb502f398c7557c8d99e6ede1b04f4cafb4 Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Tue, 5 Mar 2024 16:37:42 +0100 Subject: [PATCH 4/8] Fix Linux CI --- .github/workflows/ci_cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index aaf05840..575fabc9 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -241,7 +241,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT232=/ansys_inc/v241/Linux64 + export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m aedt_common_api @@ -252,7 +252,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT232=/ansys_inc/v241/Linux64 + export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m common_api @@ -263,7 +263,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT232=/ansys_inc/v241/Linux64 + export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m edb_api @@ -274,7 +274,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT232=/ansys_inc/v241/Linux64 + export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m rest_api From 69d568e352a9ac00ff71b96ebcc84d7ec69a1f23 Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Tue, 5 Mar 2024 16:40:18 +0100 Subject: [PATCH 5/8] Remove pyedb --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 5e34c598..c3071da0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,6 @@ dependencies = [ "build==1.1.1", "twine==5.0.0", "pyaedt==0.8.1", - "pyedb==0.4.0", "pydantic", ] From 4690e3d954fdb49b2a2cf4d3b1a49cb498e70611 Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Wed, 6 Mar 2024 12:35:11 +0100 Subject: [PATCH 6/8] Change Linux path --- .github/workflows/ci_cd.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 575fabc9..201c3035 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -223,7 +223,7 @@ jobs: - name: Create Python venv run: | python -m venv .venv_linux - export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 + export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH - name: Install packages for testing @@ -241,7 +241,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 + export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m aedt_common_api @@ -252,7 +252,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 + export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m common_api @@ -263,7 +263,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 + export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m edb_api @@ -274,7 +274,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT241=/ansys_inc/v241/Linux64 + export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m rest_api From cedebfa0111e85bba865ff9f824a5626adeb3f72 Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Wed, 6 Mar 2024 13:40:13 +0100 Subject: [PATCH 7/8] Change Linux path --- .github/workflows/ci_cd.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 201c3035..c1bb6883 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -223,7 +223,7 @@ jobs: - name: Create Python venv run: | python -m venv .venv_linux - export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 + export ANSYSEM_ROOT241=/ansys_inc/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH - name: Install packages for testing @@ -241,7 +241,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 + export ANSYSEM_ROOT241=/ansys_inc/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m aedt_common_api @@ -252,7 +252,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 + export ANSYSEM_ROOT241=/ansys_inc/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m common_api @@ -263,7 +263,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 + export ANSYSEM_ROOT241=/ansys_inc/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m edb_api @@ -274,7 +274,7 @@ jobs: timeout-minutes: 5 run: | export ANS_NODEPCHECK=1 - export ANSYSEM_ROOT241=/apps/AnsysEM/v241/Linux64 + export ANSYSEM_ROOT241=/ansys_inc/AnsysEM/v241/Linux64 export LD_LIBRARY_PATH=$ANSYSEM_ROOT241/common/mono/Linux64/lib64:$ANSYSEM_ROOT241/Delcross:$LD_LIBRARY_PATH source .venv_linux/bin/activate pytest -v -m rest_api From 24fc8349e6a30e5b31adcb1f6b526be8688602c5 Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Wed, 6 Mar 2024 13:58:47 +0100 Subject: [PATCH 8/8] Add linux test --- .github/workflows/ci_cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index c1bb6883..fdbb9d6b 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -130,7 +130,7 @@ jobs: operating-system: ${{ matrix.os }} python-version: ${{ matrix.python-version }} - tests_windows_aedt: + tests_windows: name: "Windows Tests" strategy: matrix: @@ -284,7 +284,7 @@ jobs: build-library: name: "Build library artifacts" runs-on: ubuntu-latest - needs: [ doc-build, tests_windows_aedt ] + needs: [ doc-build, tests_windows, tests_linux ] steps: - uses: ansys/actions/build-library@v5 with: