45
45
46
46
df -h
47
47
48
+ sudo systemctl stop docker
49
+
48
50
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/.ghcup /opt/hostedtoolcache/CodeQL /usr/local/share/powershell /usr/share/swift || true
51
+ sudo docker rm -f $(sudo docker ps -aq) || true
49
52
sudo docker image prune --all --force
53
+ sudo docker system prune -a --volumes -f
54
+ sudo rm -rf /var/lib/docker
50
55
echo "some directories deleted"
51
56
52
57
# Remove large unwanted packages
@@ -58,18 +63,62 @@ jobs:
58
63
mercurial apt-transport-https mono-complete libmysqlclient \
59
64
unixodbc-dev yarn chrpath libssl-dev libxft-dev \
60
65
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev \
61
- snmp pollinate libpq-dev postgresql-client powershell ruby-full \
66
+ snmp pollinate libpq-dev postgresql-client powershell ruby-full rbenv ruby-dev \
62
67
sphinxsearch subversion mongodb-org microsoft-edge-stable || true
63
68
64
69
# Regex-based purges (for bulk families like mysql, php, dotnet)
65
70
sudo apt-get purge -y $(dpkg-query -W -f='${binary:Package}\n' | grep -E '^mysql|^php|^dotnet') || true
66
71
72
+ sudo apt-get purge -y $(dpkg-query -W -f='${binary:Package}\n' | grep -E '^golang|^go-') || true
73
+ sudo rm -rf /usr/local/go /usr/lib/go-*
74
+ sudo apt-get purge -y nodejs npm || true
75
+ sudo apt-get purge -y openjdk-* default-jdk default-jre || true
76
+ sudo apt-get purge -y rustc cargo || true
77
+ sudo apt-get purge -y scala sbt || true
78
+
67
79
# Clean up
68
80
sudo apt-get autoremove -y
69
81
sudo apt-get autoclean -y
70
82
echo "some packages purged"
71
83
72
84
df -h
85
+
86
+ - name : Maximize Build Space
87
+ uses : easimon/maximize-build-space@master
88
+ with :
89
+ root-reserve-mb : 1024
90
+ temp-reserve-mb : 1024
91
+ swap-size-mb : 20480
92
+ remove-dotnet : ' true'
93
+ remove-android : ' true'
94
+ remove-haskell : ' true'
95
+ remove-codeql : ' true'
96
+ remove-docker-images : ' true'
97
+
98
+ # - name: Setup SWAP
99
+ # run: |
100
+ # sudo swapoff -a
101
+ # # Check available disk space before creating swap
102
+ # AVAILABLE_SPACE=$(df -h . | awk 'NR==2 {print $4}' | grep -o '[0-9]\+')
103
+ # if [ "$AVAILABLE_SPACE" -lt 21000 ]; then
104
+ # echo "Error: Not enough disk space for 20 GB swap file. Available: $AVAILABLE_SPACE MB"
105
+ # exit 1
106
+ # fi
107
+ # sudo fallocate -l 22G /swapfile
108
+ # sudo chmod 600 /swapfile
109
+ # sudo mkswap /swapfile
110
+ # sudo swapon -p 1 /swapfile
111
+ # echo 'vm.swappiness=1' | sudo tee -a /etc/sysctl.conf
112
+ # echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
113
+ # echo 'vm.overcommit_memory=1' | sudo tee -a /etc/sysctl.conf
114
+ # echo 'vm.overcommit_ratio=200' | sudo tee -a /etc/sysctl.conf
115
+ # sudo sysctl -p
116
+ # free -h
117
+ # df -h
118
+
119
+ - name : Clone AnyKernel3 and Other Dependencies
120
+ run : |
121
+ echo "Cloning AnyKernel3 and other dependencies..."
73
122
74
123
# Install dependencies
75
124
echo "Installing Repo and Python"
@@ -83,10 +132,6 @@ jobs:
83
132
84
133
# Set CONFIG Environment Variable
85
134
echo "CONFIG=${{ inputs.model }}" >> $GITHUB_ENV
86
-
87
- - name : Clone AnyKernel3 and Other Dependencies
88
- run : |
89
- echo "Cloning AnyKernel3 and other dependencies..."
90
135
91
136
ANYKERNEL_BRANCH="gki-2.0"
92
137
if [[ -z "${{ inputs.susfs_branch }}" ]]; then
@@ -342,7 +387,7 @@ jobs:
342
387
sed -i 's/-dirty//' ./external/dtc/scripts/setlocalversion
343
388
sed -i 's/-dirty//' ./build/kernel/kleaf/workspace_status_stamp.py || echo "No workspace_status_stamp.py!"
344
389
345
- sed -i '/echo "LTO $LTO "/i export LTO=thin ' ./oplus/build/oplus_setup.sh
390
+ sed -i '/echo "LTO $LTO "/i export LTO=full ' ./oplus/build/oplus_setup.sh
346
391
sed -i 's/export REPACK_IMG=true/export REPACK_IMG=false/g' ./oplus/build/oplus_setup.sh
347
392
348
393
# Run perl command to modify UTS_VERSION
@@ -390,7 +435,8 @@ jobs:
390
435
else
391
436
# cd ./kernel_platform/common/
392
437
# make -j$(nproc --all) LLVM=1 ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CROSS_COMPILE_ARM32=arm-linux-gnuabeihf- CC="$CONFIG/kernel_platform/prebuilts-master/clang/host/linux-x86/clang-r450784e/bin/clang" LD="$CONFIG/kernel_platform/prebuilts-master/clang/host/linux-x86/clang-r450784e/bin/ld.lld" HOSTCC=clang HOSTLD=ld.lld O="$CONFIG/kernel_platform/out" KCFLAGS+=-Wno-error gki_defconfig all 2>&1 | tee build_$(date +"%Y_%m_%d_%H_%M_%S").log
393
- LTO=thin ./kernel_platform/oplus/build/oplus_build_kernel.sh ${{ inputs.soc }} "$BUILD_TYPE"
438
+ sed -i '/export EXTRA_KBUILD_ARGS="--skip abl"/a export SKIP_VENDOR_BOOT=true\nunset BUILD_VENDOR_BOOT_IMG' ./kernel_platform/oplus/build/oplus_build_kernel.sh
439
+ LTO=full ./kernel_platform/oplus/build/oplus_build_kernel.sh ${{ inputs.soc }} "$BUILD_TYPE"
394
440
fi
395
441
396
442
- name : Create ZIP Files for Different Formats
0 commit comments