From 38693e56f2a5a4db7d6a59ac061560cdc67b5144 Mon Sep 17 00:00:00 2001 From: erwinabs Date: Sun, 17 Dec 2023 18:11:29 +0700 Subject: [PATCH] ginkgo: Adapth PBRP --- .github/workflows/pbrp-organization-ci.yml | 66 ++++++++++++++++++++++ AndroidProducts.mk | 4 +- BoardConfig.mk | 7 +++ device.mk | 3 - twrp.dependencies => omni.dependencies | 0 twrp_ginkgo.mk => omni_ginkgo.mk | 4 +- 6 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/pbrp-organization-ci.yml rename twrp.dependencies => omni.dependencies (100%) rename twrp_ginkgo.mk => omni_ginkgo.mk (94%) diff --git a/.github/workflows/pbrp-organization-ci.yml b/.github/workflows/pbrp-organization-ci.yml new file mode 100644 index 0000000..4f93688 --- /dev/null +++ b/.github/workflows/pbrp-organization-ci.yml @@ -0,0 +1,66 @@ +name: PBRP Organization CI +on: + workflow_dispatch: + inputs: + DEPLOY_TYPE: + description: 'Deploy Type (TEST/BETA/OFFICIAL)' + required: true + default: 'TEST' + ChangeLogs: + description: 'Build ChangeLogs' + required: true + default: 'Sync Latest Source' + +env: + BUILD_RELEASE_TYPE: ${{ github.event.inputs.DEPLOY_TYPE }} + CHANGELOG: ${{ github.event.inputs.ChangeLogs }} + BOT_API: ${{ secrets.BOT_API }} + GCF_AUTH_KEY: ${{ secrets.GCF_AUTH_KEY }} + GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }} + GitHubMail: ${{ secrets.GitHubMail }} + GitHubName: ${{ secrets.GitHubName }} + SFPassword: ${{ secrets.SFPassword }} + SFUserName: ${{ secrets.SFUserName }} + TARGET: "pbrp" + #EXTRA_CMD: "rm -rf vendor/pb && git clone https://github.com/erwinabs/vendor_pb vendor/pb" + +jobs: + PBRP_CI: + if: "(! contains(toJSON(github.event.commits.*.message), '[skip-ci]'))" + runs-on: ubuntu-20.04 + + steps: + - name: Auto Adapt Manifest + # /* if your branch name is other than the one which you dispatched workflow from then set it manually in the place of ${GITHUB_REF##*/}" */ + run: echo "MANIFEST=https://github.com/PitchBlackRecoveryProject/manifest_pb -b android-12.1" >> $GITHUB_ENV + + - name: Export Vars + run: | + if [[ ${BUILD_RELEASE_TYPE} == "TEST" ]]; then echo "TEST_BUILD=true" >> $GITHUB_ENV;fi + if [[ ${BUILD_RELEASE_TYPE} == "BETA" ]]; then echo "BETA_BUILD=true" >> $GITHUB_ENV;fi + if [[ ${BUILD_RELEASE_TYPE} == "OFFICIAL" ]]; then echo "PB_OFFICIAL=true" >> $GITHUB_ENV;fi + - name: Checkout Cleaning Up Runner Repo + uses: actions/checkout@v2 + with: + repository: PitchBlackRecoveryProject/Cleaner + ref: main + token: ${{ secrets.GH_BOT_TOKEN }} + path: .github/actions/Cleaner + - name: Cleaning + uses: ./.github/actions/Cleaner + + - name: Checkout Recovery Compiler Repo + uses: actions/checkout@v2 + with: + repository: erwinabs/Compiler + ref: production + token: ${{ secrets.GH_BOT_TOKEN }} + path: .github/actions/Compiler + - name: Recovery Compilation + uses: ./.github/actions/Compiler + + - name: Release Builds + run: | + sudo apt-get update && sudo apt-get install sshpass -y + cd $BuildPath + bash vendor/utils/pb_deploy.sh ${BUILD_RELEASE_TYPE} ${VENDOR} ${CODENAME} diff --git a/AndroidProducts.mk b/AndroidProducts.mk index d3ceffd..6afcf43 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -15,7 +15,7 @@ # PRODUCT_MAKEFILES := \ - $(LOCAL_DIR)/twrp_ginkgo.mk + $(LOCAL_DIR)/omni_ginkgo.mk COMMON_LUNCH_CHOICES := \ - twrp_ginkgo-eng + omni_ginkgo-eng diff --git a/BoardConfig.mk b/BoardConfig.mk index b7777d4..20bbf76 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -178,3 +178,10 @@ TW_OVERRIDE_SYSTEM_PROPS := \ # TWRP Debug Flags TWRP_INCLUDE_LOGCAT := true TARGET_USES_LOGD := true + +# PBRP specific build flags +PB_DISABLE_DEFAULT_DM_VERITY := true +PB_DISABLE_DEFAULT_TREBLE_COMP := true + +# PB Torch +PB_TORCH_PATH := "/sys/class/leds/led:torch_0" diff --git a/device.mk b/device.mk index f676b8e..17e6b37 100644 --- a/device.mk +++ b/device.mk @@ -1,6 +1,3 @@ -# Api -PRODUCT_SHIPPING_API_LEVEL := 28 - # qcom decryption PRODUCT_PACKAGES_ENG += \ qcom_decrypt \ diff --git a/twrp.dependencies b/omni.dependencies similarity index 100% rename from twrp.dependencies rename to omni.dependencies diff --git a/twrp_ginkgo.mk b/omni_ginkgo.mk similarity index 94% rename from twrp_ginkgo.mk rename to omni_ginkgo.mk index a3b00ae..b21848c 100644 --- a/twrp_ginkgo.mk +++ b/omni_ginkgo.mk @@ -28,10 +28,10 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk) # Inherit from our custom product configuration -$(call inherit-product, vendor/twrp/config/common.mk) +$(call inherit-product, vendor/pb/config/common.mk) PRODUCT_DEVICE := ginkgo -PRODUCT_NAME := twrp_ginkgo +PRODUCT_NAME := omni_ginkgo PRODUCT_BRAND := Xiaomi PRODUCT_MODEL := Xiaomi Redmi Note 8 PRODUCT_MANUFACTURER := Xiaomi