mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-25 18:17:42 +00:00
5e45884af4
https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/
118 lines
2.7 KiB
YAML
118 lines
2.7 KiB
YAML
name: Magisk Build
|
|
|
|
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 Magisk artifacts
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
SCCACHE_DIRECT: false
|
|
strategy:
|
|
fail-fast: false
|
|
steps:
|
|
- name: Check out
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: "recursive"
|
|
fetch-depth: 0
|
|
|
|
- name: Setup environment
|
|
uses: ./.github/actions/setup
|
|
|
|
- name: Build release
|
|
run: ./build.py -vr all
|
|
|
|
- name: Build debug
|
|
run: ./build.py -v all
|
|
|
|
- name: Stop gradle daemon
|
|
run: ./gradlew --stop
|
|
|
|
- name: Upload build artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ github.sha }}
|
|
path: out
|
|
compression-level: 9
|
|
|
|
- name: Upload mapping and native debug symbols
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ github.sha }}-symbols
|
|
path: app/build/outputs
|
|
compression-level: 9
|
|
|
|
test-build:
|
|
name: Test building on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
SCCACHE_DIRECT: false
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, macos-14]
|
|
steps:
|
|
- name: Check out
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: "recursive"
|
|
fetch-depth: 0
|
|
|
|
- name: Setup environment
|
|
uses: ./.github/actions/setup
|
|
|
|
- name: Build debug
|
|
run: python build.py -v all
|
|
|
|
- name: Stop gradle daemon
|
|
run: ./gradlew --stop
|
|
|
|
test:
|
|
name: Test on API ${{ matrix.api }}
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
api: [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34]
|
|
|
|
steps:
|
|
- name: Check out
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python 3
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: Download build artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: ${{ github.sha }}
|
|
path: out
|
|
|
|
- name: Enable KVM group perms
|
|
run: |
|
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
|
sudo udevadm control --reload-rules
|
|
sudo udevadm trigger --name-match=kvm
|
|
|
|
- name: AVD test
|
|
run: scripts/avd_test.sh ${{ matrix.api }}
|