name: 'Apply NTSync Patches' description: 'Apply ntsync compatibility patches and enable CONFIG_NTSYNC in defconfig' inputs: version: description: 'Kernel config version (e.g., android14-6.12)' required: true kernel_version: description: 'Kernel version (e.g., 6.1)' required: true sublevel: description: 'Kernel sublevel' required: true runs: using: 'composite' steps: - name: Apply NTSync Patch shell: bash working-directory: ${{ github.workspace }}/kernel/common run: | set -euo pipefail if [[ ${{ inputs.version }} = "android16-6.12" ]]; then echo "Removing pre-existing ntsync files for android16-6.12" rm -f include/uapi/linux/ntsync.h rm -f drivers/misc/ntsync.c fi if [[ ${{ inputs.version }} = "android13-5.10" ]]; then patch -p1 < ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_android12-5.10.patch elif [[ ${{ inputs.version }} = "android14-5.15" ]]; then patch -p1 < ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_android13-5.15.patch else patch -p1 < ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_compat_${{ inputs.version }}.patch fi patch -p1 < ${{ github.workspace }}/kernel_patches/common/ntsync/ntsync_base.patch - name: Enable NTSync uses: ./.github/actions/set-kernel-config with: config_list: | CONFIG_NTSYNC=y