mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-25 02:55:33 +00:00
Separate dependency and build cache
This commit is contained in:
parent
3ee6a2baf2
commit
eca37bce38
18
.github/workflows/build.yml
vendored
18
.github/workflows/build.yml
vendored
@ -25,7 +25,7 @@ jobs:
|
|||||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
env:
|
env:
|
||||||
NDK_CCACHE: ${{ github.workspace }}/ccache
|
NDK_CCACHE: ${{ github.workspace }}/ccache
|
||||||
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
CCACHE_DIR: ~/.ccache
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out
|
- name: Check out
|
||||||
@ -47,25 +47,27 @@ jobs:
|
|||||||
- name: Set up ccache
|
- name: Set up ccache
|
||||||
run: bash .github/ccache.sh
|
run: bash .github/ccache.sh
|
||||||
|
|
||||||
- name: Cache Gradle
|
- name: Cache Gradle dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
~/.gradle/wrapper
|
~/.gradle/wrapper
|
||||||
|
!~/.gradle/caches/build-cache-*
|
||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
|
||||||
restore-keys: ${{ runner.os }}-gradle-
|
restore-keys: ${{ runner.os }}-gradle-
|
||||||
|
|
||||||
- name: Cache ccache
|
- name: Cache build cache
|
||||||
id: ccache-cache
|
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/.ccache
|
path: |
|
||||||
key: ${{ runner.os }}-ccache-${{ github.sha }}
|
~/.ccache
|
||||||
restore-keys: ${{ runner.os }}-ccache-
|
~/.gradle/caches/build-cache-*
|
||||||
|
key: ${{ runner.os }}-build-cache-${{ github.sha }}
|
||||||
|
restore-keys: ${{ runner.os }}-build-cache-
|
||||||
|
|
||||||
- name: Set up NDK
|
- name: Set up NDK
|
||||||
run: python build.py ndk
|
run: python build.py -v ndk
|
||||||
|
|
||||||
- name: Build release
|
- name: Build release
|
||||||
run: |
|
run: |
|
||||||
|
2
build.py
2
build.py
@ -431,7 +431,7 @@ def setup_ndk(args):
|
|||||||
rm_rf(ndk_path)
|
rm_rf(ndk_path)
|
||||||
with zipfile.ZipFile(ndk_zip, 'r') as zf:
|
with zipfile.ZipFile(ndk_zip, 'r') as zf:
|
||||||
for info in zf.infolist():
|
for info in zf.infolist():
|
||||||
print(f'Extracting {info.filename}')
|
vprint(f'Extracting {info.filename}')
|
||||||
if info.external_attr == 2716663808: # symlink
|
if info.external_attr == 2716663808: # symlink
|
||||||
src = zf.read(info).decode("utf-8")
|
src = zf.read(info).decode("utf-8")
|
||||||
dest = op.join(ndk_root, info.filename)
|
dest = op.join(ndk_root, info.filename)
|
||||||
|
@ -17,6 +17,9 @@ org.gradle.jvmargs=-Xmx2560m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF
|
|||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||||
org.gradle.parallel=true
|
org.gradle.parallel=true
|
||||||
|
|
||||||
|
# Enable build cache
|
||||||
|
org.gradle.caching=true
|
||||||
|
|
||||||
# Android
|
# Android
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.enableJetifier=false
|
android.enableJetifier=false
|
||||||
|
Loading…
Reference in New Issue
Block a user