Iscle b372155da2
Some checks failed
build / build (arm64-v8a) (push) Failing after 46s
build / build (armeabi-v7a) (push) Failing after 40s
build / build (x86) (push) Failing after 40s
build / build (x86_64) (push) Failing after 36s
build / package (push) Has been skipped
Allow manual workflow trigger
2025-04-06 15:49:32 +02:00

65 lines
1.7 KiB
YAML

name: build
on: [push, pull_request, workflow_dispatch]
env:
MIN_SDK_VERSION: 31
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
abi: ['armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64']
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Build with CMake
run: |
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=${{ matrix.abi }} -DANDROID_PLATFORM=android-${{ env.MIN_SDK_VERSION }} -DANDROID_ARM_NEON=true .
cmake --build . -- -j$(nproc)
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: libv4a_re_${{ matrix.abi }}
path: libv4a_re.so
package:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# Download the compiled binaries from the 'build' workflow
- name: Download artifacts
uses: actions/download-artifact@v4
# Prepare Magisk module directory by copying the necessary ABI files
- name: Prepare Magisk Module
run: |
for abi in armeabi-v7a arm64-v8a x86 x86_64; do
mkdir -p module/common/files
cp libv4a_re_$abi/libv4a_re.so module/common/files/libv4a_re_$abi.so
done
# Zip the Magisk module
- name: Package Magisk Module
run: |
cd module
zip -r ../magisk_module.zip ./
# Upload the zipped Magisk module as an artifact
- name: Upload Magisk Module
uses: actions/upload-artifact@v4
with:
name: V4A_Magisk_Module
path: module