Skip to content

Commit 0b3021d

Browse files
committed
Test Vendor boot disable and lto full
1 parent 38d4bcc commit 0b3021d

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,27 @@ jobs:
8484
# Set CONFIG Environment Variable
8585
echo "CONFIG=${{ inputs.model }}" >> $GITHUB_ENV
8686
87+
- name: Setup SWAP
88+
run: |
89+
sudo swapoff -a
90+
# Check available disk space before creating swap
91+
AVAILABLE_SPACE=$(df -h . | awk 'NR==2 {print $4}' | grep -o '[0-9]\+')
92+
if [ "$AVAILABLE_SPACE" -lt 21000 ]; then
93+
echo "Error: Not enough disk space for 20 GB swap file. Available: $AVAILABLE_SPACE MB"
94+
exit 1
95+
fi
96+
sudo fallocate -l 22G /swapfile
97+
sudo chmod 600 /swapfile
98+
sudo mkswap /swapfile
99+
sudo swapon -p 1 /swapfile
100+
echo 'vm.swappiness=1' | sudo tee -a /etc/sysctl.conf
101+
echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf
102+
echo 'vm.overcommit_memory=1' | sudo tee -a /etc/sysctl.conf
103+
echo 'vm.overcommit_ratio=200' | sudo tee -a /etc/sysctl.conf
104+
sudo sysctl -p
105+
free -h
106+
df -h
107+
87108
- name: Clone AnyKernel3 and Other Dependencies
88109
run: |
89110
echo "Cloning AnyKernel3 and other dependencies..."
@@ -342,7 +363,7 @@ jobs:
342363
sed -i 's/-dirty//' ./external/dtc/scripts/setlocalversion
343364
sed -i 's/-dirty//' ./build/kernel/kleaf/workspace_status_stamp.py || echo "No workspace_status_stamp.py!"
344365
345-
sed -i '/echo "LTO $LTO "/i export LTO=thin' ./oplus/build/oplus_setup.sh
366+
sed -i '/echo "LTO $LTO "/i export LTO=full' ./oplus/build/oplus_setup.sh
346367
sed -i 's/export REPACK_IMG=true/export REPACK_IMG=false/g' ./oplus/build/oplus_setup.sh
347368
348369
# Run perl command to modify UTS_VERSION
@@ -390,7 +411,8 @@ jobs:
390411
else
391412
# cd ./kernel_platform/common/
392413
# 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"
414+
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
415+
LTO=full ./kernel_platform/oplus/build/oplus_build_kernel.sh ${{ inputs.soc }} "$BUILD_TYPE"
394416
fi
395417
396418
- name: Create ZIP Files for Different Formats

0 commit comments

Comments
 (0)