|
38 | 38 | runs-on: ubuntu-latest
|
39 | 39 |
|
40 | 40 | steps:
|
| 41 | + - name: Maximize Build Space |
| 42 | + uses: easimon/maximize-build-space@master |
| 43 | + with: |
| 44 | + root-reserve-mb: 1024 |
| 45 | + temp-reserve-mb: 1024 |
| 46 | + swap-size-mb: 20971520 |
| 47 | + overprovision-lvm: 'true' |
| 48 | + remove-dotnet: 'true' |
| 49 | + remove-android: 'true' |
| 50 | + remove-haskell: 'true' |
| 51 | + remove-codeql: 'true' |
| 52 | + remove-docker-images: 'true' |
| 53 | + |
41 | 54 | - name: Setup Build System
|
42 | 55 | run: |
|
43 | 56 | export DEBIAN_FRONTEND=noninteractive
|
|
84 | 97 | # Set CONFIG Environment Variable
|
85 | 98 | echo "CONFIG=${{ inputs.model }}" >> $GITHUB_ENV
|
86 | 99 |
|
| 100 | + # - name: Setup SWAP |
| 101 | + # run: | |
| 102 | + # sudo swapoff -a |
| 103 | + # # Check available disk space before creating swap |
| 104 | + # AVAILABLE_SPACE=$(df -h . | awk 'NR==2 {print $4}' | grep -o '[0-9]\+') |
| 105 | + # if [ "$AVAILABLE_SPACE" -lt 21000 ]; then |
| 106 | + # echo "Error: Not enough disk space for 20 GB swap file. Available: $AVAILABLE_SPACE MB" |
| 107 | + # exit 1 |
| 108 | + # fi |
| 109 | + # sudo fallocate -l 22G /swapfile |
| 110 | + # sudo chmod 600 /swapfile |
| 111 | + # sudo mkswap /swapfile |
| 112 | + # sudo swapon -p 1 /swapfile |
| 113 | + # echo 'vm.swappiness=1' | sudo tee -a /etc/sysctl.conf |
| 114 | + # echo 'vm.vfs_cache_pressure=50' | sudo tee -a /etc/sysctl.conf |
| 115 | + # echo 'vm.overcommit_memory=1' | sudo tee -a /etc/sysctl.conf |
| 116 | + # echo 'vm.overcommit_ratio=200' | sudo tee -a /etc/sysctl.conf |
| 117 | + # sudo sysctl -p |
| 118 | + # free -h |
| 119 | + # df -h |
| 120 | + |
87 | 121 | - name: Clone AnyKernel3 and Other Dependencies
|
88 | 122 | run: |
|
89 | 123 | echo "Cloning AnyKernel3 and other dependencies..."
|
@@ -342,7 +376,7 @@ jobs:
|
342 | 376 | sed -i 's/-dirty//' ./external/dtc/scripts/setlocalversion
|
343 | 377 | sed -i 's/-dirty//' ./build/kernel/kleaf/workspace_status_stamp.py || echo "No workspace_status_stamp.py!"
|
344 | 378 |
|
345 |
| - sed -i '/echo "LTO $LTO "/i export LTO=thin' ./oplus/build/oplus_setup.sh |
| 379 | + sed -i '/echo "LTO $LTO "/i export LTO=full' ./oplus/build/oplus_setup.sh |
346 | 380 | sed -i 's/export REPACK_IMG=true/export REPACK_IMG=false/g' ./oplus/build/oplus_setup.sh
|
347 | 381 |
|
348 | 382 | # Run perl command to modify UTS_VERSION
|
@@ -390,7 +424,8 @@ jobs:
|
390 | 424 | else
|
391 | 425 | # cd ./kernel_platform/common/
|
392 | 426 | # 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" |
| 427 | + 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 |
| 428 | + LTO=full ./kernel_platform/oplus/build/oplus_build_kernel.sh ${{ inputs.soc }} "$BUILD_TYPE" |
394 | 429 | fi
|
395 | 430 |
|
396 | 431 | - name: Create ZIP Files for Different Formats
|
|
0 commit comments