Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tezt #107

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
49 changes: 19 additions & 30 deletions .github/workflows/Recovery Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,25 @@ on:
workflow_dispatch:
inputs:
MANIFEST_URL:
description: 'MANIFEST_URL (if not using SSH keys, use https:// URL)'
description: 'MANIFEST_URL (if using SSH keys, use [email protected]:repo URL format)'
required: true
default: 'git@github.com:minimal-manifest-twrp/platform_manifest_twrp_aosp.git'
default: 'https://gitlab.com/OrangeFox/sync.git'
MANIFEST_BRANCH:
description: 'MANIFEST_BRANCH'
required: true
default: 'twrp-12.1'
default: '12.1'
DEVICE_TREE_URL:
description: 'DEVICE_TREE_URL'
required: true
default: 'https://github.com/TeamWin/android_device_asus_I003D'
default: 'https://github.com/MikaelaNeia/android_device_xiaomi_agate-twrp'
DEVICE_TREE_BRANCH:
description: 'DEVICE_TREE_BRANCH'
required: true
default: 'android-12.1'
DEVICE_PATH:
description: 'DEVICE_PATH'
required: true
default: 'device/asus/I003D'
default: 'device/xiaomi/agate'
COMMON_TREE_URL:
description: 'COMMON_TREE_URL (if no common tree, leave blank)'
required: false
Expand All @@ -32,21 +32,22 @@ on:
DEVICE_NAME:
description: 'DEVICE_NAME'
required: true
default: 'I003D'
default: 'agate'
MAKEFILE_NAME:
description: 'MAKEFILE_NAME'
required: true
default: 'twrp_I003D'
default: 'twrp_agate'
BUILD_TARGET:
description: 'BUILD_TARGET'
required: true
default: 'recovery'
default: 'boot'

jobs:
build:
if: github.event.repository.owner.id == github.event.sender.id
runs-on: ubuntu-18.04
# You can use either of the ubuntu-18.04 or ubuntu-20.04 runner
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Display Run Parameters
run: |
Expand All @@ -73,7 +74,7 @@ jobs:
run: |
sudo apt update
sudo apt -y upgrade
sudo apt -y install gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc bc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev python
sudo apt -y install gperf gcc-multilib gcc-10-multilib g++-multilib g++-10-multilib libc6-dev lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc bc ccache lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libwxgtk3.0-gtk3-dev libxml2 lzop pngcrush schedtool squashfs-tools imagemagick libbz2-dev lzma ncftp qemu-user-static libstdc++-10-dev python3 python-is-python3

- name: Install OpenJDK
uses: actions/setup-java@v3
Expand All @@ -88,11 +89,6 @@ jobs:
ssh-private-key: |
${{ secrets.SSH_PRIVATE_KEY }}

- name: Set variables
run: |
echo "::set-output name=date::$(date +%F)"
id: var

- name: Install repo
run: |
mkdir ~/bin
Expand All @@ -104,9 +100,9 @@ jobs:
run: |
mkdir workspace
cd workspace
echo "::set-output name=pwd::$(pwd)"
git config --global user.name "Captain Throwback"
git config --global user.email "captainthrowback@hotmail.com"
echo "workspace-folder=$(pwd)" >> $GITHUB_OUTPUT
git config --global user.name "MikaelaNeia"
git config --global user.email "MikaelaNeia0@gmail.com"
repo init --depth=1 -u ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }}
id: pwd

Expand All @@ -118,15 +114,15 @@ jobs:
- 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.pwd }}
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.pwd }}
working-directory: ${{ steps.pwd.outputs.workspace-folder }}

- name: Check Build Tree
uses: haya14busa/action-cond@v1
Expand All @@ -140,27 +136,20 @@ jobs:
run: |
bash ${GITHUB_WORKSPACE}/scripts/convert.sh ${{ github.event.inputs.DEVICE_PATH }}/${{ steps.buildtree.outputs.value }}.dependencies
repo sync -j$(nproc --all)
working-directory: ${{ steps.pwd.outputs.pwd }}
working-directory: ${{ steps.pwd.outputs.workspace-folder }}
continue-on-error: true

- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 12

- name: Check Build Branch
if: ${{ github.event.inputs.MANIFEST_BRANCH == 'twrp-12.1' }}
run: |
source build/envsetup.sh
repopick 5405 5540
working-directory: ${{ steps.pwd.outputs.pwd }}

- name: Building recovery
run: |
source build/envsetup.sh
export ALLOW_MISSING_DEPENDENCIES=true
lunch ${{ github.event.inputs.MAKEFILE_NAME }}-eng && make clean && make ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all)
working-directory: ${{ steps.pwd.outputs.pwd }}
working-directory: ${{ steps.pwd.outputs.workspace-folder }}

- name: Upload to Release
uses: softprops/action-gh-release@v1
Expand Down