ci: common kernel build and embed ksud (#127)

This commit is contained in:
Ylarod
2023-01-28 12:24:43 +08:00
committed by GitHub
parent 0dae6ebaee
commit 905c041a76
10 changed files with 499 additions and 359 deletions

View File

@@ -1,10 +1,10 @@
name: Build KSUD
on:
workflow_call:
push:
branches: [ "main" ]
branches: [ "main", "ci" ]
paths:
- '.github/workflows/build-ksud.yml'
- '.github/workflows/ksud.yml'
- 'userspace/ksud/**'
pull_request:
branches: [ "main" ]
@@ -17,37 +17,6 @@ jobs:
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
uses: ./.github/workflows/ksud.yml
with:
target: ${{ matrix.target }}