Skip to content

Commit f36e0ed

Browse files
committed
update dpf
1 parent bbbe036 commit f36e0ed

File tree

1 file changed

+28
-21
lines changed

1 file changed

+28
-21
lines changed

.github/workflows/geometry-mechanical-dpf.yml

+28-21
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ jobs:
109109
110110
- name: Install dependencies
111111
run: |
112-
. /env/bin/activate
112+
. /env/bin/activate
113113
python -m pip install --upgrade pip
114114
pip install -r geometry-mechanical-dpf/requirements_${{ matrix.ansys-release }}.txt
115115
@@ -140,46 +140,55 @@ jobs:
140140

141141
dpf:
142142
name: Data Processing Framework
143-
runs-on: ubuntu-latest-8-cores
143+
runs-on: ubuntu-latest
144144
needs: mechanical
145145
strategy:
146146
fail-fast: false
147147
matrix:
148148
ansys-release: [24.1, 24.2]
149-
container:
150-
image: 'ghcr.io/ansys/mechanical:${{ matrix.ansys-release }}.0'
151-
options: --entrypoint /bin/bash
152149
steps:
153150

154151
- name: Checkout code
155152
uses: actions/checkout@v4
156153
with:
157154
sparse-checkout: 'geometry-mechanical-dpf'
158155

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 }}
167160

168161
- name: Install dependencies
169162
run: |
170-
. /env/bin/activate
171163
python -m pip install --upgrade pip
164+
python -m venv .venv
165+
. .venv/bin/activate
172166
pip install -r geometry-mechanical-dpf/requirements_${{ matrix.ansys-release }}.txt
173167
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
175184
uses: actions/download-artifact@v4
176185
with:
177186
name: geometry-outputs-${{ matrix.ansys-release }}
178187
path: geometry-mechanical-dpf/outputs
179188

180189
- name: Run the PyDPF script
181190
run: |
182-
. /env/bin/activate
191+
. .venv/bin/activate
183192
xvfb-run python geometry-mechanical-dpf/03_dpf.py > pydpflogs${{ matrix.ansys-release }}.txt 2>&1 || true
184193
cat pydpflogs${{ matrix.ansys-release }}.txt
185194
@@ -189,8 +198,6 @@ jobs:
189198
name: pymechanical-dpf-outputs-${{ matrix.ansys-release }}
190199
path: geometry-mechanical-dpf/outputs
191200

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

Comments
 (0)