@@ -109,7 +109,7 @@ jobs:
109
109
110
110
- name : Install dependencies
111
111
run : |
112
- . /env/bin/activate
112
+ . /env/bin/activate
113
113
python -m pip install --upgrade pip
114
114
pip install -r geometry-mechanical-dpf/requirements_${{ matrix.ansys-release }}.txt
115
115
@@ -140,46 +140,55 @@ jobs:
140
140
141
141
dpf :
142
142
name : Data Processing Framework
143
- runs-on : ubuntu-latest-8-cores
143
+ runs-on : ubuntu-latest
144
144
needs : mechanical
145
145
strategy :
146
146
fail-fast : false
147
147
matrix :
148
148
ansys-release : [24.1, 24.2]
149
- container :
150
- image : ' ghcr.io/ansys/mechanical:${{ matrix.ansys-release }}.0'
151
- options : --entrypoint /bin/bash
152
149
steps :
153
150
154
151
- name : Checkout code
155
152
uses : actions/checkout@v4
156
153
with :
157
154
sparse-checkout : ' geometry-mechanical-dpf'
158
155
159
- - name : Set up Python
160
- run : |
161
- apt update
162
- apt install --reinstall ca-certificates
163
- apt install software-properties-common -y
164
- add-apt-repository ppa:deadsnakes/ppa -y
165
- apt install -y python${{ env.MAIN_PYTHON_VERSION }} python${{ env.MAIN_PYTHON_VERSION }}-venv
166
- python${{ env.MAIN_PYTHON_VERSION }} -m venv /env
156
+ - name : Set up Python ${{ env.MAIN_PYTHON_VERSION }}
157
+ uses : actions/setup-python@v4
158
+ with :
159
+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
167
160
168
161
- name : Install dependencies
169
162
run : |
170
- . /env/bin/activate
171
163
python -m pip install --upgrade pip
164
+ python -m venv .venv
165
+ . .venv/bin/activate
172
166
pip install -r geometry-mechanical-dpf/requirements_${{ matrix.ansys-release }}.txt
173
167
174
- - name : Check out the geometry outputs
168
+ - name : Update ansys-version for DPF
169
+ run : |
170
+ echo ansys_version="${${{ matrix.ansys-release}}//"."}" >> $GITHUB_ENV
171
+
172
+ - name : display anys_version
173
+ run : |
174
+ echo $ansys_version
175
+
176
+ - name : " Install DPF server"
177
+ id : set-server-path
178
+ uses :
ansys/pydpf-actions/[email protected]
179
+ with :
180
+ dpf-standalone-TOKEN : ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
181
+ ANSYS_VERSION : ${{env.ansys_version}}
182
+
183
+ - name : Check out the mechanical outputs
175
184
uses : actions/download-artifact@v4
176
185
with :
177
186
name : geometry-outputs-${{ matrix.ansys-release }}
178
187
path : geometry-mechanical-dpf/outputs
179
188
180
189
- name : Run the PyDPF script
181
190
run : |
182
- . /env /bin/activate
191
+ . .venv /bin/activate
183
192
xvfb-run python geometry-mechanical-dpf/03_dpf.py > pydpflogs${{ matrix.ansys-release }}.txt 2>&1 || true
184
193
cat pydpflogs${{ matrix.ansys-release }}.txt
185
194
@@ -189,8 +198,6 @@ jobs:
189
198
name : pymechanical-dpf-outputs-${{ matrix.ansys-release }}
190
199
path : geometry-mechanical-dpf/outputs
191
200
192
- - name : Stop any remaining containers
193
- if : always()
194
- run : |
195
- docker stop $(docker ps -a -q)
196
- docker rm $(docker ps -a -q)
201
+ - name : " Kill all servers"
202
+ uses :
ansys/pydpf-actions/[email protected]
203
+ if : always()
0 commit comments