|
|
@@ -55,7 +55,9 @@ jobs:
|
|
|
echo "Manifest Branch: ${{ github.event.inputs.MANIFEST_BRANCH }}"
|
|
|
echo "Device Tree URL: ${{ github.event.inputs.DEVICE_TREE_URL }}"
|
|
|
echo "Device Tree Branch: ${{ github.event.inputs.DEVICE_TREE_BRANCH }}"
|
|
|
+ echo "Device Path: ${{ github.event.inputs.DEVICE_PATH }}"
|
|
|
echo "Device Name: ${{ github.event.inputs.DEVICE_NAME }}"
|
|
|
+ echo "Makefile Name: ${{ github.event.inputs.MAKEFILE_NAME }}"
|
|
|
echo "Build Target: ${{ github.event.inputs.BUILD_TARGET }}.img"
|
|
|
echo "::endgroup::"
|
|
|
|
|
|
@@ -71,32 +73,14 @@ 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 python qemu-user-static libstdc++-10-dev
|
|
|
- sudo apt-get update
|
|
|
- sudo apt-get -y install --reinstall build-essential
|
|
|
+ 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
|
|
|
|
|
|
-
|
|
|
- - name: Install OpenJDK 7
|
|
|
- if: |
|
|
|
- github.event.inputs.MANIFEST_BRANCH == 'twrp-5.1'
|
|
|
- || github.event.inputs.MANIFEST_BRANCH == 'twrp-6.0'
|
|
|
- uses: actions/setup-java@v3
|
|
|
- with:
|
|
|
- distribution: 'zulu'
|
|
|
- java-version: '7'
|
|
|
-
|
|
|
- - name: Install OpenJDK 8
|
|
|
- if: |
|
|
|
- github.event.inputs.MANIFEST_BRANCH != 'twrp-5.1'
|
|
|
- && github.event.inputs.MANIFEST_BRANCH != 'twrp-6.0'
|
|
|
+ - name: Install OpenJDK
|
|
|
uses: actions/setup-java@v3
|
|
|
with:
|
|
|
distribution: 'zulu'
|
|
|
java-version: '8'
|
|
|
|
|
|
- - name: Verify Java Install
|
|
|
- run: java -version
|
|
|
-
|
|
|
- name: Setup SSH Keys
|
|
|
if: ${{ startsWith(github.event.inputs.MANIFEST_URL, 'git@github.com') }}
|
|
|
uses: webfactory/ssh-agent@v0.5.4
|
|
|
@@ -114,11 +98,10 @@ jobs:
|
|
|
mkdir ~/bin
|
|
|
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
|
|
|
chmod a+x ~/bin/repo
|
|
|
- export PATH=~/bin:$PATH
|
|
|
+ sudo ln -sf ~/bin/repo /usr/bin/repo
|
|
|
|
|
|
- name: Initialize repo
|
|
|
run: |
|
|
|
- PATH=~/bin:$PATH
|
|
|
mkdir workspace
|
|
|
cd workspace
|
|
|
echo "::set-output name=pwd::$(pwd)"
|
|
|
@@ -129,57 +112,56 @@ jobs:
|
|
|
|
|
|
- name: Repo Sync
|
|
|
run: |
|
|
|
- PATH=~/bin:$PATH
|
|
|
- cd workspace
|
|
|
- repo sync -j$(nproc --all) -f --force-sync
|
|
|
- ls -al
|
|
|
+ repo sync -j$(nproc --all) --force-sync
|
|
|
+ working-directory: workspace
|
|
|
|
|
|
- name: Clone device tree
|
|
|
run: |
|
|
|
- PATH=~/bin:$PATH
|
|
|
- cd ${{ steps.pwd.outputs.pwd }}
|
|
|
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 }}
|
|
|
|
|
|
- name: Clone common tree
|
|
|
if: |
|
|
|
github.event.inputs.COMMON_TREE_URL != null
|
|
|
&& github.event.inputs.COMMON_PATH != null
|
|
|
run: |
|
|
|
- PATH=~/bin:$PATH
|
|
|
- cd ${{ steps.pwd.outputs.pwd }}
|
|
|
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 }}
|
|
|
+
|
|
|
+ - name: Check Build Tree
|
|
|
+ uses: haya14busa/action-cond@v1
|
|
|
+ id: buildtree
|
|
|
+ with:
|
|
|
+ cond: ${{ github.event.inputs.MANIFEST_BRANCH == 'twrp-11' || github.event.inputs.MANIFEST_BRANCH == 'twrp-12.1' }}
|
|
|
+ if_true: twrp
|
|
|
+ if_false: omni
|
|
|
+
|
|
|
+ - name: Sync Device Dependencies
|
|
|
+ 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 }}
|
|
|
+ continue-on-error: true
|
|
|
|
|
|
- name: Set Swap Space
|
|
|
uses: pierotofy/set-swap-space@master
|
|
|
with:
|
|
|
swap-size-gb: 12
|
|
|
|
|
|
- - name: Check Build Branch - Step 1
|
|
|
+ - name: Check Build Branch
|
|
|
if: ${{ github.event.inputs.MANIFEST_BRANCH == 'twrp-12.1' }}
|
|
|
run: |
|
|
|
- PATH=~/bin:$PATH
|
|
|
- cd ${{ steps.pwd.outputs.pwd }}
|
|
|
source build/envsetup.sh
|
|
|
repopick 5405 5540
|
|
|
-
|
|
|
- - name: Check Build Branch - Step 2
|
|
|
- if: ${{ github.event.inputs.MANIFEST_BRANCH == 'twrp-5.1' }}
|
|
|
- run: |
|
|
|
- PATH=~/bin:$PATH
|
|
|
- cd ${{ steps.pwd.outputs.pwd }}
|
|
|
- cd bootable/recovery
|
|
|
- git fetch https://gerrit.twrp.me/android_bootable_recovery refs/changes/29/5729/1 && git cherry-pick FETCH_HEAD
|
|
|
+ working-directory: ${{ steps.pwd.outputs.pwd }}
|
|
|
|
|
|
- name: Building recovery
|
|
|
run: |
|
|
|
- PATH=~/bin:$PATH
|
|
|
- cd ${{ steps.pwd.outputs.pwd }}
|
|
|
source build/envsetup.sh
|
|
|
- lunch ${{ github.event.inputs.MAKEFILE_NAME }}-eng
|
|
|
export ALLOW_MISSING_DEPENDENCIES=true
|
|
|
- make clean
|
|
|
- make ${{ github.event.inputs.BUILD_TARGET }}image -j$(nproc --all)
|
|
|
-
|
|
|
+ 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 }}
|
|
|
+
|
|
|
- name: Upload to Release
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
with:
|