update #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 build | |
| cp my_lua_module/target/aarch64-linux-android/release/libhello.so build/ | |
| cp customize.sh build/ | |
| cp module.prop build/ | |
| cp mulua.lua build/ | |
| - name: zip output | |
| run: | | |
| zip -r ../build.zip ./* | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: build-module-output | |
| path: build.zip |