Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 14 additions & 67 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,16 @@ jobs:
with:
python-version: 3.8

- name: Clone dpf-standalone
run: |
git clone https://${{secrets.DPF_PIPELINE}}@github.com/ansys-dpf/dpf-standalone
- id: install-dpf
uses: pyansys/pydpf-actions/install-dpf-server@v1
with:
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
ANSYS_VERSION : ${{env.ANSYS_VERSION}}

- name: Set AWP_ROOT$env:ANSYS_VERSION
run: echo "AWP_ROOT$env:ANSYS_VERSION=${{github.workspace}}\dpf-standalone/v$env:ANSYS_VERSION" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append

- name: Set SERVER
run: echo "SERVER=$env:AWP_ROOT221" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append

- name: Extract standalone zip
run: |
ls
cd dpf-standalone
7z x v$env:ANSYS_VERSION.7z
ls v$env:ANSYS_VERSION
echo AWP_ROOT$env:ANSYS_VERSION
echo "AWP_ROOT$env:ANSYS_VERSION=${{ steps.install-dpf.outputs.SERVER }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append

- name: Install ansys-dpf-core
shell: cmd
Expand All @@ -59,27 +53,6 @@ jobs:
pip install %WHEELPATH%
python -c "from ansys.dpf import core; print(core.Report(gpu=False))"

- name: Start DPF Server
run: |
cd $env:SERVER\aisol\bin\winx64
ls .
Start-Process -FilePath "./Ans.Dpf.Grpc.bat" -ArgumentList "--address 127.0.0.1 --port $env:DPF_PORT" -RedirectStandardOutput "log.txt"
python -c "from ansys.dpf import core; core.connect_to_server(port=$env:DPF_PORT); print('Python Connected')"
timeout-minutes: 1

- name: Kill all servers
shell: cmd
run: |
tasklist /FI "IMAGENAME eq Ans.Dpf.Grpc.exe" 2>NUL | find /I /N "Ans.Dpf.Grpc.exe">NUL
ECHO %ERRORLEVEL%
if "%ERRORLEVEL%"=="0"(taskkill /f /im Ans.Dpf.Grpc.exe)
continue-on-error: true

- name: Show DPF Server Logs
run: Get-Content -Path $env:SERVER\aisol\bin\winx64\log.txt
continue-on-error: true
if: always()

- name: WHEEL publish artifacts
uses: actions/upload-artifact@v2
with:
Expand Down Expand Up @@ -181,23 +154,18 @@ jobs:
with:
python-version: 3.8

- name: Clone dpf-standalone
run: |
git clone https://${{secrets.DPF_PIPELINE}}@github.com/ansys-dpf/dpf-standalone
- id: install-dpf
uses: pyansys/pydpf-actions/install-dpf-server@v1
with:
dpf-standalone-TOKEN: ${{secrets.DPF_PIPELINE}}
ANSYS_VERSION : ${{env.ANSYS_VERSION}}

- name: Set AWP_ROOT$env:ANSYS_VERSION
run: echo "AWP_ROOT$env:ANSYS_VERSION=${{github.workspace}}\dpf-standalone/v$env:ANSYS_VERSION" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
run: echo "AWP_ROOT$env:ANSYS_VERSION=${{ steps.install-dpf.outputs.SERVER }}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append

- name: Set SERVER
run: echo "SERVER=$env:AWP_ROOT221" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append

- name: Extract standalone zip
run: |
ls
cd dpf-standalone
7z x v$env:ANSYS_VERSION.7z
ls v$env:ANSYS_VERSION

- name: Install ansys-dpf-core
shell: cmd
run: |
Expand All @@ -209,27 +177,6 @@ jobs:
pip install %WHEELPATH%
python -c "from ansys.dpf import core; print(core.Report(gpu=False))"

- name: Start DPF Server
run: |
cd $env:SERVER\aisol\bin\winx64
ls .
Start-Process -FilePath "./Ans.Dpf.Grpc.bat" -ArgumentList "--address 127.0.0.1 --port $env:DPF_PORT" -RedirectStandardOutput "log.txt" -NoNewWindow
python -c "from ansys.dpf import core; core.connect_to_server(port=$env:DPF_PORT); print('Python Connected')"
timeout-minutes: 1

- name: Kill all servers
shell: cmd
run: |
tasklist /FI "IMAGENAME eq Ans.Dpf.Grpc.exe" 2>NUL | find /I /N "Ans.Dpf.Grpc.exe">NUL
ECHO %ERRORLEVEL%
if "%ERRORLEVEL%"=="0"(taskkill /f /im Ans.Dpf.Grpc.exe)
continue-on-error: true

- name: Show DPF Server Logs
run: Get-Content -Path $env:SERVER\aisol\bin\winx64\log.txt
continue-on-error: true
if: always()

- name: Install OpenGL
run: |
Set-StrictMode -Version Latest
Expand Down Expand Up @@ -305,4 +252,4 @@ jobs:
git remote add origin https://${{secrets.PYANSYS_CI_BOT_TOKEN}}@github.com/pyansys/DPF-Core-docs
git push -u origin $env:GH_DOC_BRANCH --force
env:
GH_DOC_BRANCH: gh-pages
GH_DOC_BRANCH: gh-pages