forked from topjohnwu/Magisk
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
6 additions
and
114 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,105 +1,12 @@ | ||
name: Magisk Build | ||
name: Magisk Test | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
paths: | ||
- "app/**" | ||
- "native/**" | ||
- "stub/**" | ||
- "buildSrc/**" | ||
- "build.py" | ||
- "gradle.properties" | ||
- ".github/workflows/build.yml" | ||
pull_request: | ||
branches: [master] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Set up sccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
variant: sccache | ||
key: ${{ runner.os }}-${{ github.sha }} | ||
restore-keys: ${{ runner.os }} | ||
max-size: 10000M | ||
|
||
- name: Cache Gradle dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
!~/.gradle/caches/build-cache-* | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }} | ||
restore-keys: ${{ runner.os }}-gradle- | ||
|
||
- name: Cache build cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches/build-cache-* | ||
key: ${{ runner.os }}-build-cache-${{ github.sha }} | ||
restore-keys: ${{ runner.os }}-build-cache- | ||
|
||
- name: Set up NDK | ||
run: python build.py -v ndk | ||
|
||
- name: Build release | ||
run: | | ||
python build.py -vr all | ||
- name: Build debug | ||
run: | | ||
python build.py -v all | ||
- name: Stop gradle daemon | ||
run: ./gradlew --stop | ||
|
||
# Only upload artifacts built on Linux | ||
- name: Upload build artifact | ||
if: runner.os == 'Linux' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.sha }} | ||
path: out | ||
|
||
- name: Upload mapping and native debug symbols | ||
if: runner.os == 'Linux' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ github.sha }}-symbols | ||
path: app/build/outputs | ||
|
||
test: | ||
name: Test on ${{ matrix.api }} | ||
runs-on: macos-latest | ||
needs: build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -111,23 +18,11 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "17" | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Download build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ github.sha }} | ||
path: out | ||
|
||
- name: AVD test | ||
run: | | ||
brew install coreutils bash | ||
|
Binary file not shown.
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