Merge pull request #6 from XenonTheInertG/main

Fix typo & change variables to avoid confusion
This commit is contained in:
Aizawa Hikaru 2021-12-09 06:01:13 -06:00 committed by GitHub
commit 521db7cc9a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 155 additions and 98 deletions

View File

@ -1,36 +1,36 @@
name: Make Recovery name: Android-Recovery-Builder
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
LIBRARY_URL: MANIFEST_TYPE:
description: 'LIBRARY_URL' description: 'MANIFEST_TYPE'
required: true required: true
default: 'https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git' default: 'omni'
LIBRARY_BRANCH: MANIFEST_URL:
description: 'MANIFEST_URL'
required: true
default: 'git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git'
MANIFEST_BRANCH:
description: 'LIBRARY_BRANCH' description: 'LIBRARY_BRANCH'
required: true required: true
default: 'twrp-10.0-deprecated' default: 'twrp-9.0'
LIBRARY_TYPE: DEVICE_TREE_URL:
description: 'LIBRARY_TYPE' description: 'DEVICE_TREE_URL'
required: false
default: 'omni_'
DEVICE_URL:
description: 'DEVICE_URL'
required: true required: true
default: 'https://github.com/Xpsoted/android_device_qualcomm_qrd855-TWRP' default: 'https://github.com/azwhikaru/twrp_device_xiaomi_archytas'
DEVICE_BRANCH: DEVICE_TREE_BRANCH:
description: 'DEVICE_BRANCH' description: 'DEVICE_TREE_BRANCH'
required: true required: true
default: 'android-10' default: 'twrp-9.0'
DEVICE_PATH: DEVICE_PATH:
description: 'DEVICE_PATH' description: 'DEVICE_PATH'
required: true required: true
default: 'device/qualcomm/msmnile' default: 'device/xiaomi/Archytas'
DEVICE_NAME: DEVICE_NAME:
description: 'DEVICE_NAME' description: 'DEVICE_NAME'
required: true required: true
default: 'msmnile' default: 'Archytas'
jobs: jobs:
build: build:
@ -50,6 +50,7 @@ jobs:
sudo apt -y autoclean sudo apt -y autoclean
sudo apt clean sudo apt clean
sudo apt update sudo apt update
sudo apt -y upgrade
sudo apt -y install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip jq bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev imagemagick libbz2-dev libssl-dev lzma ncftp bash-completion python openjdk-8-jdk qemu-user-static sudo apt -y install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip jq bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf lib32ncurses5-dev lib32readline-dev lib32z1-dev liblz4-tool libncurses5-dev libsdl1.2-dev libssl-dev libwxgtk3.0-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev imagemagick libbz2-dev libssl-dev lzma ncftp bash-completion python openjdk-8-jdk qemu-user-static
- name: Set variables - name: Set variables
@ -72,38 +73,36 @@ jobs:
echo "::set-output name=pwd::$(pwd)" echo "::set-output name=pwd::$(pwd)"
git config --global user.name "Hikaru's Action-Build-Bot" git config --global user.name "Hikaru's Action-Build-Bot"
git config --global user.email "Android@teio.tk" git config --global user.email "Android@teio.tk"
repo init --depth=1 -u ${{ github.event.inputs.LIBRARY_URL }} -b ${{ github.event.inputs.LIBRARY_BRANCH }} repo init --depth=1 -u ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }}
id: pwd id: pwd
- name: Repo Sync - name: Repo Sync
run: | run: |
PATH=~/bin:$PATH PATH=~/bin:$PATH
cd workspace cd workspace
repo sync -j$(nproc --all) repo sync -j$(nproc --all) -f --force-sync
ls -al
- name: Clone device - name: Clone device tree
run: | run: |
PATH=~/bin:$PATH PATH=~/bin:$PATH
cd ${{ steps.pwd.outputs.pwd }} cd ${{ steps.pwd.outputs.pwd }}
git clone ${{ github.event.inputs.DEVICE_URL }} -b ${{ github.event.inputs.DEVICE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }} git clone ${{ github.event.inputs.DEVICE_TREE_URL }} -b ${{ github.event.inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }}
- name: Building - name: Building recovery
run: | run: |
PATH=~/bin:$PATH PATH=~/bin:$PATH
cd ${{ steps.pwd.outputs.pwd }} cd ${{ steps.pwd.outputs.pwd }}
export ALLOW_MISSING_DEPENDENCIES=true export ALLOW_MISSING_DEPENDENCIES=true
source build/envsetup.sh source build/envsetup.sh
lunch ${{ github.event.inputs.LIBRARY_TYPE }}${{ github.event.inputs.DEVICE_NAME }}-eng lunch ${{ github.event.inputs.MANIFEST_TYPE }}_${{ github.event.inputs.DEVICE_NAME }}-eng
make clean make clean
make recoveryimage -j$(nproc --all) make recoveryimage -j$(nproc --all)
- name: Upload to Release - name: Upload to Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
files: | files: workspace/out/target/product/${{ github.event.inputs.DEVICE_NAME }}/recovery.img
workspace/out/target/product/${{ github.event.inputs.DEVICE_NAME }}/*.zip
workspace/out/target/product/${{ github.event.inputs.DEVICE_NAME }}/recovery.img
workspace/out/target/product/${{ github.event.inputs.DEVICE_NAME }}/boot.img
name: ${{ github.event.inputs.DEVICE_NAME }}-${{ github.run_id }} name: ${{ github.event.inputs.DEVICE_NAME }}-${{ github.run_id }}
tag_name: ${{ github.run_id }} tag_name: ${{ github.run_id }}
body: Recovery for ${{ github.event.inputs.DEVICE_NAME }} body: Recovery for ${{ github.event.inputs.DEVICE_NAME }}

View File

@ -1,30 +1,30 @@
name: Make Recovery With Common Tree name: Android-Recovery-Builder
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
LIBRARY_NAME: MANIFEST_TYPE:
description: 'LIBRARY_NAME' description: 'MANIFEST_TYPE'
required: true required: true
default: 'omni' default: 'omni'
LIBRARY_URL: MANIFEST_URL:
description: 'LIBRARY_URL' description: 'MANIFEST_URL'
required: true required: true
default: 'https://github.com/SHRP/platform_manifest_twrp_omni.git' default: 'https://github.com/SHRP/platform_manifest_twrp_omni.git'
LIBRARY_BRANCH: MANIFEST_BRANCH:
description: 'LIBRARY_BRANCH' description: 'MANIFEST_BRANCH'
required: true required: true
default: 'v3_10.0' default: 'v3_10.0'
DEVICE_URL: DEVICE_TREE_URL:
description: 'DEVICE_URL' description: 'DEVICE_TREE_URL'
required: true required: true
default: 'https://github.com/SGCMarkus/android_device_lge_flashlmdd-twrp' default: 'https://github.com/SGCMarkus/android_device_lge_flashlmdd-twrp'
DEVICE_COMMON_URL: DEVICE_COMMON_URL:
description: 'DEVICE_COMMON_URL' description: 'DEVICE_COMMON_URL'
required: true required: true
default: 'https://github.com/SGCMarkus/android_device_lge_sm8150-common-twrp' default: 'https://github.com/SGCMarkus/android_device_lge_sm8150-common-twrp'
DEVICE_BRANCH: DEVICE_TREE_BRANCH:
description: 'DEVICE_BRANCH' description: 'DEVICE_TREE_BRANCH'
required: true required: true
default: 'android-10' default: 'android-10'
DEVICE_PATH: DEVICE_PATH:
@ -80,7 +80,7 @@ jobs:
echo "::set-output name=pwd::$(pwd)" echo "::set-output name=pwd::$(pwd)"
git config --global user.name "Hikaru's Action-Build-Bot" git config --global user.name "Hikaru's Action-Build-Bot"
git config --global user.email "Android@teio.tk" git config --global user.email "Android@teio.tk"
repo init --depth=1 -u ${{ github.event.inputs.LIBRARY_URL }} -b ${{ github.event.inputs.LIBRARY_BRANCH }} repo init --depth=1 -u ${{ github.event.inputs.MANIFEST_URL }} -b ${{ github.event.inputs.MANIFEST_BRANCH }}
id: pwd id: pwd
- name: Repo Sync - name: Repo Sync
@ -93,8 +93,8 @@ jobs:
run: | run: |
PATH=~/bin:$PATH PATH=~/bin:$PATH
cd ${{ steps.pwd.outputs.pwd }} cd ${{ steps.pwd.outputs.pwd }}
git clone ${{ github.event.inputs.DEVICE_URL }} -b ${{ github.event.inputs.DEVICE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }} git clone ${{ github.event.inputs.DEVICE_TREE_URL }} -b ${{ github.event.inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.DEVICE_PATH }}
git clone ${{ github.event.inputs.DEVICE_COMMON_URL }} -b ${{ github.event.inputs.DEVICE_BRANCH }} ./${{ github.event.inputs.DEVICE_COMMON_PATH }} git clone ${{ github.event.inputs.DEVICE_COMMON_URL }} -b ${{ github.event.inputs.DEVICE_TREE_BRANCH }} ./${{ github.event.inputs.DEVICE_COMMON_PATH }}
- name: Building - name: Building
run: | run: |
@ -102,7 +102,7 @@ jobs:
cd ${{ steps.pwd.outputs.pwd }} cd ${{ steps.pwd.outputs.pwd }}
export ALLOW_MISSING_DEPENDENCIES=true export ALLOW_MISSING_DEPENDENCIES=true
source build/envsetup.sh source build/envsetup.sh
lunch ${{ github.event.inputs.LIBRARY_NAME }}_${{ github.event.inputs.DEVICE_NAME }}-eng lunch ${{ github.event.inputs.MANIFEST_TYPE }}_${{ github.event.inputs.DEVICE_NAME }}-eng
make clean make clean
make recoveryimage -j$(nproc --all) make recoveryimage -j$(nproc --all)

View File

@ -1,82 +1,57 @@
# 使用 Github Action 编译 Recovery # Use Github Action to compile Recovery
``` ```
支持 OFRP、SHRP、TWRP 编译制作 Support OFRP, SHRP, TWRP compilation and production
``` ```
--- ---
## 更新说明 ## Release Notes
```
= 2021/11/29
- 更新 LIBRARY_NAME 规则,现在 LIBRARY_NAME 不是必须的了
(如果需要继续使用,则需要加上 '_',如 'omni_')
```
```
= 2021/11/20
- 增加默认上传 boot.img
```
```
= 2021/11/17
- 增加编译模式支持 (在 vendorsetup: userdebug/eng/debug)
```
```
= 2021/10/31
- 增加 Common 设备支持 [@Xpsoted](https://github.com/Xpsoted)
```
```
= 2021/10/30
- 优化文件打包上传方式,支持输出 OFRP、SHRP 的卡刷升级包与原始镜像
- 简化制造时的部分流程
```
``` ```
= 2021/10/29: = 2021/10/29:
- 重构 2.0 版本 -Refactored version 2.0
- 完全重构使用逻辑,降低使用难度 -Completely reconstruct the use logic to reduce the difficulty of use
- 优化参数传递部分,现在可以同时运行多个 Worker -Optimize the parameter transfer part, now you can run multiple Workers at the same time
- TWRP 编译测试通过 -TWRP compilation test passed
- OFRP 编译测试通过 -OFRP compilation test passed
- SHRP 编译测试通过 -SHRP compile test passed
``` ```
----- -----
## 参数说明 ## Parameter Description
| 名称 | 描述 | 示例 | | Name | Description | Example |
| ------------ | -------------------- | ------------ | | ------------ | -------------------- | ------------ |
| `LIBRARY_NAME` | 源码类型 | omni | | `MANIFEST_TYPE` | Source Type | omni |
| `LIBRARY_URL` | 源码地址 | https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git | | `MANIFEST_URL` | Source address| https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git |
| `LIBRARY_BRANCH` | 源码分支 | twrp-9.0 | | `MANIFEST_BRANCH` | Source branch | twrp-9.0 |
| `DEVICE_URL` | 设备地址 | https://github.com/azwhikaru/twrp_device_xiaomi_archytas | | `DEVICE_TREE_URL` | Device address| https://github.com/azwhikaru/twrp_device_xiaomi_archytas |
| `DEVICE_BRANCH` | 设备分支 | twrp-9.0 | | `DEVICE_TREE_BRANCH` | Device branch | twrp-9.0 |
| `DEVICE_PATH` | 设备位置 | device/xiaomi/Archytas | | `DEVICE_PATH` | Device location | device/xiaomi/Archytas |
| `DEVICE_NAME` | 机型名称 | Archytas | | `DEVICE_NAME` | Model name | Archytas |
| `DEVICE_TYPE` | 编译模式 | eng/userdebug/debug |
----- -----
## 如何使用 ## how to use
``` ```
例如你的用户名为: Fun-114514 For example, your username is: Fun-114514
``` ```
#### 1、点击本仓库右上角的 'Fork' #### 1. Click'Fork' in the upper right corner of this warehouse
![](https://i.bmp.ovh/imgs/2021/10/6b6ed9f29e732372.png) ![](https://i.bmp.ovh/imgs/2021/10/6b6ed9f29e732372.png)
#### 2、等待自动跳转后,你会看到你自己的用户名 #### 2. After waiting for the automatic redirection, you will see your own username
![](https://i.bmp.ovh/imgs/2021/10/66cfe324c0ebb69b.png) ![](https://i.bmp.ovh/imgs/2021/10/66cfe324c0ebb69b.png)
#### 3、点击 'Actions - Make Recovery' #### 3. Click'Actions-Make Recovery'
![](https://i.bmp.ovh/imgs/2021/10/23896d1b66292047.png) ![](https://i.bmp.ovh/imgs/2021/10/23896d1b66292047.png)
#### 4、点击 'Run workflow' 并按照上文 '参数说明' 填写 #### 4. Click'Run workflow' and fill in according to the above'parameter description'
![](https://i.bmp.ovh/imgs/2021/10/9cb7871267cf2f53.png) ![](https://i.bmp.ovh/imgs/2021/10/9cb7871267cf2f53.png)
#### 5、填写完成后点击 'Run workflow' 开始运行 #### 5. After filling in, click'Run workflow' to start running
----- -----
## 编译结果 ## Compilation results
可以在 [Release](../../releases) 下载 Can be downloaded at [Release](../../releases)
----- -----
## 备注 ## Remark
#### TeamWin Recovery Project: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git #### TeamWin Recovery Project: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git
#### OrangeFox Recovery Project: https://gitlab.com/OrangeFox/Manifest.git #### OrangeFox Recovery Project: https://gitlab.com/OrangeFox/Manifest.git

83
README_CN.md Normal file
View File

@ -0,0 +1,83 @@
# 使用 Github Action 编译 Recovery
```
支持 OFRP、SHRP、TWRP 编译制作
```
---
## 更新说明
```
= 2021/11/29
- 更新 LIBRARY_NAME 规则,现在 LIBRARY_NAME 不是必须的了
(如果需要继续使用,则需要加上 '_',如 'omni_')
```
```
= 2021/11/20
- 增加默认上传 boot.img
```
```
= 2021/11/17
- 增加编译模式支持 (在 vendorsetup: userdebug/eng/debug)
```
```
= 2021/10/31
- 增加 Common 设备支持 [@Xpsoted](https://github.com/Xpsoted)
```
```
= 2021/10/30
- 优化文件打包上传方式,支持输出 OFRP、SHRP 的卡刷升级包与原始镜像
- 简化制造时的部分流程
```
```
= 2021/10/29:
- 重构 2.0 版本
- 完全重构使用逻辑,降低使用难度
- 优化参数传递部分,现在可以同时运行多个 Worker
- TWRP 编译测试通过
- OFRP 编译测试通过
- SHRP 编译测试通过
```
-----
## 参数说明
| 名称 | 描述 | 示例 |
| ------------ | -------------------- | ------------ |
| `LIBRARY_NAME` | 源码类型 | omni |
| `LIBRARY_URL` | 源码地址 | https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git |
| `LIBRARY_BRANCH` | 源码分支 | twrp-9.0 |
| `DEVICE_URL` | 设备地址 | https://github.com/azwhikaru/twrp_device_xiaomi_archytas |
| `DEVICE_BRANCH` | 设备分支 | twrp-9.0 |
| `DEVICE_PATH` | 设备位置 | device/xiaomi/Archytas |
| `DEVICE_NAME` | 机型名称 | Archytas |
| `DEVICE_TYPE` | 编译模式 | eng/userdebug/debug |
-----
## 如何使用
```
例如你的用户名为: Fun-114514
```
#### 1、点击本仓库右上角的 'Fork'
![](https://i.bmp.ovh/imgs/2021/10/6b6ed9f29e732372.png)
#### 2、等待自动跳转后你会看到你自己的用户名
![](https://i.bmp.ovh/imgs/2021/10/66cfe324c0ebb69b.png)
#### 3、点击 'Actions - Make Recovery'
![](https://i.bmp.ovh/imgs/2021/10/23896d1b66292047.png)
#### 4、点击 'Run workflow' 并按照上文 '参数说明' 填写
![](https://i.bmp.ovh/imgs/2021/10/9cb7871267cf2f53.png)
#### 5、填写完成后点击 'Run workflow' 开始运行
-----
## 编译结果
可以在 [Release](../../releases) 下载
-----
## 备注
#### TeamWin Recovery Project: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git
#### OrangeFox Recovery Project: https://gitlab.com/OrangeFox/Manifest.git
#### SKYHAWK Recovery Project: https://github.com/SHRP/platform_manifest_twrp_omni.git