name: build on: [push, pull_request] env: MIN_SDK_VERSION: 21 jobs: build: runs-on: ubuntu-latest strategy: matrix: abi: ['armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'] steps: - uses: actions/checkout@v4 - 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: Rename output run: | mv libv4a_re.so libv4a_re_${{ matrix.abi }}.so - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: compiled-binaries 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 compiled libraries uses: actions/download-artifact@v3 with: name: compiled-binaries path: compiled/ # 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 compiled/libv4a_re_$abi.so module/common/files/ done # Zip the Magisk module - name: Zip 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