Skip to content

Commit 82164be

Browse files
committed
Merge branch 'main' into release/0.1
2 parents b5d78fd + 7a8c0fd commit 82164be

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+774
-291
lines changed

.ci/collect_mapdl_logs.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
if [[ $MAPDL_VERSION == *"ubuntu"* ]] ; then
3+
echo "It is an ubuntu based image"
4+
export FILE=/jobs/file
5+
export WDIR='/jobs/'
6+
7+
else
8+
echo "It is a CentOS based image"
9+
export FILE=file
10+
export WDIR=""
11+
12+
fi;
13+
14+
15+
mkdir "$LOG_NAMES" && echo "Successfully generated directory $LOG_NAMES"
16+
17+
####
18+
echo "Collecting MAPDL logs..."
19+
20+
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "mkdir -p /mapdl_logs && echo 'Successfully created directory inside docker container'") || echo "Failed to create a directory inside docker container for logs."
21+
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.out' > /dev/null ;then cp -f /file*.out /mapdl_logs && echo 'Successfully copied out files.'; fi") || echo "Failed to copy the 'out' files into a local file"
22+
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.err' > /dev/null ;then cp -f /file*.err /mapdl_logs && echo 'Successfully copied err files.'; fi") || echo "Failed to copy the 'err' files into a local file"
23+
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.log' > /dev/null ;then cp -f /file*.log /mapdl_logs && echo 'Successfully copied log files.'; fi") || echo "Failed to copy the 'log' files into a local file"
24+
(docker exec "$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$WDIR*.crash' > /dev/null ;then cp -f /*.crash /mapdl_logs && echo 'Successfully copied crash files.'; fi") || echo "Failed to copy the 'crash' files into a local file"
25+
26+
docker cp "$MAPDL_INSTANCE":/mapdl_logs/. ./"$LOG_NAMES"/. || echo "Failed to copy the 'log-build-docs' files into a local directory"
27+
28+
####
29+
echo "Collecting local build logs..."
30+
31+
echo "Collecting docker run log..."
32+
cp log.txt ./"$LOG_NAMES"/log.txt || echo "MAPDL run docker log not found."
33+
34+
echo "Copying docker launch log..."
35+
cp mapdl_launch.log ./"$LOG_NAMES"/mapdl_launch.log || echo "MAPDL launch docker log not found."
36+
37+
echo "Collecting file structure..."
38+
ls -R > ./"$LOG_NAMES"/files_structure.txt || echo "Failed to copy file structure to a file"
39+
40+
echo "Collecting docker file structure..."
41+
docker exec "$MAPDL_INSTANCE" /bin/bash -c "ls -R" > ./"$LOG_NAMES"/docker_files_structure.txt || echo "Failed to copy the docker structure into a local file"
42+
43+
echo "Tar files..."
44+
tar cvzf ./"$LOG_NAMES".tgz ./"$LOG_NAMES" || echo "Failed to compress"

.ci/display_logs.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
echo "::group:: Display files structure" && ls -R && echo "::endgroup::"
4+
5+
6+
echo "::group:: Display files structure" && docker exec "$MAPDL_INSTANCE" /bin/bash -c "ls -R" && echo "::endgroup::" || echo "Failed to display the docker structure."
7+
8+
9+
echo "::group:: Display docker run log" && (cat log.txt | echo "The file 'log.txt' has not been generated") && echo "::endgroup::"
10+
11+
# Displaying MAPDL files
12+
FILE_PAT=./"$LOG_NAMES"/*.err
13+
if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: Error file $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to display the 'out' files."
14+
15+
FILE_PAT=./"$LOG_NAMES"/*.log
16+
if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: Log file $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to display the 'err' files."
17+
18+
FILE_PAT=./"$LOG_NAMES"/*.out
19+
if compgen -G "$FILE_PAT" > /dev/null ;then for f in "$FILE_PAT"; do echo "::group:: Output file $f" && cat "$f" && echo "::endgroup::" ; done; fi || echo "Failed to display the 'log' files."
20+

.ci/start_mapdl.sh

Lines changed: 48 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,57 @@
11
#!/bin/bash
2-
docker pull $MAPDL_IMAGE
2+
echo "MAPDL Instance name: $INSTANCE_NAME"
3+
echo "MAPDL_VERSION: $MAPDL_VERSION"
4+
5+
export MAPDL_IMAGE="$MAPDL_PACKAGE:$MAPDL_VERSION"
6+
echo "MAPDL_IMAGE: $MAPDL_IMAGE"
7+
docker pull "$MAPDL_IMAGE"
8+
9+
export MAJOR=$(echo "$MAPDL_VERSION" | head -c 3 | tail -c 2)
10+
export MINOR=$(echo "$MAPDL_VERSION" | head -c 5 | tail -c 1)
11+
12+
export VERSION="$MAJOR$MINOR"
13+
echo "MAPDL VERSION: $VERSION"
14+
15+
16+
if [[ $MAPDL_VERSION == *"latest-ubuntu"* ]]; then
17+
echo "It is latest-ubuntu. Using 'ansys' script to launch"
18+
export EXEC_PATH=ansys
19+
# export P_SCHEMA=/ansys_inc/ansys/ac4/schema
20+
21+
elif [[ $MAPDL_VERSION == *"ubuntu"* ]] ; then
22+
echo "It is an ubuntu based image"
23+
export EXEC_PATH=/ansys_inc/v$VERSION/ansys/bin/mapdl
24+
export P_SCHEMA=/ansys_inc/v$VERSION/ansys/ac4/schema
25+
26+
else
27+
echo "It is a CentOS based image"
28+
export EXEC_PATH=/ansys_inc/ansys/bin/mapdl
29+
export P_SCHEMA=/ansys_inc/ansys/ac4/schema
30+
fi;
31+
32+
echo "EXEC_PATH: $EXEC_PATH"
33+
echo "P_SCHEMA: $P_SCHEMA"
34+
335
docker run \
4-
--name mapdl \
36+
--entrypoint "/bin/bash" \
37+
--name "$INSTANCE_NAME" \
538
--restart always \
639
--health-cmd="ps aux | grep \"[/]ansys_inc/.*ansys\.e.*grpc\" -q && echo 0 || echo 1" \
740
--health-interval=0.5s \
841
--health-retries=4 \
942
--health-timeout=0.5s \
1043
--health-start-period=10s \
11-
-e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER \
44+
-e ANSYSLMD_LICENSE_FILE=1055@"$LICENSE_SERVER" \
1245
-e ANSYS_LOCK="OFF" \
13-
-p $PYMAPDL_PORT:50052 \
14-
-p $PYMAPDL_DB_PORT:50055 \
15-
$MAPDL_IMAGE \
16-
-smp > log.txt &
17-
grep -q 'Server listening on' <(timeout 60 tail -f log.txt)
18-
# python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())"
46+
-p "$PYMAPDL_PORT":50052 \
47+
-p "$PYMAPDL_DB_PORT":50055 \
48+
--shm-size=2gb \
49+
-e I_MPI_SHM_LMT=shm \
50+
-e P_SCHEMA="$P_SCHEMA" \
51+
-w /jobs \
52+
-u=0:0 \
53+
--memory=6656MB \
54+
--memory-swap=16896MB \
55+
"$MAPDL_IMAGE" "$EXEC_PATH" -grpc -dir /jobs -"$DISTRIBUTED_MODE" -np 2 > log.txt &
56+
57+
grep -q 'Server listening on' <(timeout 60 tail -f log.txt)

.ci/start_mapdl_ubuntu.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,18 @@ updates:
88
labels:
99
- "maintenance"
1010
- "dependencies"
11+
commit-message:
12+
prefix: "maint"
1113

1214
- package-ecosystem: "github-actions"
1315
directory: "/"
1416
schedule:
1517
interval: "weekly"
18+
labels:
19+
- "maintenance"
20+
commit-message:
21+
prefix: "maint"
22+
groups:
23+
actions:
24+
patterns:
25+
- "*"

.github/labeler.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
Documentation:
2-
- doc/source/**/*
3-
Maintenance:
4-
- .github/**/*
5-
- codecov.yml
6-
- .flake8
7-
- .coveragerc
8-
- doc/styles/**/*
9-
- pyproject.toml
10-
Dependencies:
11-
- pyproject.toml
12-
CI/CD:
13-
- .github/**/*
1+
documentation:
2+
- changed-files:
3+
- any-glob-to-any-file: 'doc/source/**/*'
4+
- any-glob-to-any-file: 'examples/**/*'
5+
maintenance:
6+
- changed-files:
7+
- any-glob-to-any-file: '.github/**/*'
8+
- any-glob-to-any-file: '.flake8'
9+
- any-glob-to-any-file: 'pyproject.toml'
10+
testing:
11+
- changed-files:
12+
- any-glob-to-any-file: 'tests/*'

0 commit comments

Comments
 (0)