Skip to content

Commit

Permalink
Build for Android (32 and 64-bit) and upload as workflow artifacts (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
ThreeDeeJay authored Aug 3, 2024
1 parent 9e799a1 commit 30e6999
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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

1 comment on commit 30e6999

@Maxkatsur
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good!

Please sign in to comment.