Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
240db17
chore: empty commit
germa89 Nov 21, 2025
561695d
chore: adding changelog file 4319.fixed.md [dependabot-skip]
pyansys-ci-bot Nov 21, 2025
2a8563a
feat: add log upload options with encryption for local and remote tes…
germa89 Nov 25, 2025
801fef7
chore: clean up whitespace in workflow YAML files
germa89 Nov 25, 2025
9cec690
feat: add upload logs option for local and remote testing workflows
germa89 Nov 25, 2025
5fcf6e2
feat: add log encryption key to CI jobs for enhanced security
germa89 Nov 25, 2025
fe344ce
fix: set upload-logs to true in CI jobs for consistent logging
germa89 Nov 25, 2025
aaa0b3e
fix: remove unnecessary './' prefix from log file paths in display_lo…
germa89 Nov 25, 2025
7a850f8
fix: update ubuntu version identifiers in build_matrix.sh for consist…
germa89 Nov 25, 2025
29d0ade
fix: enhance log display in display_logs_remote.sh for better debugging
germa89 Nov 25, 2025
3f64cae
fix: add MPI environment variable for CICD version in start_mapdl.sh
germa89 Nov 25, 2025
692964e
fix: add MPI switches for CICD version in test-local workflow
germa89 Nov 25, 2025
282ef46
fix: quote MPI variable in docker run command for proper handling
germa89 Nov 25, 2025
5d01e36
fix: remove quotes around MPI variable in docker run command for prop…
germa89 Nov 25, 2025
bbbc830
fix: remove quotes around MPI switches in CICD testing for proper env…
germa89 Nov 26, 2025
f6c71b5
fix: remove quotes around LOG_NAMES variable in log display scripts f…
germa89 Nov 26, 2025
9795ef3
fix: reduce maxfail and reruns in pytest arguments for local and remo…
germa89 Nov 26, 2025
c637c1c
fix: add MAPDL_IMAGE environment variable to start_mapdl.sh for Docke…
germa89 Nov 26, 2025
c07b830
fix: update mapdl-version in CI configuration for consistency across …
germa89 Nov 26, 2025
eaf1c53
fix: update test_dpf condition to exclude version 24 in CI configuration
germa89 Nov 26, 2025
cc2afb0
fix: remove MPI argument from docker run command in start_mapdl.sh
germa89 Nov 26, 2025
2de6ecc
fix: remove 'v24.2-ubuntu-cicd' from version list in build_matrix.sh
germa89 Nov 26, 2025
c98ea95
fix: remove MPI argument for non-CICD versions in start_mapdl.sh
germa89 Nov 26, 2025
9bb22e1
fix: add echo statement for default MPI version in entrypoint.sh
germa89 Nov 26, 2025
c261b0e
Revert display_logs scripts to match main
germa89 Nov 26, 2025
53aa890
revert: "fix: remove 'v24.2-ubuntu-cicd' from version list in build_m…
germa89 Nov 26, 2025
3ed692b
fix: remove 'v24.2-ubuntu-cicd' from version list in build_matrix.sh
germa89 Nov 26, 2025
622a2ce
fix: disable log uploads in CI for remote and local builds
germa89 Nov 26, 2025
f5eecfa
chore: adding changelog file 4319.fixed.md [dependabot-skip]
pyansys-ci-bot Nov 26, 2025
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
3 changes: 1 addition & 2 deletions .ci/build_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ versions=(
'latest-ubuntu-student'
'v25.2.0'
'v25.1.0'
'v25.1-ubuntu'
'v25.1-ubuntu-cicd'
'v25.1-ubuntu-student'
'v24.2.0'
'v24.2-ubuntu'
'v24.1.0'
'v24.1-ubuntu'
'v23.2.0'
Expand Down
13 changes: 12 additions & 1 deletion .ci/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash

export OMPI_ALLOW_RUN_AS_ROOT=1
export OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1

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


echo "RUN_DPF_SERVER: $RUN_DPF_SERVER"

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

if [[ $MAPDL_VERSION == *"cicd"* ]] ; then
echo "Using OpenMPI for CICD version"
export MPI="-mpi openmpi"

else
echo "Using default MPI version"
export MPI=""
fi;

echo "Starting MAPDL..."
echo "Using executable path: ${EXEC_PATH}"

$EXEC_PATH -grpc -dir /jobs -"${DISTRIBUTED_MODE}" -np 2 -db -6000 -m -6000 -
$EXEC_PATH -grpc -dir /jobs -"${DISTRIBUTED_MODE}" -np 2 -db -6000 -m -6000 "${MPI}" -
2 changes: 2 additions & 0 deletions .ci/start_mapdl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ if [[ $MAPDL_VERSION == *"cicd"* ]] ; then

echo "Overriding DISTRIBUTED_MODE to 'dmp' for CICD version"
export DISTRIBUTED_MODE="dmp"

else
export DPF_PORT_ARG=""
export DB_INT_PORT=50055
Expand Down Expand Up @@ -108,6 +109,7 @@ run \
-e DPF_PORT_INTERNAL=${DPF_PORT_INTERNAL} \
-e EXEC_PATH=${EXEC_PATH} \
-e DISTRIBUTED_MODE=${DISTRIBUTED_MODE} \
-e MAPDL_IMAGE=${MAPDL_IMAGE} \
--shm-size=2gb \
-e I_MPI_SHM_LMT=shm \
-e P_SCHEMA=${P_SCHEMA} \
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: actions-ecosystem/action-add-assignees@a5b84af721c4a621eb9c7a4a95ec20a90d0b88e9 #v1.0.1
- uses: actions-ecosystem/action-add-assignees@a5b84af721c4a621eb9c7a4a95ec20a90d0b88e9 #v1.0.1
if: |
(
github.event_name == 'pull_request' &&
Expand Down Expand Up @@ -238,10 +238,11 @@ jobs:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }}
log-encryption-key: ${{ secrets.LOG_ENCRYPTION_KEY }}
with:
mapdl-version: "${{ matrix.mapdl-version }}"
file-name: "remote-${{ matrix.mapdl-version }}"

upload-logs: false

build-test-local-matrix:
name: "Build test matrix for minimal and local"
Expand Down Expand Up @@ -282,14 +283,16 @@ jobs:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }}
log-encryption-key: ${{ secrets.LOG_ENCRYPTION_KEY }}
with:
testing-minimal: false
pytest-arguments: '--reset_only_failed --add_missing_images'
mapdl-version: ${{ matrix.mapdl-version }}
file-name: "local-${{ matrix.mapdl-version }}"
tags: "local"
latest-version: "252"
test_dpf: ${{ contains(matrix.mapdl-version, 'cicd') }}
test_dpf: ${{ contains(matrix.mapdl-version, 'cicd') && !contains(matrix.mapdl-version, '24') }}
upload-logs: false


build-test-ubuntu-minimal:
Expand All @@ -303,12 +306,13 @@ jobs:
strategy:
fail-fast: false
matrix:
mapdl-version: ['v25.2-ubuntu-cicd', 'v25.1-ubuntu']
mapdl-version: ['v25.2-ubuntu-cicd', 'v25.1-ubuntu-cicd']
secrets:
license-server: ${{ secrets.LICENSE_SERVER }}
codecov-token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }}
log-encryption-key: ${{ secrets.LOG_ENCRYPTION_KEY }}
with:
testing-minimal: true
pytest-arguments: ''
Expand All @@ -317,6 +321,7 @@ jobs:
tags: "local,minimal"
latest-version: "252"
test_dpf: false
upload-logs: false


build-test-ubuntu-console:
Expand All @@ -330,12 +335,13 @@ jobs:
strategy:
fail-fast: false
matrix:
mapdl-version: ['v25.2-ubuntu-cicd', 'v25.1-ubuntu']
mapdl-version: ['v25.2-ubuntu-cicd', 'v25.1-ubuntu-cicd']
secrets:
license-server: ${{ secrets.LICENSE_SERVER }}
codecov-token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
username: ${{ github.actor }}
log-encryption-key: ${{ secrets.LOG_ENCRYPTION_KEY }}
with:
latest-version: "252"
mapdl-version: ${{ matrix.mapdl-version }}
Expand All @@ -345,7 +351,7 @@ jobs:
file-name: "${{ matrix.mapdl-version }}-console"
tags: "local,console"
test_dpf: false

upload-logs: false

package:
name: "Package library"
Expand Down
68 changes: 53 additions & 15 deletions .github/workflows/test-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,28 @@ on:
required: false
type: boolean
default: false

test_dpf:
description: |
If true, the DPF tests will be run.
required: false
type: boolean
default: true

on-console:
description: |
If true, the tests will be run on console.
required: false
type: boolean
default: false

upload-logs:
description: |
If true, logs will be uploaded encrypted. Set to false to disable log upload (for security).
required: false
type: boolean
default: false

file-name:
description: |
Name of the file to save the logs.
Expand All @@ -72,7 +79,7 @@ on:
required: false
type: string
default: ghcr.io/ansys/mapdl

runner:
description: |
Runner to use.
Expand All @@ -86,7 +93,7 @@ on:
required: false
type: string
default: "3.12"

secrets:
license-server:
description: |
Expand All @@ -97,12 +104,17 @@ on:
description: |
Token for Codecov.
required: true


log-encryption-key:
description: |
Encryption key for sensitive log files.
required: false

token:
description: |
Token for GitHub. Used also for login into ghcr.io.
required: true

username:
description: |
GitHub username for login into ghcr.io.
Expand All @@ -126,7 +138,7 @@ jobs:
TESTING_MINIMAL: ${{ inputs.testing-minimal }}
P_SCHEMA: "/ansys_inc/v241/ansys/ac4/schema"
PYTEST_TIMEOUT: 120 # seconds. Limit the duration for each unit test
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'
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'
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
DATAPROCESSING_DEBUG: /home/mapdl/dpf_logs
Expand Down Expand Up @@ -168,19 +180,20 @@ jobs:
if [[ "${MAPDL_VERSION}" == *"cicd"* ]]; then
echo "CICD MAPDL version detected, testing DPF backend for results module.";
echo "TEST_DPF_BACKEND=true" >> $GITHUB_ENV;
echo "PYMAPDL_ADDITIONAL_SWITCHES=-mpi openmpi" >> $GITHUB_ENV;
fi

echo "ON_STUDENT: $ON_STUDENT"
echo "TAG_STUDENT: $TAG_STUDENT"
echo "ON_STUDENT=$(echo $ON_STUDENT)" >> $GITHUB_OUTPUT
echo "TAG_STUDENT=$(echo $TAG_STUDENT)" >> $GITHUB_OUTPUT

- name: "Install gcc"
shell: bash
if: ${{ contains(inputs.mapdl-version, 'cicd') }}
run: |
apt-get update && apt-get -y install gcc mono-mcs g++


- name: "Installing minimal OS packages"
shell: bash
Expand Down Expand Up @@ -295,12 +308,37 @@ jobs:
run: |
.ci/collect_mapdl_logs_locals.sh

# - name: "Upload logs to GitHub"
# if: always()
# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
# with:
# name: logs-${{ inputs.file-name }}.tgz
# path: ./logs-${{ inputs.file-name }}.tgz
- name: "Encrypt and upload logs to GitHub"
if: always() && inputs.upload-logs == true
env:
ENCRYPTION_KEY: ${{ secrets.log-encryption-key }}
FILE_NAME: ${{ inputs.file-name }}
shell: bash
run: |
# Check if logs exist
if [ -f "./logs-${FILE_NAME}.tgz" ]; then
echo "Encrypting logs..."

# Encrypt using OpenSSL (already available in container)
openssl enc -aes-256-cbc -salt -pbkdf2 \
-in ./logs-${FILE_NAME}.tgz \
-out ./logs-${FILE_NAME}.tgz.enc \
-pass env:ENCRYPTION_KEY

echo "Logs encrypted successfully"
echo "To decrypt locally, use:"
echo "openssl enc -aes-256-cbc -d -pbkdf2 -in logs-${FILE_NAME}.tgz.enc -out logs-${FILE_NAME}.tgz -pass pass:YOUR_KEY"
else
echo "No log file found to encrypt"
fi

- name: "Upload encrypted logs to GitHub"
if: always() && inputs.upload-logs == true
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
with:
name: logs-${{ inputs.file-name }}-encrypted
path: ./logs-${{ inputs.file-name }}.tgz.enc
retention-days: 3

- name: "Display files structure"
if: always()
Expand Down
57 changes: 47 additions & 10 deletions .github/workflows/test-remote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ on:
required: true
type: string

upload-logs:
description: |
If true, logs will be uploaded encrypted. Set to false to disable log upload (for security).
required: false
type: boolean
default: false

python-version:
description: |
Python version to use.
Expand All @@ -30,7 +37,7 @@ on:
description: |
Username for the GitHub container registry.
required: true

token:
description: |
Token for GitHub.
Expand All @@ -40,12 +47,17 @@ on:
description: |
License server for ANSYS MAPDL
required: true

codecov-token:
description: |
Token for Codecov.
required: true

log-encryption-key:
description: |
Encryption key for sensitive log files.
required: false

permissions: {}

jobs:
Expand Down Expand Up @@ -73,7 +85,7 @@ jobs:
DPF_START_SERVER: False
HAS_DPF: True
TEST_DPF_BACKEND: false
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'
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'
MAPDL_PACKAGE: ghcr.io/ansys/mapdl

steps:
Expand Down Expand Up @@ -154,7 +166,7 @@ jobs:
echo "TAG_STUDENT: $TAG_STUDENT"
echo "ON_STUDENT=$(echo $ON_STUDENT)" >> $GITHUB_OUTPUT
echo "TAG_STUDENT=$(echo $TAG_STUDENT)" >> $GITHUB_OUTPUT

- name: "Pull, launch, and validate MAPDL service"
id: start_mapdl
env:
Expand Down Expand Up @@ -320,12 +332,37 @@ jobs:
run: |
.ci/collect_mapdl_logs_remote.sh

# - name: "Upload logs to GitHub"
# if: always()
# uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
# with:
# name: logs-${{ inputs.file-name }}.tgz
# path: ./logs-${{ inputs.file-name }}.tgz
- name: "Encrypt and upload logs to GitHub"
if: always() && inputs.upload-logs == true
env:
ENCRYPTION_KEY: ${{ secrets.log-encryption-key }}
FILE_NAME: ${{ inputs.file-name }}
shell: bash
run: |
# Check if logs exist
if [ -f "./logs-${FILE_NAME}.tgz" ]; then
echo "Encrypting logs..."

# Encrypt using OpenSSL
openssl enc -aes-256-cbc -salt -pbkdf2 \
-in ./logs-${FILE_NAME}.tgz \
-out ./logs-${FILE_NAME}.tgz.enc \
-pass env:ENCRYPTION_KEY

echo "Logs encrypted successfully"
echo "To decrypt locally, use:"
echo "openssl enc -aes-256-cbc -d -pbkdf2 -in logs-${FILE_NAME}.tgz.enc -out logs-${FILE_NAME}.tgz -pass pass:YOUR_KEY"
else
echo "No log file found to encrypt"
fi

- name: "Upload encrypted logs to GitHub"
if: always() && inputs.upload-logs == true
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 #v4.6.2
with:
name: logs-${{ inputs.file-name }}-encrypted
path: ./logs-${{ inputs.file-name }}.tgz.enc
retention-days: 3

- name: "Display files structure"
if: always()
Expand Down
1 change: 1 addition & 0 deletions doc/changelog.d/4319.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cicd mpi issue and adding conditional encrypted log uploads
Loading