diff --git a/.github/workflows/Recovery Build.yml b/.github/workflows/Recovery Build.yml index 47b496594..284879c2d 100644 --- a/.github/workflows/Recovery Build.yml +++ b/.github/workflows/Recovery Build.yml @@ -23,12 +23,6 @@ on: description: 'DEVICE_PATH' required: true default: 'device/asus/I003D' - COMMON_TREE_URL: - description: 'COMMON_TREE_URL (if no common tree, leave blank)' - required: false - COMMON_PATH: - description: 'COMMON_PATH (if no common tree, leave blank)' - required: false DEVICE_NAME: description: 'DEVICE_NAME' required: true @@ -110,19 +104,6 @@ jobs: run: | repo sync -j$(nproc --all) --force-sync working-directory: workspace - - - name: Clone device tree - run: | - git clone ${{ github.event.inputs.DEVICE_TREE_URL }} -b ${{ github.event.inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }} - working-directory: ${{ steps.pwd.outputs.workspace-folder }} - - - name: Clone common tree - if: | - github.event.inputs.COMMON_TREE_URL != null - && github.event.inputs.COMMON_PATH != null - run: | - git clone ${{ github.event.inputs.COMMON_TREE_URL }} -b ${{ github.event.inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.COMMON_PATH }} - working-directory: ${{ steps.pwd.outputs.workspace-folder }} - name: Check Build Tree uses: haya14busa/action-cond@v1 @@ -132,7 +113,55 @@ jobs: if_true: twrp if_false: omni - - name: Sync Device Dependencies + - name: Create roomservice.xml + run: | + mkdir -p .repo/local_manifests + cp -f ${GITHUB_WORKSPACE}/templates/roomservice.xml .repo/local_manifests/ + working-directory: ${{ steps.pwd.outputs.workspace-folder }} + + - name: Clone device tree (TeamWin) + if: | + contains( github.event.inputs.DEVICE_TREE_URL,'/TeamWin/' ) + && steps.buildtree.outputs.value == 'twrp' + run: | + sed -i "s%\!--project name=\"{DEVICE_TREE_URL_REPO}%project name=\"$(grep -oP '(?<=TeamWin/).*' <<< ${{ github.event.inputs.DEVICE_TREE_URL }})%g" .repo/local_manifests/roomservice.xml + sed -i "s%{DEVICE_PATH}%${{ github.event.inputs.DEVICE_PATH }}%g" .repo/local_manifests/roomservice.xml + sed -i "s%{DEVICE_REMOTE_NAME}%TeamWin%g" .repo/local_manifests/roomservice.xml + sed -i "s%{DEVICE_TREE_BRANCH}\"/-->%${{ github.event.inputs.DEVICE_TREE_BRANCH }}\"/>%g" .repo/local_manifests/roomservice.xml + repo sync -j$(nproc --all) + working-directory: ${{ steps.pwd.outputs.workspace-folder }} + + - name: Clone device tree (Github) + if: | + !contains( github.event.inputs.DEVICE_TREE_URL,'/TeamWin/' ) + && steps.buildtree.outputs.value == 'twrp' + run: | + sed -i "s%\!--project name=\"{DEVICE_TREE_URL_REPO}%project name=\"$(grep -oP '(?<=github.com/).*' <<< ${{ github.event.inputs.DEVICE_TREE_URL }})%g" .repo/local_manifests/roomservice.xml + sed -i "s%{DEVICE_PATH}%${{ github.event.inputs.DEVICE_PATH }}%g" .repo/local_manifests/roomservice.xml + sed -i "s%{DEVICE_REMOTE_NAME}%github%g" .repo/local_manifests/roomservice.xml + sed -i "s%{DEVICE_TREE_BRANCH}\"/-->%${{ github.event.inputs.DEVICE_TREE_BRANCH }}\"/>%g" .repo/local_manifests/roomservice.xml + repo sync -j$(nproc --all) + working-directory: ${{ steps.pwd.outputs.workspace-folder }} + + - name: Clone device tree (Omni) + if: ${{ steps.buildtree.outputs.value == 'omni' }} + run: | + git clone ${{ github.event.inputs.DEVICE_TREE_URL }} -b ${{ github.event.inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }} + working-directory: ${{ steps.pwd.outputs.workspace-folder }} + + - name: Sync Device Dependencies (AOSP) + if: ${{ steps.buildtree.outputs.value == 'twrp' }} + run: | + source build/envsetup.sh + lunch ${{ steps.buildtree.outputs.value }}_${{ github.event.inputs.DEVICE_NAME }}-eng + working-directory: ${{ steps.pwd.outputs.workspace-folder }} + id: syncdevicedeps + continue-on-error: true + + - name: Sync Device Dependencies (Omni/subdevices) + if: | + steps.buildtree.outputs.value == 'omni' + || steps.syncdevicedeps.outcome == 'failure' run: | bash ${GITHUB_WORKSPACE}/scripts/convert.sh ${{ github.event.inputs.DEVICE_PATH }}/${{ steps.buildtree.outputs.value }}.dependencies repo sync -j$(nproc --all) @@ -142,7 +171,7 @@ jobs: - name: Set Swap Space uses: pierotofy/set-swap-space@master with: - swap-size-gb: 12 + swap-size-gb: 24 - name: Repopick Gerrit patches if: github.event.inputs.REPOPICK_PATCHES != null @@ -150,6 +179,7 @@ jobs: source build/envsetup.sh repopick ${{ github.event.inputs.REPOPICK_PATCHES }} working-directory: ${{ steps.pwd.outputs.workspace-folder }} + continue-on-error: true - name: Install Python 2 if: ${{ steps.buildtree.outputs.value == 'omni' }} @@ -162,7 +192,7 @@ jobs: run: | source build/envsetup.sh export ALLOW_MISSING_DEPENDENCIES=true - lunch ${{ steps.buildtree.outputs.value }}_${{ github.event.inputs.DEVICE_NAME }}-eng && make clean && make ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all) + lunch ${{ steps.buildtree.outputs.value }}_${{ github.event.inputs.DEVICE_NAME }}-eng && make ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all) working-directory: ${{ steps.pwd.outputs.workspace-folder }} - name: Upload to Release diff --git a/README.md b/README.md index 317312c5a..0202f2f59 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,20 @@ # Use Github Action to compile Recovery ``` -Support OFRP, SHRP, TWRP compilation and production +Support PBRP, SHRP, TWRP compilation and production ``` --- ## Release Notes ``` += 2024/02/11 +- Fix support for dependencies in AOSP trees +- Increase swap size for kernel inline builds +- Remove common tree input fields (not needed) +- OrangeFox not presently supported due to script-based sync methods + += 2023/11/28 +- Add support to repopick patches from Gerrit + = 2023/10/31 - Fix build with Omni manifests - 5.1 branch no longer supported @@ -51,10 +60,8 @@ Support OFRP, SHRP, TWRP compilation and production | `DEVICE_TREE_URL` | Device address | https://github.com/TeamWin/android_device_asus_I003D | | `DEVICE_TREE_BRANCH` | Device branch | android-12.1 | | `DEVICE_PATH` | Device location | device/asus/I003D | -| `COMMON_TREE_URL` | Common tree address | https://github.com/TeamWin/android_device_asus_sm8250-common | -| `COMMON_PATH` | Common tree location | device/asus/sm8250-common | | `DEVICE_NAME` | Model name | I003D | -| `MAKEFILE_NAME` | Makefile name | twrp_I003D | +| `REPOPICK_PATCHES` | Gerrit patches to include in build (space separated) | 1245 1437 | | `BUILD_TARGET` | Build Target Partition (boot/recovery/vendorboot) | recovery | ----- @@ -117,5 +124,5 @@ Can be downloaded at [Release](../../releases) ## Remark #### TeamWin Recovery Project: https://github.com/minimal-manifest-twrp -#### OrangeFox Recovery Project: https://gitlab.com/OrangeFox/Manifest.git -#### SKYHAWK Recovery Project: https://github.com/SHRP/platform_manifest_twrp_omni.git +#### PitchBlack Recovery Project: https://github.com/PitchBlackRecoveryProject/manifest_pb.git +#### SKYHAWK Recovery Project: https://github.com/SHRP/manifest.git diff --git a/templates/roomservice.xml b/templates/roomservice.xml new file mode 100755 index 000000000..2babebc7b --- /dev/null +++ b/templates/roomservice.xml @@ -0,0 +1,4 @@ + + + +