mirror of
https://github.com/AndroidAudioMods/ViPERFX_RE.git
synced 2024-12-23 06:57:25 +08:00
66 lines
1.7 KiB
YAML
66 lines
1.7 KiB
YAML
name: build
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
NDK_VERSION: 25.2.9519653
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Cache NDK
|
|
id: ndk-cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ndk
|
|
key: ndk-${{ env.NDK_VERSION }}
|
|
restore-keys: |
|
|
ndk-${{ env.NDK_VERSION }}
|
|
|
|
- name: Install NDK
|
|
if: steps.ndk-cache.outputs.cache-hit != 'true'
|
|
run: |
|
|
echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;${{ env.NDK_VERSION }}"
|
|
mv $ANDROID_HOME/ndk/${{ env.NDK_VERSION }} ndk
|
|
|
|
- name: Set NDK environment variable
|
|
run: echo "ANDROID_NDK_HOME=$(pwd)/ndk" >> $GITHUB_ENV
|
|
|
|
- name: Build with CMake for arm
|
|
run: |
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=armeabi-v7a .
|
|
cmake --build . -- -j$(nproc)
|
|
env:
|
|
BUILD_TYPE: 'arm'
|
|
|
|
- name: Rename and move output for arm
|
|
run: |
|
|
mv libv4a_re.so libv4a_re_arm.so
|
|
|
|
- name: Clean build
|
|
run: |
|
|
cmake --build . --target clean
|
|
|
|
- name: Build with CMake for arm64
|
|
run: |
|
|
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a .
|
|
cmake --build . -- -j$(nproc)
|
|
env:
|
|
BUILD_TYPE: 'arm64'
|
|
|
|
- name: Rename and move output for arm64
|
|
run: |
|
|
mv libv4a_re.so libv4a_re_arm64.so
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: compiled-binaries
|
|
path: |
|
|
libv4a_re_arm.so
|
|
libv4a_re_arm64.so
|