From f2d450065b99e8f4060b720bf80b5a87db2c072b Mon Sep 17 00:00:00 2001 From: Beatriz Navidad Vilches Date: Fri, 4 Aug 2023 08:41:55 +0000 Subject: [PATCH] Build android binaries --- .github/workflows/presubmit.yml | 60 +++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index ccc2e96b..a8dcbf41 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -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`