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
18340099
Unverified
Commit
18340099
authored
Dec 25, 2020
by
John Wu
Committed by
GitHub
Dec 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add GitHub actions
Enable GitHub actions to run CI on all 3 platforms
parent
a013696a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
0 deletions
+81
-0
build.yml
.github/workflows/build.yml
+81
-0
No files found.
.github/workflows/build.yml
0 → 100644
View file @
18340099
name
:
Magisk Build
on
:
push
:
branches
:
[
master
]
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@v2
with
:
submodules
:
'
recursive'
fetch-depth
:
0
-
name
:
Set up JDK 11
uses
:
actions/setup-java@v1
with
:
java-version
:
'
11'
-
name
:
Set up Python 3
uses
:
actions/setup-python@v2
with
:
python-version
:
'
3.x'
-
name
:
Set up GitHub env (Windows)
if
:
runner.os == 'Windows'
run
:
|
$oldAndroidPath = $env:ANDROID_SDK_ROOT
$sdk_root = "C:\Android"
New-Item -Path $sdk_root -ItemType SymbolicLink -Value $oldAndroidPath
echo "ANDROID_SDK_ROOT=$sdk_root" >> $env:GITHUB_ENV
echo "ANDROID_HOME=$sdk_root" >> $env:GITHUB_ENV
-
name
:
Set up GitHub env (Unix)
if
:
runner.os != 'Windows'
run
:
echo ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT >> $GITHUB_ENV
-
name
:
Cache Gradle
uses
:
actions/cache@v2
with
:
path
:
|
~/.gradle/caches
~/.gradle/wrapper
key
:
${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle.kts') }}
restore-keys
:
${{ runner.os }}-gradle-
-
name
:
Cache NDK
id
:
ndk-cache
uses
:
actions/cache@v2
with
:
path
:
${{ env.ANDROID_SDK_ROOT }}/ndk/magisk
key
:
${{ runner.os }}-ndk-${{ hashFiles('gradle.properties') }}
-
name
:
Set up NDK
if
:
steps.ndk-cache.outputs.cache-hit != 'true'
run
:
python3 build.py ndk
-
name
:
Build release
run
:
python3 build.py -vr all
-
name
:
Build debug
run
:
python3 build.py -v all
# Only upload artifacts built on Linux
-
name
:
Upload build artifact
if
:
runner.os == 'Linux' && github.event_name != 'pull_request'
uses
:
actions/upload-artifact@v2
with
:
name
:
${{ github.sha }}-artifact
path
:
out
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