From 30e6999082db2ed11e9878904331bbccc0e3bf73 Mon Sep 17 00:00:00 2001 From: 3DJ <71472458+ThreeDeeJay@users.noreply.github.com> Date: Sat, 3 Aug 2024 16:14:04 -0400 Subject: [PATCH] Build for Android (32 and 64-bit) and upload as workflow artifacts (#1025) * Build for Android (32 and 64-bit) and upload as workflow artifacts * Remove unneeded build packages for Android build * Replace NDK absolute path with variable + relative path --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a776bb1bfc..3a4e5a7d07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,7 +106,24 @@ jobs: libdbus-1-dev", build_type: "Release" } - + - { + name: "Android_armeabi-v7a-Release", + os: ubuntu-latest, + cmake_opts: "-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ + -DALSOFT_EMBED_HRTF_DATA=TRUE \ + -DALSOFT_REQUIRE_OPENSL=ON", + build_type: "Release" + } + - { + name: "Android_arm64-v8a-Release", + os: ubuntu-latest, + cmake_opts: "-DANDRIOD_ABI=arm64-v8a \ + -DANDROID_PLATFORM=25 \ + -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake \ + -DALSOFT_EMBED_HRTF_DATA=TRUE \ + -DALSOFT_REQUIRE_OPENSL=ON", + build_type: "Release" + } steps: - uses: actions/checkout@v4 @@ -133,8 +150,8 @@ jobs: cd build ctest - - name: Create Archive - if: ${{ matrix.config.os == 'windows-latest' }} + - name: Set up Windows artifacts + if: ${{ contains(matrix.config.name, 'Win') }} shell: bash run: | cd build @@ -143,10 +160,17 @@ jobs: cp ${{matrix.config.build_type}}/soft_oal.dll archive cp ${{matrix.config.build_type}}/OpenAL32.dll archive/router - - name: Upload Archive - # Upload package as an artifact of this workflow. + - name: Set up Android artifacts + if: ${{ contains(matrix.config.name, 'Android') }} + shell: bash + run: | + cd build + mkdir archive + cp ${{github.workspace}}/build/libopenal.so archive/ + + - name: Upload build as a workflow artifact uses: actions/upload-artifact@v4 - if: ${{ matrix.config.os == 'windows-latest' }} + if: ${{ contains(matrix.config.name, 'Win') || contains(matrix.config.name, 'Android') }} with: name: soft_oal-${{matrix.config.name}} path: build/archive