Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
3ee6a2ba
Commit
3ee6a2ba
authored
Sep 08, 2021
by
topjohnwu
Committed by
John Wu
Sep 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable ccache for faster builds
parent
69fa7f23
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
8 deletions
+37
-8
ccache.sh
.github/ccache.sh
+17
-0
build.yml
.github/workflows/build.yml
+20
-8
No files found.
.github/ccache.sh
0 → 100644
View file @
3ee6a2ba
OS
=
$(
uname
)
CCACHE_VER
=
4.4
case
$OS
in
Darwin
)
brew
install
ccache
ln
-s
$(
which ccache
)
./ccache
;;
Linux
)
sudo
apt-get
install
-y
ccache
ln
-s
$(
which ccache
)
./ccache
;;
*
)
curl
-OL
https://github.com/ccache/ccache/releases/download/v
${
CCACHE_VER
}
/ccache-
${
CCACHE_VER
}
-windows-64
.zip
unzip
-j
ccache-
*
-windows-64
.zip
'*/ccache.exe'
;;
esac
.github/workflows/build.yml
View file @
3ee6a2ba
...
@@ -10,6 +10,7 @@ on:
...
@@ -10,6 +10,7 @@ on:
-
'
buildSrc/**'
-
'
buildSrc/**'
-
'
build.py'
-
'
build.py'
-
'
gradle.properties'
-
'
gradle.properties'
-
'
.github/workflows/build.yml'
pull_request
:
pull_request
:
branches
:
[
master
]
branches
:
[
master
]
workflow_dispatch
:
workflow_dispatch
:
...
@@ -22,6 +23,9 @@ jobs:
...
@@ -22,6 +23,9 @@ jobs:
fail-fast
:
false
fail-fast
:
false
matrix
:
matrix
:
os
:
[
ubuntu-latest
,
windows-latest
,
macos-latest
]
os
:
[
ubuntu-latest
,
windows-latest
,
macos-latest
]
env
:
NDK_CCACHE
:
${{ github.workspace }}/ccache
CCACHE_DIR
:
${{ github.workspace }}/.ccache
steps
:
steps
:
-
name
:
Check out
-
name
:
Check out
...
@@ -40,12 +44,8 @@ jobs:
...
@@ -40,12 +44,8 @@ jobs:
with
:
with
:
python-version
:
'
3.x'
python-version
:
'
3.x'
-
name
:
Set up GitHub env
-
name
:
Set up ccache
run
:
|
run
:
bash .github/ccache.sh
ndk_ver=$(sed -n 's/^magisk.fullNdkVersion=//p' gradle.properties)
echo ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT >> $GITHUB_ENV
echo MAGISK_NDK_VERSION=$ndk_ver >> $GITHUB_ENV
shell
:
bash
-
name
:
Cache Gradle
-
name
:
Cache Gradle
uses
:
actions/cache@v2
uses
:
actions/cache@v2
...
@@ -56,14 +56,26 @@ jobs:
...
@@ -56,14 +56,26 @@ jobs:
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
id
:
ccache-cache
uses
:
actions/cache@v2
with
:
path
:
${{ github.workspace }}/.ccache
key
:
${{ runner.os }}-ccache-${{ github.sha }}
restore-keys
:
${{ runner.os }}-ccache-
-
name
:
Set up NDK
-
name
:
Set up NDK
run
:
python build.py ndk
run
:
python build.py ndk
-
name
:
Build release
-
name
:
Build release
run
:
python build.py -vr all
run
:
|
./ccache -zp
python build.py -vr all
-
name
:
Build debug
-
name
:
Build debug
run
:
python build.py -v all
run
:
|
python build.py -v all
./ccache -s
-
name
:
Stop gradle daemon
-
name
:
Stop gradle daemon
run
:
./gradlew --stop
run
:
./gradlew --stop
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment