Skip to content

Commit 06935d6

Browse files
committed
chore: merge remote-tracking branch 'origin/main' into release/0.71
2 parents f0ed772 + 4a5d906 commit 06935d6

35 files changed

+256
-139
lines changed

.ci/build_matrix.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,9 @@ versions=(
1111
'latest-ubuntu-student'
1212
'v25.2.0'
1313
'v25.1.0'
14-
'v25.1-ubuntu'
14+
'v25.1-ubuntu-cicd'
1515
'v25.1-ubuntu-student'
1616
'v24.2.0'
17-
'v24.2-ubuntu'
1817
'v24.1.0'
1918
'v24.1-ubuntu'
2019
'v23.2.0'

.ci/entrypoint.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
23
export OMPI_ALLOW_RUN_AS_ROOT=1
34
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
45

@@ -15,6 +16,7 @@ if [ -n "${ANSYS_DPF_ACCEPT_LA}" ]; then
1516
fi
1617
fi
1718

19+
1820
echo "RUN_DPF_SERVER: $RUN_DPF_SERVER"
1921

2022
if [ "$RUN_DPF_SERVER" == "true" ]; then
@@ -23,7 +25,16 @@ if [ "$RUN_DPF_SERVER" == "true" ]; then
2325
echo "DPF server started."
2426
fi
2527

28+
if [[ $MAPDL_VERSION == *"cicd"* ]] ; then
29+
echo "Using OpenMPI for CICD version"
30+
export MPI="-mpi openmpi"
31+
32+
else
33+
echo "Using default MPI version"
34+
export MPI=""
35+
fi;
36+
2637
echo "Starting MAPDL..."
2738
echo "Using executable path: ${EXEC_PATH}"
2839

29-
$EXEC_PATH -grpc -dir /jobs -"${DISTRIBUTED_MODE}" -np 2 -db -6000 -m -6000 -
40+
$EXEC_PATH -grpc -dir /jobs -"${DISTRIBUTED_MODE}" -np 2 -db -6000 -m -6000 "${MPI}" -

.ci/start_mapdl.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ if [[ $MAPDL_VERSION == *"cicd"* ]] ; then
7979

8080
echo "Overriding DISTRIBUTED_MODE to 'dmp' for CICD version"
8181
export DISTRIBUTED_MODE="dmp"
82+
8283
else
8384
export DPF_PORT_ARG=""
8485
export DB_INT_PORT=50055
@@ -108,6 +109,7 @@ run \
108109
-e DPF_PORT_INTERNAL=${DPF_PORT_INTERNAL} \
109110
-e EXEC_PATH=${EXEC_PATH} \
110111
-e DISTRIBUTED_MODE=${DISTRIBUTED_MODE} \
112+
-e MAPDL_IMAGE=${MAPDL_IMAGE} \
111113
--shm-size=2gb \
112114
-e I_MPI_SHM_LMT=shm \
113115
-e P_SCHEMA=${P_SCHEMA} \

.github/workflows/ci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
permissions:
4545
pull-requests: write
4646
steps:
47-
- uses: actions-ecosystem/action-add-assignees@a5b84af721c4a621eb9c7a4a95ec20a90d0b88e9 #v1.0.1
47+
- uses: actions-ecosystem/action-add-assignees@a5b84af721c4a621eb9c7a4a95ec20a90d0b88e9 #v1.0.1
4848
if: |
4949
(
5050
github.event_name == 'pull_request' &&
@@ -238,10 +238,11 @@ jobs:
238238
codecov-token: ${{ secrets.CODECOV_TOKEN }}
239239
token: ${{ secrets.GITHUB_TOKEN }}
240240
username: ${{ github.actor }}
241+
log-encryption-key: ${{ secrets.LOG_ENCRYPTION_KEY }}
241242
with:
242243
mapdl-version: "${{ matrix.mapdl-version }}"
243244
file-name: "remote-${{ matrix.mapdl-version }}"
244-
245+
upload-logs: false
245246

246247
build-test-local-matrix:
247248
name: "Build test matrix for minimal and local"
@@ -282,14 +283,16 @@ jobs:
282283
codecov-token: ${{ secrets.CODECOV_TOKEN }}
283284
token: ${{ secrets.GITHUB_TOKEN }}
284285
username: ${{ github.actor }}
286+
log-encryption-key: ${{ secrets.LOG_ENCRYPTION_KEY }}
285287
with:
286288
testing-minimal: false
287289
pytest-arguments: '--reset_only_failed --add_missing_images'
288290
mapdl-version: ${{ matrix.mapdl-version }}
289291
file-name: "local-${{ matrix.mapdl-version }}"
290292
tags: "local"
291293
latest-version: "252"
292-
test_dpf: ${{ contains(matrix.mapdl-version, 'cicd') }}
294+
test_dpf: ${{ contains(matrix.mapdl-version, 'cicd') && !contains(matrix.mapdl-version, '24') }}
295+
upload-logs: false
293296

294297

295298
build-test-ubuntu-minimal:
@@ -303,12 +306,13 @@ jobs:
303306
strategy:
304307
fail-fast: false
305308
matrix:
306-
mapdl-version: ['v25.2-ubuntu-cicd', 'v25.1-ubuntu']
309+
mapdl-version: ['v25.2-ubuntu-cicd', 'v25.1-ubuntu-cicd']
307310
secrets:
308311
license-server: ${{ secrets.LICENSE_SERVER }}
309312
codecov-token: ${{ secrets.CODECOV_TOKEN }}
310313
token: ${{ secrets.GITHUB_TOKEN }}
311314
username: ${{ github.actor }}
315+
log-encryption-key: ${{ secrets.LOG_ENCRYPTION_KEY }}
312316
with:
313317
testing-minimal: true
314318
pytest-arguments: ''
@@ -317,6 +321,7 @@ jobs:
317321
tags: "local,minimal"
318322
latest-version: "252"
319323
test_dpf: false
324+
upload-logs: false
320325

321326

322327
build-test-ubuntu-console:
@@ -330,12 +335,13 @@ jobs:
330335
strategy:
331336
fail-fast: false
332337
matrix:
333-
mapdl-version: ['v25.2-ubuntu-cicd', 'v25.1-ubuntu']
338+
mapdl-version: ['v25.2-ubuntu-cicd', 'v25.1-ubuntu-cicd']
334339
secrets:
335340
license-server: ${{ secrets.LICENSE_SERVER }}
336341
codecov-token: ${{ secrets.CODECOV_TOKEN }}
337342
token: ${{ secrets.GITHUB_TOKEN }}
338343
username: ${{ github.actor }}
344+
log-encryption-key: ${{ secrets.LOG_ENCRYPTION_KEY }}
339345
with:
340346
latest-version: "252"
341347
mapdl-version: ${{ matrix.mapdl-version }}
@@ -345,7 +351,7 @@ jobs:
345351
file-name: "${{ matrix.mapdl-version }}-console"
346352
tags: "local,console"
347353
test_dpf: false
348-
354+
upload-logs: false
349355

350356
package:
351357
name: "Package library"

.github/workflows/test-local.yml

Lines changed: 57 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,28 @@ on:
3131
required: false
3232
type: boolean
3333
default: false
34-
34+
3535
test_dpf:
3636
description: |
3737
If true, the DPF tests will be run.
3838
required: false
3939
type: boolean
4040
default: true
41-
41+
4242
on-console:
4343
description: |
4444
If true, the tests will be run on console.
4545
required: false
4646
type: boolean
4747
default: false
4848

49+
upload-logs:
50+
description: |
51+
If true, logs will be uploaded encrypted. Set to false to disable log upload (for security).
52+
required: false
53+
type: boolean
54+
default: false
55+
4956
file-name:
5057
description: |
5158
Name of the file to save the logs.
@@ -72,7 +79,7 @@ on:
7279
required: false
7380
type: string
7481
default: ghcr.io/ansys/mapdl
75-
82+
7683
runner:
7784
description: |
7885
Runner to use.
@@ -86,7 +93,7 @@ on:
8693
required: false
8794
type: string
8895
default: "3.12"
89-
96+
9097
secrets:
9198
license-server:
9299
description: |
@@ -97,12 +104,17 @@ on:
97104
description: |
98105
Token for Codecov.
99106
required: true
100-
107+
108+
log-encryption-key:
109+
description: |
110+
Encryption key for sensitive log files.
111+
required: false
112+
101113
token:
102114
description: |
103115
Token for GitHub. Used also for login into ghcr.io.
104116
required: true
105-
117+
106118
username:
107119
description: |
108120
GitHub username for login into ghcr.io.
@@ -126,7 +138,7 @@ jobs:
126138
TESTING_MINIMAL: ${{ inputs.testing-minimal }}
127139
P_SCHEMA: "/ansys_inc/v241/ansys/ac4/schema"
128140
PYTEST_TIMEOUT: 120 # seconds. Limit the duration for each unit test
129-
PYTEST_ARGUMENTS: '-vvv -ra --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile --report-log-exclude-logs-on-passed-tests --strict-markers'
141+
PYTEST_ARGUMENTS: '-vvv -ra --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=2 --reruns 2 --reruns-delay 2 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile --report-log-exclude-logs-on-passed-tests --strict-markers'
130142
OMPI_ALLOW_RUN_AS_ROOT: 1
131143
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
132144
DATAPROCESSING_DEBUG: /home/mapdl/dpf_logs
@@ -168,31 +180,32 @@ jobs:
168180
if [[ "${MAPDL_VERSION}" == *"cicd"* ]]; then
169181
echo "CICD MAPDL version detected, testing DPF backend for results module.";
170182
echo "TEST_DPF_BACKEND=true" >> $GITHUB_ENV;
183+
echo "PYMAPDL_ADDITIONAL_SWITCHES=-mpi openmpi" >> $GITHUB_ENV;
171184
fi
172185
173186
echo "ON_STUDENT: $ON_STUDENT"
174187
echo "TAG_STUDENT: $TAG_STUDENT"
175188
echo "ON_STUDENT=$(echo $ON_STUDENT)" >> $GITHUB_OUTPUT
176189
echo "TAG_STUDENT=$(echo $TAG_STUDENT)" >> $GITHUB_OUTPUT
177-
190+
178191
- name: "Install gcc"
179192
shell: bash
180193
if: ${{ contains(inputs.mapdl-version, 'cicd') }}
181194
run: |
182195
apt-get update && apt-get -y install gcc mono-mcs g++
183-
196+
184197
185198
- name: "Installing minimal OS packages"
186199
shell: bash
187200
if: inputs.testing-minimal == true
188201
run: |
189-
apt-get update && apt install -y libgomp1 graphviz curl && apt-get clean
202+
apt-get update && apt install -y libgomp1 graphviz curl git && apt-get clean
190203
191204
- name: "Installing OS packages"
192205
shell: bash
193206
if: inputs.testing-minimal == false
194207
run: |
195-
apt-get update && apt install -y libgl1 libglx-mesa0 xvfb libgomp1 graphviz curl && apt-get clean
208+
apt-get update && apt install -y libgl1 libglx-mesa0 xvfb libgomp1 graphviz curl git && apt-get clean
196209
197210
- name: "Setup Python"
198211
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0
@@ -250,7 +263,7 @@ jobs:
250263
echo "ON_UBUNTU: $ON_UBUNTU"
251264
echo "ON_STUDENT: $ON_STUDENT"
252265
253-
# Because there is no 'ansys-tools-path' we need to input the
266+
# Because there is no 'ansys-tools-common' we need to input the
254267
# executable path with the env var: PYMAPDL_MAPDL_EXEC.
255268
256269
if [[ "${MAPDL_VERSION}" == *"latest-ubuntu"* ]] ; then
@@ -276,9 +289,7 @@ jobs:
276289
$cmd ${PYTEST_INPUT_ARGUMENTS} \
277290
${PYTEST_ARGUMENTS} \
278291
--report-log=$file_name.jsonl \
279-
--cov-report=xml:$file_name.xml \
280-
--log-file=pytest.log \
281-
--log-file-level="DEBUG"
292+
--cov-report=xml:$file_name.xml
282293
283294
- name: "Upload pytest reports to GitHub"
284295
if: always()
@@ -295,12 +306,37 @@ jobs:
295306
run: |
296307
.ci/collect_mapdl_logs_locals.sh
297308
298-
# - name: "Upload logs to GitHub"
299-
# if: always()
300-
# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
301-
# with:
302-
# name: logs-${{ inputs.file-name }}.tgz
303-
# path: ./logs-${{ inputs.file-name }}.tgz
309+
- name: "Encrypt and upload logs to GitHub"
310+
if: always() && inputs.upload-logs == true
311+
env:
312+
ENCRYPTION_KEY: ${{ secrets.log-encryption-key }}
313+
FILE_NAME: ${{ inputs.file-name }}
314+
shell: bash
315+
run: |
316+
# Check if logs exist
317+
if [ -f "./logs-${FILE_NAME}.tgz" ]; then
318+
echo "Encrypting logs..."
319+
320+
# Encrypt using OpenSSL (already available in container)
321+
openssl enc -aes-256-cbc -salt -pbkdf2 \
322+
-in ./logs-${FILE_NAME}.tgz \
323+
-out ./logs-${FILE_NAME}.tgz.enc \
324+
-pass env:ENCRYPTION_KEY
325+
326+
echo "Logs encrypted successfully"
327+
echo "To decrypt locally, use:"
328+
echo "openssl enc -aes-256-cbc -d -pbkdf2 -in logs-${FILE_NAME}.tgz.enc -out logs-${FILE_NAME}.tgz -pass pass:YOUR_KEY"
329+
else
330+
echo "No log file found to encrypt"
331+
fi
332+
333+
- name: "Upload encrypted logs to GitHub"
334+
if: always() && inputs.upload-logs == true
335+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
336+
with:
337+
name: logs-${{ inputs.file-name }}-encrypted
338+
path: ./logs-${{ inputs.file-name }}.tgz.enc
339+
retention-days: 3
304340

305341
- name: "Display files structure"
306342
if: always()

0 commit comments

Comments
 (0)