206 lines
5.1 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/**"
- "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
2024-08-14 00:21:45 -07:00
runs-on: macos-14
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"
2024-01-29 01:53:09 -08:00
- name: Setup environment
uses: ./.github/actions/setup
with:
is-asset-build: true
- 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
2024-07-07 23:06:39 +08:00
path: app/apk/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 }}
strategy:
fail-fast: false
matrix:
2024-08-14 00:21:45 -07:00
os: [windows-latest, ubuntu-latest]
2024-01-29 01:53:09 -08:00
steps:
- name: Check out
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Setup environment
uses: ./.github/actions/setup
2024-08-14 00:21:45 -07:00
- name: Test build
run: python build.py -v -c .github/ci.prop all
2024-01-29 01:53:09 -08:00
- name: Stop gradle daemon
run: ./gradlew --stop
2024-07-20 03:10:18 -07:00
avd-test:
2024-07-22 03:39:04 -07:00
name: Test API ${{ matrix.version }} (x86_64)
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-12-02 15:13:29 -08:00
version: [23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35]
2024-06-20 18:28:58 -07:00
type: [""]
include:
- version: "35"
type: "google_apis_ps16k"
2024-12-02 15:13:29 -08:00
- version: "Baklava"
2024-06-20 18:28:58 -07:00
type: "google_apis"
2023-05-10 00:10:19 -07:00
steps:
- name: Check out
uses: actions/checkout@v4
2023-05-10 00:10:19 -07:00
- 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
2024-07-22 03:39:04 -07:00
- name: Run AVD test
2024-07-12 11:39:11 -07:00
timeout-minutes: 10
2024-06-21 02:45:48 -07:00
env:
2024-07-25 03:48:13 -07:00
AVD_TEST_LOG: 1
2024-06-20 18:28:58 -07:00
run: scripts/avd_test.sh ${{ matrix.version }} ${{ matrix.type }}
2024-04-10 02:56:23 -07:00
2024-07-25 03:48:13 -07:00
- name: Upload logs on error
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: "avd-logs-${{ matrix.version }}"
path: |
kernel.log
logcat.log
2024-07-20 03:10:18 -07:00
avd-test-32:
2024-07-22 03:39:04 -07:00
name: Test API ${{ matrix.version }} (x86)
2024-04-10 02:56:23 -07:00
runs-on: ubuntu-latest
needs: build
strategy:
fail-fast: false
matrix:
2024-06-20 18:28:58 -07:00
version: [23, 24, 25, 26, 27, 28, 29, 30]
2024-04-10 02:56:23 -07:00
steps:
- name: Check out
uses: actions/checkout@v4
- 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
2024-07-22 03:39:04 -07:00
- name: Run AVD test
2024-07-12 11:39:11 -07:00
timeout-minutes: 10
2024-04-10 02:56:23 -07:00
env:
FORCE_32_BIT: 1
2024-07-25 03:48:13 -07:00
AVD_TEST_LOG: 1
2024-06-20 18:28:58 -07:00
run: scripts/avd_test.sh ${{ matrix.version }}
2024-07-20 03:10:18 -07:00
2024-07-25 03:48:13 -07:00
- name: Upload logs on error
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: "avd32-logs-${{ matrix.version }}"
path: |
kernel.log
logcat.log
2024-07-20 03:10:18 -07:00
cf_test:
2024-08-15 22:51:40 -07:00
name: Test ${{ matrix.device }}
2024-07-20 03:10:18 -07:00
runs-on: ubuntu-24.04
2024-07-22 03:39:04 -07:00
needs: build
2024-07-20 03:10:18 -07:00
env:
2024-07-22 03:39:04 -07:00
CF_HOME: /home/runner/aosp_cf_phone
2024-07-20 03:10:18 -07:00
strategy:
fail-fast: false
2024-07-22 03:39:04 -07:00
matrix:
include:
- branch: "aosp-main"
2024-08-15 22:51:40 -07:00
device: "aosp_cf_x86_64_phone"
2024-07-20 03:10:18 -07:00
steps:
- name: Check out
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: ${{ github.sha }}
path: out
2024-07-22 03:39:04 -07:00
- name: Setup Cuttlefish environment
run: |
scripts/cuttlefish.sh setup
2024-08-15 22:51:40 -07:00
scripts/cuttlefish.sh download ${{ matrix.branch }} ${{ matrix.device }}
2024-07-22 03:39:04 -07:00
2024-07-20 03:10:18 -07:00
- name: Run Cuttlefish test
2024-07-22 03:39:04 -07:00
timeout-minutes: 10
2024-07-20 03:10:18 -07:00
run: su $USER -c 'scripts/cuttlefish.sh test'
- name: Upload logs on error
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
2024-08-15 22:51:40 -07:00
name: "cvd-logs-${{ matrix.device }}"
2024-07-20 03:10:18 -07:00
path: |
2024-07-22 03:39:04 -07:00
/home/runner/aosp_cf_phone/cuttlefish/instances/cvd-1/logs
/home/runner/aosp_cf_phone/cuttlefish/instances/cvd-1/cuttlefish_config.json