Skip to content

Commit

Permalink
Build android binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
Beanavil committed Aug 7, 2023
1 parent 419d95e commit f2d4500
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -703,3 +703,63 @@ jobs:
cd $GITHUB_WORKSPACE/build/downstream/pkgconfig &&
ctest -C Release --output-on-failure --parallel `sysctl -n hw.logicalcpu` &&
ctest -C Debug --output-on-failure --parallel `sysctl -n hw.logicalcpu`

android:
runs-on: ubuntu-latest
needs: format
strategy:
matrix:
ABI:
- arm64-v8a
- x86_64
API_LEVEL:
- android-19
- android-33
CONFIG:
- Debug
- Release
steps:
- name: Checkout OpenCL-ICD-Loader
uses: actions/checkout@v3

- name: Checkout OpenCL-Headers
uses: actions/checkout@v3
with:
repository: KhronosGroup/OpenCL-Headers
path: external/OpenCL-Headers

- name: Configure & install OpenCL-Headers
shell: bash
run: cmake
-G "Unix Makefiles"
-D CMAKE_BUILD_TYPE=${{matrix.CONFIG}}
-D CMAKE_C_FLAGS="-Wall -Wextra -pedantic -Werror"
-D CMAKE_C_EXTENSIONS=OFF
-D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/external/OpenCL-Headers/install
-D BUILD_TESTING=OFF
-S $GITHUB_WORKSPACE/external/OpenCL-Headers
-B $GITHUB_WORKSPACE/external/OpenCL-Headers/build &&
cmake
--build $GITHUB_WORKSPACE/external/OpenCL-Headers/build
--target install
--
-j`nproc`

- name: Configure
shell: bash
run: cmake
-G "Unix Makefiles"
-D BUILD_TESTING=ON
-D CMAKE_BUILD_TYPE=${{matrix.CONFIG}}
-D CMAKE_C_FLAGS="-Wall -Wextra -pedantic -Werror"
-D CMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake
-D ANDROID_ABI=${{matrix.ABI}}
-D ANDROID_PLATFORM=${{matrix.API_LEVEL}}
-D CMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY
-D CMAKE_FIND_ROOT_PATH=$GITHUB_WORKSPACE/external/OpenCL-Headers/install
-S $GITHUB_WORKSPACE
-B $GITHUB_WORKSPACE/build

- name: Build
shell: bash
run: cmake --build $GITHUB_WORKSPACE/build -j `nproc`

0 comments on commit f2d4500

Please sign in to comment.