118 lines
2.7 KiB
YAML
Raw Normal View History

name: Magisk Build
on:
push:
2023-05-10 00:10:19 -07:00
branches: [master]
2020-12-28 16:38:25 -08:00
paths:
2023-05-10 00:10:19 -07:00
- "app/**"
- "native/**"
- "stub/**"
- "buildSrc/**"
- "build.py"
- "gradle.properties"
- ".github/workflows/build.yml"
pull_request:
2023-05-10 00:10:19 -07:00
branches: [master]
workflow_dispatch:
jobs:
build:
2024-01-29 01:53:09 -08:00
name: Build Magisk artifacts
runs-on: ubuntu-latest
2023-11-30 01:55:27 +08:00
env:
SCCACHE_DIRECT: false
strategy:
fail-fast: false
steps:
- name: Check out
2023-10-26 14:50:42 -07:00
uses: actions/checkout@v4
with:
2023-05-10 00:10:19 -07:00
submodules: "recursive"
fetch-depth: 0
2024-01-29 01:53:09 -08:00
- name: Setup environment
uses: ./.github/actions/setup
- name: Build release
2024-01-29 01:53:09 -08:00
run: ./build.py -vr all
- name: Build debug
2024-01-29 01:53:09 -08:00
run: ./build.py -v all
- name: Stop gradle daemon
run: ./gradlew --stop
- name: Upload build artifact
2023-12-17 17:57:39 +08:00
uses: actions/upload-artifact@v4
with:
2020-12-25 15:54:47 -08:00
name: ${{ github.sha }}
path: out
2023-12-17 17:57:39 +08:00
compression-level: 9
- name: Upload mapping and native debug symbols
2023-12-17 17:57:39 +08:00
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}-symbols
path: app/build/outputs
2023-12-17 17:57:39 +08:00
compression-level: 9
2023-04-25 04:54:46 +08:00
2024-01-29 01:53:09 -08:00
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]
2024-01-29 01:53:09 -08:00
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
2023-05-10 00:10:19 -07:00
test:
2024-01-28 00:46:03 -08:00
name: Test on API ${{ matrix.api }}
2024-01-22 18:10:26 -08:00
runs-on: ubuntu-latest
2023-05-10 00:10:19 -07:00
needs: build
strategy:
fail-fast: false
matrix:
2024-01-28 00:46:03 -08:00
api: [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34]
2023-05-10 00:10:19 -07:00
steps:
- name: Check out
uses: actions/checkout@v4
2023-05-10 00:10:19 -07:00
with:
fetch-depth: 0
- name: Set up Python 3
2024-01-28 00:46:03 -08:00
uses: actions/setup-python@v5
2023-05-10 00:10:19 -07:00
with:
python-version: "3.x"
- name: Download build artifacts
2023-12-17 17:57:39 +08:00
uses: actions/download-artifact@v4
2023-05-10 00:10:19 -07:00
with:
name: ${{ github.sha }}
path: out
2024-01-22 18:10:26 -08:00
- name: Enable KVM group perms
2023-04-25 04:54:46 +08:00
run: |
2024-01-22 18:10:26 -08:00
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 }}