forked from topjohnwu/Magisk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topjohnwu:master' into master
- Loading branch information
Showing
520 changed files
with
5,907 additions
and
5,328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,100 @@ | ||
name: Magisk Setup | ||
inputs: | ||
is-asset-build: | ||
required: false | ||
default: false | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
java-version: "21" | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install GNU make | ||
if: runner.os == 'macOS' | ||
shell: bash | ||
run: | | ||
brew install make | ||
echo 'GNUMAKE=gmake' >> "$GITHUB_ENV" | ||
- name: Cache sccache | ||
uses: actions/cache@v4 | ||
with: | ||
path: .sccache | ||
key: sccache-${{ runner.os }}-${{ github.sha }} | ||
restore-keys: sccache-${{ runner.os }}- | ||
|
||
- name: Set up sccache | ||
uses: hendrikmuhs/[email protected] | ||
shell: bash | ||
env: | ||
SCCACHE_DIRECT: false | ||
SCCACHE_DIR: ${{ github.workspace }}/.sccache | ||
SCCACHE_CACHE_SIZE: 2G | ||
SCCACHE_IDLE_TIMEOUT: 0 | ||
run: | | ||
bash $GITHUB_ACTION_PATH/sccache.sh | ||
sccache --start-server | ||
sccache -z | ||
- name: Show sccache stats | ||
uses: gacts/run-and-post-run@v1 | ||
with: | ||
variant: sccache | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
restore-keys: ${{ runner.os }} | ||
max-size: 10000M | ||
run: sccache -s | ||
post: sccache -s | ||
|
||
- name: Set GRADLE_USER_HOME | ||
shell: bash | ||
run: echo "GRADLE_USER_HOME=$GITHUB_WORKSPACE/.gradle" >> "$GITHUB_ENV" | ||
|
||
- name: Cache Gradle dependencies | ||
uses: actions/cache@v4 | ||
if: inputs.is-asset-build == 'true' | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
!~/.gradle/caches/build-cache-* | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | ||
restore-keys: ${{ runner.os }}-gradle- | ||
.gradle/caches | ||
.gradle/wrapper | ||
!.gradle/caches/build-cache-* | ||
key: gradle-cache-${{ hashFiles('gradle/**') }} | ||
restore-keys: gradle-cache- | ||
|
||
- name: Cache build cache | ||
- name: Restore Gradle dependencies | ||
uses: actions/cache/restore@v4 | ||
if: inputs.is-asset-build == 'false' | ||
with: | ||
path: | | ||
.gradle/caches | ||
.gradle/wrapper | ||
!.gradle/caches/build-cache-* | ||
key: gradle-cache-${{ hashFiles('gradle/**') }} | ||
restore-keys: gradle-cache- | ||
enableCrossOsArchive: true | ||
|
||
- name: Cache Gradle build cache | ||
uses: actions/cache@v4 | ||
if: inputs.is-asset-build == 'true' | ||
with: | ||
path: | | ||
.gradle/caches/build-cache-* | ||
key: gradle-build-cache-${{ github.sha }} | ||
restore-keys: gradle-build-cache- | ||
|
||
- name: Restore Gradle build cache | ||
uses: actions/cache/restore@v4 | ||
if: inputs.is-asset-build == 'false' | ||
with: | ||
path: | | ||
~/.gradle/caches/build-cache-* | ||
key: ${{ runner.os }}-build-cache-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-build-cache- | ||
.gradle/caches/build-cache-* | ||
key: gradle-build-cache-${{ github.sha }} | ||
restore-keys: gradle-build-cache- | ||
enableCrossOsArchive: true | ||
|
||
- name: Set up NDK | ||
run: python build.py -v ndk | ||
shell: bash | ||
run: python build.py -v ndk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Get latest sccache version | ||
get_sccache_ver() { | ||
curl -sL 'https://api.github.com/repos/mozilla/sccache/releases/latest' | jq -r .name | ||
} | ||
|
||
# $1=variant | ||
# $2=install_dir | ||
# $3=exe | ||
install_from_gh() { | ||
local ver=$(curl -sL 'https://api.github.com/repos/mozilla/sccache/releases/latest' | jq -r .name) | ||
local url="https://github.com/mozilla/sccache/releases/download/${ver}/sccache-${ver}-$1.tar.gz" | ||
local dest="$2/$3" | ||
curl -L "$url" | tar xz -O --wildcards "*/$3" > $dest | ||
chmod +x $dest | ||
} | ||
|
||
if [ $RUNNER_OS = "macOS" ]; then | ||
brew install sccache | ||
elif [ $RUNNER_OS = "Linux" ]; then | ||
install_from_gh x86_64-unknown-linux-musl /usr/local/bin sccache | ||
elif [ $RUNNER_OS = "Windows" ]; then | ||
install_from_gh x86_64-pc-windows-msvc $USERPROFILE/.cargo/bin sccache.exe | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
abiList=arm64-v8a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.