Skip to content

Commit

Permalink
Update workflow for multiple device compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
MisaLiu committed Feb 1, 2024
1 parent b1e9c49 commit dfcdf8d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/ofrp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ env:
SYNC_URL: "https://gitlab.com/OrangeFox/sync.git"
MANIFEST_BRANCH: "9.0"
DEVICE_TREE_URL: "https://github.com/CrackMiDrAi/twrp_device_tree"
DEVICE_TREE_BRANCH: "main"
DEVICE_PATH: "device/xiaomi/Archimedes"
DEVICE_NAME: "Archimedes"
MAKEFILE_NAME: "omni_Archimedes"
BUILD_TARGET: "recovery"

jobs:
build:
runs-on: ubuntu-20.04
permissions:
contents: write
strategy:
matrix:
DEVICE_NAME: [ Archytas, Archimedes ]
env:
DEVICE_TREE_BRANCH: ${{ matrix.DEVICE_NAME }}
DEVICE_PATH: "device/xiaomi/${{ matrix.DEVICE_NAME }}"
MAKEFILE_NAME: "omni_${{ matrix.DEVICE_NAME }}"
steps:
- name: Display Run Parameters
run: |
Expand All @@ -26,7 +29,7 @@ jobs:
echo "Device Tree URL: ${{ env.DEVICE_TREE_URL }}"
echo "Device Tree Branch: ${{ env.DEVICE_TREE_BRANCH }}"
echo "Device Path: ${{ env.DEVICE_PATH }}"
echo "Device Name: ${{ env.DEVICE_NAME }}"
echo "Device Name: ${{ matrix.DEVICE_NAME }}"
echo "Makefile Name: ${{ env.MAKEFILE_NAME }}"
echo "Build Target: ${{ env.BUILD_TARGET }}.img"
echo "::endgroup::"
Expand Down Expand Up @@ -93,20 +96,20 @@ jobs:
run: |
ls -al ${{ steps.pwd.outputs.workspace-folder }}/fox_${{ env.MANIFEST_BRANCH }}/out/target/product/
echo
ls -al ${{ steps.pwd.outputs.workspace-folder }}/fox_${{ env.MANIFEST_BRANCH }}/out/target/product/${{ env.DEVICE_NAME }}/
ls -al ${{ steps.pwd.outputs.workspace-folder }}/fox_${{ env.MANIFEST_BRANCH }}/out/target/product/${{ matrix.DEVICE_NAME }}/
- name: Upload to Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ steps.pwd.outputs.workspace-folder }}/fox_${{ env.MANIFEST_BRANCH }}/out/target/product/${{ env.DEVICE_NAME }}/*.img
${{ steps.pwd.outputs.workspace-folder }}/fox_${{ env.MANIFEST_BRANCH }}/out/target/product/${{ env.DEVICE_NAME }}/*.zip
name: OFRP-${{ env.DEVICE_NAME }}-${{ github.run_id }}
tag_name: ofrp-${{ github.run_id }}
${{ steps.pwd.outputs.workspace-folder }}/fox_${{ env.MANIFEST_BRANCH }}/out/target/product/${{ matrix.DEVICE_NAME }}/*.img
${{ steps.pwd.outputs.workspace-folder }}/fox_${{ env.MANIFEST_BRANCH }}/out/target/product/${{ matrix.DEVICE_NAME }}/*.zip
name: OFRP-${{ matrix.DEVICE_NAME }}-${{ github.run_id }}
tag_name: ofrp-${{ matrix.DEVICE_NAME }}-${{ github.run_id }}
body: |
Recovery name: OrangeFox Recovery Project
Manifest: ${{ env.MANIFEST_BRANCH }}
Device: ${{ env.DEVICE_NAME }}
Device: ${{ matrix.DEVICE_NAME }}
Target: ${{ env.BUILD_TARGET }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 14 additions & 11 deletions .github/workflows/twrp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ env:
MANIFEST_URL: "https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni"
MANIFEST_BRANCH: "twrp-9.0"
DEVICE_TREE_URL: "https://github.com/CrackMiDrAi/twrp_device_tree"
DEVICE_TREE_BRANCH: "main"
DEVICE_PATH: "device/xiaomi/Archimedes"
DEVICE_NAME: "Archimedes"
MAKEFILE_NAME: "omni_Archimedes"
BUILD_TARGET: "recovery"

jobs:
build:
runs-on: ubuntu-20.04
permissions:
contents: write
strategy:
matrix:
DEVICE_NAME: [ Archytas, Archimedes ]
env:
DEVICE_TREE_BRANCH: ${{ matrix.DEVICE_NAME }}
DEVICE_PATH: "device/xiaomi/${{ matrix.DEVICE_NAME }}"
MAKEFILE_NAME: "omni_${{ matrix.DEVICE_NAME }}"
steps:
- name: Display Run Parameters
run: |
Expand All @@ -27,7 +30,7 @@ jobs:
echo "Device Tree URL: ${{ env.DEVICE_TREE_URL }}"
echo "Device Tree Branch: ${{ env.DEVICE_TREE_BRANCH }}"
echo "Device Path: ${{ env.DEVICE_PATH }}"
echo "Device Name: ${{ env.DEVICE_NAME }}"
echo "Device Name: ${{ matrix.DEVICE_NAME }}"
echo "Makefile Name: ${{ env.MAKEFILE_NAME }}"
echo "Build Target: ${{ env.BUILD_TARGET }}.img"
echo "::endgroup::"
Expand Down Expand Up @@ -101,15 +104,15 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: |
workspace/out/target/product/${{ env.DEVICE_NAME }}/${{ env.BUILD_TARGET }}.img
workspace/out/target/product/${{ env.DEVICE_NAME }}/*.zip
workspace/out/target/product/${{ env.DEVICE_NAME }}/*vendor*.img
name: TWRP-${{ env.DEVICE_NAME }}-${{ github.run_id }}
tag_name: twrp-${{ github.run_id }}
workspace/out/target/product/${{ matrix.DEVICE_NAME }}/${{ env.BUILD_TARGET }}.img
workspace/out/target/product/${{ matrix.DEVICE_NAME }}/*.zip
workspace/out/target/product/${{ matrix.DEVICE_NAME }}/*vendor*.img
name: TWRP-${{ matrix.DEVICE_NAME }}-${{ github.run_id }}
tag_name: twrp-${{ matrix.DEVICE_NAME }}-${{ github.run_id }}
body: |
Recovery name: TeamWin Recovery Project
Manifest: ${{ env.MANIFEST_BRANCH }}
Device: ${{ env.DEVICE_NAME }}
Device: ${{ matrix.DEVICE_NAME }}
Target: ${{ env.BUILD_TARGET }}.img
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit dfcdf8d

Please sign in to comment.