ci: speed up build-ksud (#53)
This commit is contained in:
31
.github/workflows/build-ksud.yml
vendored
31
.github/workflows/build-ksud.yml
vendored
@@ -11,25 +11,36 @@ on:
|
|||||||
- 'userspace/ksud/**'
|
- 'userspace/ksud/**'
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- target: aarch64-linux-android
|
||||||
|
- target: x86_64-linux-android
|
||||||
name: Build KSUD
|
name: Build KSUD
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- 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
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
use-cross: true
|
use-cross: true
|
||||||
command: build
|
command: build
|
||||||
args: --target aarch64-linux-android --release --manifest-path ./userspace/ksud/Cargo.toml
|
args: --target ${{ matrix.target }} --release --manifest-path ./userspace/ksud/Cargo.toml
|
||||||
- name: Build x86_64 ksud
|
- name: Upload ksud artifact
|
||||||
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
|
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ksud
|
name: ksud-${{ matrix.target }}
|
||||||
path: ./userspace/ksud/target/**/release/ksud
|
path: ./userspace/ksud/target/**/release/ksud
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user