Skip to content

Commit

Permalink
Increase Build Speed
Browse files Browse the repository at this point in the history
Co-authored-by: Syuugo <[email protected]>
  • Loading branch information
YT-Advanced and s1204IT authored Oct 6, 2023
1 parent 8c86c07 commit 6997b77
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 26 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,11 @@ jobs:
./scripts/build.sh --arch ${{ inputs.arch }} --release-type $RELEASE_TYPE --magisk-ver stable --gapps-brand ${{ inputs.gapps }} --root-sol ${{ inputs.root }} --custom-model redfin --remove-amazon --compress-format zip
- name: Pass to Windows 💸
uses: actions/upload-artifact@v3
uses: actions/cache/save@v3
with:
name: ${{ steps.wsa.outputs.artifact }}
path: output
key: ${{ steps.wsa.outputs.artifact }}
enableCrossOsArchive: true

- name: Prepare release tag 🏷️
id: date
Expand All @@ -87,10 +88,12 @@ jobs:
uses: actions/checkout@v4

- name: Download built artifact ⌛
uses: actions/download-artifact@v3
uses: actions/cache/restore@v3
with:
path: output/
name: ${{ needs.build.outputs.zipname }}
path: output
key: ${{ needs.build.outputs.artifact }}
enableCrossOsArchive: true
fail-on-cache-miss: true

- name: Merge language and density resources 🧙🏻‍♂️
run: (Start-Process pwsh.exe -NoNewWindow -PassThru -Args "-ExecutionPolicy Bypass -File MakePri.ps1" -WorkingDirectory "${{ github.workspace }}\output\${{ needs.build.outputs.zipname }}").WaitForExit()
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/comment_on_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,11 @@ jobs:
./scripts/build.sh ${{ env.body }} --after-compress
- name: Pass to Windows
uses: actions/upload-artifact@v3
uses: actions/cache/save@v3
with:
name: ${{ steps.wsa.outputs.artifact }}
path: output
key: ${{ steps.wsa.outputs.artifact }}
enableCrossOsArchive: true

outputs:
artifact: ${{ steps.wsa.outputs.artifact }}
Expand All @@ -248,15 +249,12 @@ jobs:
uses: actions/checkout@v4

- name: Download built artifact
uses: actions/download-artifact@v3
with:
path: output/
name: ${{ needs.build.outputs.artifact }}

- name: Remove unused artifact
uses: geekyeggo/delete-artifact@v2
uses: actions/cache/restore@v3
with:
name: ${{ needs.build.outputs.artifact }}
path: output
key: ${{ needs.build.outputs.artifact }}
enableCrossOsArchive: true
fail-on-cache-miss: true

- name: Merge language and density resources
run: (Start-Process pwsh.exe -NoNewWindow -PassThru -Args "-ExecutionPolicy Bypass -File MakePri.ps1" -WorkingDirectory "${{ github.workspace }}\output\${{ needs.build.outputs.artifact }}").WaitForExit()
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/custom_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,20 @@ jobs:
MAGISK_VER="${opts[ROOT_SOL,${{ inputs.root_sol }}]}"
ROOT_SOL="magisk"
else
ROOT_SOL="${opts[ROOT_SOL,${{ inputs.root_sol }}]}"
MAGISK_VER="${opts[ROOT_SOL,Magisk Stable]}"
ROOT_SOL="${opts[ROOT_SOL,${{ inputs.root_sol }}]}"
fi
mkdir -p download
echo -e "user_code=$(cat $GITHUB_EVENT_PATH | jq -r '.inputs.user_code')" > download/.ms_account
./scripts/build.sh --arch ${{ inputs.arch }} --release-type ${opts[RELEASE_TYPE,${{ inputs.release_type }}]} --magisk-ver $MAGISK_VER --gapps-brand ${opts[GAPPS_BRAND,${{ inputs.gapps_brand }}]} --custom-model ${opts[CUSTOM_MODEL,${{ inputs.custom_model }}]} --root-sol $ROOT_SOL --compress-format ${opts[COMPRESSION,${{ inputs.compression }}]} ${opts[REMOVE_AMAZON,${{ inputs.remove_amazon }}]} --after-compress
- name: Pass to Windows 💸
uses: actions/upload-artifact@v3
uses: actions/cache/save@v3
with:
name: ${{ steps.wsa.outputs.artifact }}
path: output
key: ${{ steps.wsa.outputs.artifact }}
enableCrossOsArchive: true

outputs:
artifact: ${{ steps.wsa.outputs.artifact }}
Expand All @@ -122,15 +123,12 @@ jobs:
uses: actions/checkout@v4

- name: Download built artifact ⌛
uses: actions/download-artifact@v3
uses: actions/cache/restore@v3
with:
path: output/
name: ${{ needs.build.outputs.artifact }}

- name: Remove unused artifact ❌
uses: geekyeggo/delete-artifact@v2
with:
name: ${{ needs.build.outputs.artifact }}
path: output
key: ${{ needs.build.outputs.artifact }}
enableCrossOsArchive: true
fail-on-cache-miss: true

- name: Merge language and density resources 🧙🏻‍♂️
run: (Start-Process pwsh.exe -NoNewWindow -PassThru -Args "-ExecutionPolicy Bypass -File MakePri.ps1" -WorkingDirectory "${{ github.workspace }}\output\${{ needs.build.outputs.artifact }}").WaitForExit()
Expand Down

0 comments on commit 6997b77

Please sign in to comment.