Files
SukiSU-Ultra/.github/workflows/build-ksud.yml
Ylarod a748bed807 ci: opt manager (#55)
* ci: opt manager

* lint: don't check release build
2023-01-13 21:06:55 +08:00

54 lines
1.5 KiB
YAML

name: Build KSUD
on:
workflow_call:
push:
branches: [ "main" ]
paths:
- '.github/workflows/build-ksud.yml'
- 'userspace/ksud/**'
pull_request:
branches: [ "main" ]
paths:
- 'userspace/ksud/**'
jobs:
build:
strategy:
matrix:
include:
- target: aarch64-linux-android
- target: x86_64-linux-android
name: Build KSUD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Set up ksud build cache
uses: actions/cache@v3
continue-on-error: false
with:
path: ./userspace/ksud/target/
key: ${{ runner.os }}-ksud-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.target }}
restore-keys: ${{ runner.os }}-ksud-
- name: Build ksud
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target ${{ matrix.target }} --release --manifest-path ./userspace/ksud/Cargo.toml
- name: Upload ksud artifact
uses: actions/upload-artifact@v3
with:
name: ksud-${{ matrix.target }}
path: ./userspace/ksud/target/**/release/ksud