From 96b0e6fc0eda8d7f5d5ed16f3d58e8fc91f12eab Mon Sep 17 00:00:00 2001 From: Zhou Guanghan <108250428+Z-G-H1@users.noreply.github.com> Date: Fri, 5 Dec 2025 14:59:57 +0800 Subject: [PATCH 1/3] Add disk usage debugging step in workflow Added a step to debug disk usage after the build process, providing insights into disk space and large files. --- .github/workflows/pika.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index a79439ab7d..ee08e155f0 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -144,6 +144,34 @@ jobs: run: | source /opt/rh/devtoolset-10/enable cmake --build build --config ${{ env.BUILD_TYPE }} + + - name: Debug Disk Usage After Build + run: | + echo "==================== 磁盘使用全景 ====================" + df -h + echo "" + echo "==================== 根目录大小Top 20 ====================" + sudo du -h --max-depth=1 / 2>/dev/null | sort -hr | head -20 || true + echo "" + echo "==================== 工作区大小详情 ====================" + du -h --max-depth=3 ${{ github.workspace }} 2>/dev/null | sort -hr | head -30 || true + echo "" + echo "==================== 寻找大于100MB的文件 ====================" + find / -type f -size +100M 2>/dev/null | xargs -I {} ls -lh {} 2>/dev/null | head -20 || true + echo "" + echo "==================== 重点目录检查 ====================" + echo "--- deps 目录 ---" + ls -la ${{ github.workspace }}/deps/ 2>/dev/null | head -5 || true + du -sh ${{ github.workspace }}/deps/ 2>/dev/null || true + echo "" + echo "--- buildtrees 目录 ---" + du -sh ${{ github.workspace }}/buildtrees/ 2>/dev/null || true + echo "" + echo "--- /usr/local 目录 ---" + du -sh /usr/local/ 2>/dev/null || true + echo "" + echo "--- /opt 目录 ---" + du -sh /opt/ 2>/dev/null || true - name: Cleanup Build Trees run: | From 2cae817498c9ead401954d970f136a634065f3b5 Mon Sep 17 00:00:00 2001 From: Zhou Guanghan <108250428+Z-G-H1@users.noreply.github.com> Date: Sun, 7 Dec 2025 21:14:36 +0800 Subject: [PATCH 2/3] fix ci --- .github/workflows/pika.yml | 52 +++++--------------------------------- 1 file changed, 6 insertions(+), 46 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index ee08e155f0..aac1f0432e 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -145,34 +145,6 @@ jobs: source /opt/rh/devtoolset-10/enable cmake --build build --config ${{ env.BUILD_TYPE }} - - name: Debug Disk Usage After Build - run: | - echo "==================== 磁盘使用全景 ====================" - df -h - echo "" - echo "==================== 根目录大小Top 20 ====================" - sudo du -h --max-depth=1 / 2>/dev/null | sort -hr | head -20 || true - echo "" - echo "==================== 工作区大小详情 ====================" - du -h --max-depth=3 ${{ github.workspace }} 2>/dev/null | sort -hr | head -30 || true - echo "" - echo "==================== 寻找大于100MB的文件 ====================" - find / -type f -size +100M 2>/dev/null | xargs -I {} ls -lh {} 2>/dev/null | head -20 || true - echo "" - echo "==================== 重点目录检查 ====================" - echo "--- deps 目录 ---" - ls -la ${{ github.workspace }}/deps/ 2>/dev/null | head -5 || true - du -sh ${{ github.workspace }}/deps/ 2>/dev/null || true - echo "" - echo "--- buildtrees 目录 ---" - du -sh ${{ github.workspace }}/buildtrees/ 2>/dev/null || true - echo "" - echo "--- /usr/local 目录 ---" - du -sh /usr/local/ 2>/dev/null || true - echo "" - echo "--- /opt 目录 ---" - du -sh /opt/ 2>/dev/null || true - - name: Cleanup Build Trees run: | rm -rf ./buildtrees @@ -198,24 +170,12 @@ jobs: - name: Extreme Disk Cleanup run: | - - rm -rf /usr/local/share/* || true - rm -rf /usr/share/doc/* || true - rm -rf /usr/share/man/* || true - rm -rf /var/cache/* || true - - find ${{ github.workspace }} -name "*.o" -type f -delete || true - find ${{ github.workspace }} -name "*.a" -type f -delete || true - find ${{ github.workspace }} -name "*.la" -type f -delete || true - find ${{ github.workspace }} -name "*.so" -type f -delete || true - find ${{ github.workspace }} -name "*.pyc" -type f -delete || true - - rm -rf ${{ github.workspace }}/.git || true - - df -h - - echo "Largest directories:" - du -h --max-depth=2 / 2>/dev/null | sort -hr | head -20 + rm -rf /__w/pikiwidb/pikiwidb/buildtrees 2>/dev/null || true + rm -rf /__w/pikiwidb/pikiwidb/deps 2>/dev/null || true + find /__w/pikiwidb/pikiwidb -type f \( -name "librocksdb.a" -o -name "libprotoc.a" -o -name "libprotobuf.a" \) -delete 2>/dev/null || true + find /__w/pikiwidb/pikiwidb -type f \( -name "*.o" -o -name "*.a" -o -name "*.la" -o -name "*.so" -o -name "*_test" \) ! -path "*/build/pika" -delete 2>/dev/null || true + rm -rf /__w/pikiwidb/pikiwidb/.git 2>/dev/null || true + df -h - name: Create Log Directories run: | From 7bc671765fc1c5ea882c387efcc5aa71038b1edf Mon Sep 17 00:00:00 2001 From: Zhou Guanghan <108250428+Z-G-H1@users.noreply.github.com> Date: Mon, 8 Dec 2025 10:41:14 +0800 Subject: [PATCH 3/3] Fix formatting --- .github/workflows/pika.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pika.yml b/.github/workflows/pika.yml index aac1f0432e..51019c7f30 100644 --- a/.github/workflows/pika.yml +++ b/.github/workflows/pika.yml @@ -144,7 +144,7 @@ jobs: run: | source /opt/rh/devtoolset-10/enable cmake --build build --config ${{ env.BUILD_TYPE }} - + - name: Cleanup Build Trees run: | rm -rf ./buildtrees @@ -175,7 +175,7 @@ jobs: find /__w/pikiwidb/pikiwidb -type f \( -name "librocksdb.a" -o -name "libprotoc.a" -o -name "libprotobuf.a" \) -delete 2>/dev/null || true find /__w/pikiwidb/pikiwidb -type f \( -name "*.o" -o -name "*.a" -o -name "*.la" -o -name "*.so" -o -name "*_test" \) ! -path "*/build/pika" -delete 2>/dev/null || true rm -rf /__w/pikiwidb/pikiwidb/.git 2>/dev/null || true - df -h + df -h - name: Create Log Directories run: |