Skip to content
Snippets Groups Projects
Commit 59782752 authored by Kwangjin Lee's avatar Kwangjin Lee
Browse files

Test if the website works correctly with these exclusions + check sizes

parent b2ab56f5
No related branches found
No related tags found
1 merge request!407Update 2 files
Pipeline #260197 failed
...@@ -35,32 +35,42 @@ build-book: ...@@ -35,32 +35,42 @@ build-book:
fi fi
# Size analysis # Size analysis
- echo "=== Size Analysis ===" | tee size_analysis.log - echo === Size Analysis === | tee size_analysis.log
- echo "Directory Sizes:" | tee -a size_analysis.log - echo Directory Sizes | tee -a size_analysis.log
- du -sh book/_build/* | tee -a size_analysis.log - du -sh book/_build/* | tee -a size_analysis.log
- |
- echo -e "\nSize by File Type:" | tee -a size_analysis.log cd book/_build
- echo "HTML files:" | tee -a size_analysis.log
- find book/_build/html -name "*.html" -type f -exec du -ch {} + | grep total$ | tee -a size_analysis.log # HTML files
echo HTML files size and count >> ../../size_analysis.log
- echo "JavaScript files:" | tee -a size_analysis.log find html -name "*.html" -type f -exec du -ch {} + 2>/dev/null | grep total$ >> ../../size_analysis.log
- find book/_build/html -name "*.js" -type f -exec du -ch {} + | grep total$ | tee -a size_analysis.log echo HTML count $(find html -name "*.html" | wc -l) >> ../../size_analysis.log
- echo "CSS files:" | tee -a size_analysis.log # JavaScript files
- find book/_build/html -name "*.css" -type f -exec du -ch {} + | grep total$ | tee -a size_analysis.log echo JS files size and count >> ../../size_analysis.log
find html -name "*.js" -type f -exec du -ch {} + 2>/dev/null | grep total$ >> ../../size_analysis.log
- echo "Map files:" | tee -a size_analysis.log echo JS count $(find html -name "*.js" | wc -l) >> ../../size_analysis.log
- find book/_build/html -name "*.map" -type f -exec du -ch {} + | grep total$ | tee -a size_analysis.log
# CSS files
- echo -e "\nLargest Files (>1MB):" | tee -a size_analysis.log echo CSS files size and count >> ../../size_analysis.log
- find book/_build -type f -size +1M -exec ls -lh {} \; | sort -k5 -hr | tee -a size_analysis.log find html -name "*.css" -type f -exec du -ch {} + 2>/dev/null | grep total$ >> ../../size_analysis.log
echo CSS count $(find html -name "*.css" | wc -l) >> ../../size_analysis.log
- echo -e "\nFile counts by type:" | tee -a size_analysis.log
- echo "HTML: $(find book/_build/html -name '*.html' | wc -l)" | tee -a size_analysis.log # Image files
- echo "JS: $(find book/_build/html -name '*.js' | wc -l)" | tee -a size_analysis.log echo Image files size and count >> ../../size_analysis.log
- echo "CSS: $(find book/_build/html -name '*.css' | wc -l)" | tee -a size_analysis.log find html/_images -type f -exec du -ch {} + 2>/dev/null | grep total$ >> ../../size_analysis.log
- echo "Images: $(find book/_build/html/_images -type f | wc -l)" | tee -a size_analysis.log echo Image count $(find html/_images -type f | wc -l) >> ../../size_analysis.log
- echo "IPython Notebooks: $(find book/_build -name '*.ipynb' | wc -l)" | tee -a size_analysis.log
# Notebooks
echo Notebook files size and count >> ../../size_analysis.log
find . -name "*.ipynb" -type f -exec du -ch {} + 2>/dev/null | grep total$ >> ../../size_analysis.log
echo Notebook count $(find . -name "*.ipynb" | wc -l) >> ../../size_analysis.log
# Large files
echo Largest Files over 1MB >> ../../size_analysis.log
find . -type f -size +1M -exec ls -lh {} \; | sort -k5 -hr >> ../../size_analysis.log
cd ../..
- echo $CI_JOB_ID > build_job_id.txt - echo $CI_JOB_ID > build_job_id.txt
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment