-
Notifications
You must be signed in to change notification settings - Fork 6
56 lines (52 loc) · 1.47 KB
/
build.yml
File metadata and controls
56 lines (52 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build Module
on:
push:
tags: [ "*" ]
branches: [ "main" ]
workflow_call:
workflow_dispatch:
jobs:
build-module:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Android SDK
uses: android-actions/setup-android@v3
with:
packages: ''
- name: Install toolchain
run: |
rustup default stable
rustup update stable
cargo install cargo-ndk
rustup target install aarch64-linux-android
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: my_lua_module
cache-targets: false
- name: Build Rust
run: |
cd my_lua_module
cargo ndk -t aarch64-linux-android -- build --release
- name: copy to output
run: |
mkdir -p $GITHUB_OUTPUT/build
cp my_lua_module/target/aarch64-linux-android/release/libhello.so $GITHUB_OUTPUT/build/
cp customize.sh $GITHUB_OUTPUT/build/
cp module.prop $GITHUB_OUTPUT/build/
cp mulua.lua $GITHUB_OUTPUT/build/
- name: zip output
run: |
cd $GITHUB_OUTPUT
zip -r build.zip $GITHUB_OUTPUT/build/
- name: Upload build artifact
uses: actions/upload-artifact@v5
with:
name: build-module-output
path: $GITHUB_OUTPUT/build.zip