You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: reducing space consumption in github runners (#3900)
* feat: add disk space usage reporting and cleanup steps in local testing workflow
* feat: add disk space cleanup step before build in local testing workflow
* chore: adding changelog file 3900.fixed.md [dependabot-skip]
* feat: enhance disk space reporting in local testing workflow
* fix: update disk usage reporting to show current directory size
* fix: improve disk usage reporting with error handling in local testing workflow
* fix: remove redundant disk usage checks and streamline reporting in local testing workflow
* fix: replace cp with mv for log file handling in local and remote scripts
* fix: update log file handling to create directories before moving files in local and remote scripts
* fix: update tar command to remove files after compression in log collection scripts
* fix: update pytest arguments to exclude logs on passed tests in local and remote workflows
* fix: add disk usage checks for runner directories in local testing workflow
* fix: add disk usage check for CodeQL directory in local testing workflow
* fix: remove CodeQL directory after disk usage check in local testing workflow
* fix: enhance disk usage reporting and cleanup for CodeQL directory in local testing workflow
* fix: streamline disk usage reporting and cleanup for CodeQL directory in local testing workflow
---------
Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com>
(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"
18
+
(docker exec"$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.out' > /dev/null ;then mv -f /file*.out /mapdl_logs && echo 'Successfully moved out files.'; fi") ||echo"Failed to move the 'out' files into a local file"
19
+
(docker exec"$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.err' > /dev/null ;then mv -f /file*.err /mapdl_logs && echo 'Successfully moved err files.'; fi") ||echo"Failed to move the 'err' files into a local file"
20
+
(docker exec"$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$FILE*.log' > /dev/null ;then mv -f /file*.log /mapdl_logs && echo 'Successfully moved log files.'; fi") ||echo"Failed to move the 'log' files into a local file"
21
+
(docker exec"$MAPDL_INSTANCE" /bin/bash -c "if compgen -G '$WDIR*.crash' > /dev/null ;then mv -f $WDIR*.crash /mapdl_logs && echo 'Successfully moved crash files.'; fi") ||echo"Failed to move the 'crash' files into a local file"
25
22
26
23
docker cp "$MAPDL_INSTANCE":/mapdl_logs/. ./"$LOG_NAMES"/. ||echo"Failed to copy the 'log-build-docs' files into a local directory"
27
24
28
25
####
29
26
echo"Collecting local build logs..."
30
27
31
28
echo"Collecting docker run log..."
32
-
cp log.txt ./"$LOG_NAMES"/log.txt ||echo"MAPDL run docker log not found."
29
+
mv log.txt ./"$LOG_NAMES"/log.txt ||echo"MAPDL run docker log not found."
33
30
34
-
echo"Copying docker launch log..."
35
-
cp mapdl_launch_0.log ./"$LOG_NAMES"/mapdl_launch_0.log ||echo"MAPDL launch docker log not found."
36
-
cp mapdl_launch_1.log ./"$LOG_NAMES"/mapdl_launch_1.log ||echo"MAPDL launch docker log not found."
31
+
echo"Moving docker launch log..."
32
+
mv mapdl_launch_0.log ./"$LOG_NAMES"/mapdl_launch_0.log ||echo"MAPDL launch docker log not found."
33
+
mv mapdl_launch_1.log ./"$LOG_NAMES"/mapdl_launch_1.log ||echo"MAPDL launch docker log not found."
37
34
38
-
echo"Copying the profiling files..."
39
-
cp -r prof ./"$LOG_NAMES"/prof ||echo"No profile files could be found"
35
+
echo"Moving the profiling files..."
36
+
mkdir -p ./"$LOG_NAMES"/prof
37
+
mv prof/* ./"$LOG_NAMES"/prof ||echo"No profile files could be found"
40
38
41
-
echo"Copying the JSONL files..."
42
-
cp*.jsonl ./"$LOG_NAMES"/ ||echo"No JSONL files could be found"
39
+
echo"Moving the JSONL files..."
40
+
mv*.jsonl ./"$LOG_NAMES"/ ||echo"No JSONL files could be found"
43
41
44
42
echo"Collecting file structure..."
45
43
ls -R > ./"$LOG_NAMES"/files_structure.txt ||echo"Failed to copy file structure to a file"
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"
49
47
50
48
echo"Tar files..."
51
-
tar cvzf ./"$LOG_NAMES".tgz ./"$LOG_NAMES"||echo"Failed to compress"
49
+
tar --remove-files -cvzf ./"$LOG_NAMES".tgz ./"$LOG_NAMES"||echo"Failed to compress"
0 commit comments