ci: speed up build-ksud (#53)

This commit is contained in:
Ylarod 2023-01-13 18:47:31 +08:00 committed by GitHub
parent 3577b91a3c
commit 5bad1d0b53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,25 +11,36 @@ on:
- '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: Build arm64 ksud
- 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/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: Build ksud
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target aarch64-linux-android --release --manifest-path ./userspace/ksud/Cargo.toml
- name: Build x86_64 ksud
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target x86_64-linux-android --release --manifest-path ./userspace/ksud/Cargo.toml
- name: Upload ksud Artifact
args: --target ${{ matrix.target }} --release --manifest-path ./userspace/ksud/Cargo.toml
- name: Upload ksud artifact
uses: actions/upload-artifact@v3
with:
name: ksud
name: ksud-${{ matrix.target }}
path: ./userspace/ksud/target/**/release/ksud