From 4744848ee42f4e8afeecbcc246da5571f26008cb Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 13 Oct 2022 22:46:21 +0800 Subject: [PATCH] Update android-ci.yml (#1334) * Update android-ci.yml --- .github/workflows/android-ci.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/android-ci.yml b/.github/workflows/android-ci.yml index e9bd2341..a5c543d2 100644 --- a/.github/workflows/android-ci.yml +++ b/.github/workflows/android-ci.yml @@ -22,21 +22,24 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: nttld/setup-ndk@v1 + id: setup-ndk with: - ndk-version: r21e - - name: Configure CMake + ndk-version: r23c + add-to-path: false + - run: echo ${{env.ANDROID_NDK_HOME}} + env: + ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} + + + # - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + # run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} - name: Build # Build your program with the given configuration - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{env.ANDROID_NDK_HOME}}/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23 + run: mkdir ${{github.workspace}}/build; cd ${{github.workspace}}/build; cmake .. -DCMAKE_TOOLCHAIN_FILE=${{env.ANDROID_NDK_HOME}}/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-23;make env: ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} - - name: Test - working-directory: ${{github.workspace}}/build - # Execute tests defined by the CMake configuration. - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail - run: ctest -C ${{env.BUILD_TYPE}}