upd : split android wworkflow to actions #65
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Android | ||
| # on: [workflow_call, workflow_dispatch] | ||
| on: | ||
| push: | ||
| branches: | ||
| - ci-actions-android | ||
| jobs: | ||
| build_android: | ||
| timeout-minutes: 60 | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout nakama-cpp | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: nakama-cpp | ||
| submodules: false | ||
| - name: Checkout vcpkg submodule | ||
| run: | | ||
| git submodule update --init --filter=blob:none -- submodules/vcpkg | ||
| working-directory: nakama-cpp | ||
| - uses: ./nakama-cpp/.github/actions/setup-android | ||
| with: | ||
| ndk-version: 27.2.12479018 | ||
| cmake-version: 4.0.2 | ||
| - uses: ./nakama-cpp/.github/actions/setup-vcpkg-android | ||
| with: | ||
| vcpkg-path: nakama-cpp/submodules/vcpkg | ||
| - name : Build with Gradle | ||
| run : ./gradlew build --no-daemon | ||
| working-directory: nakama-cpp/android | ||
| - name: Upload artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: nakama-sdk-android-aar | ||
| path: nakama-cpp/android/nakama-sdk/build/outputs/aar/*.aar | ||
| if-no-files-found: error | ||
| # - name: Install NDK & CMake | ||
| # run: | | ||
| # # On GitHub ubuntu runners ANDROID_HOME is set as a shell env var. | ||
| # # sdkmanager is NOT on PATH, use the full path. | ||
| # "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" \ | ||
| # --sdk_root="$ANDROID_HOME" \ | ||
| # "ndk;27.2.12479018" \ | ||
| # "cmake;4.0.2" | ||
| # - name: Add CMake to PATH | ||
| # run: echo "$ANDROID_HOME/cmake/4.0.2/bin" >> "$GITHUB_PATH" | ||
| # - name: Set VCPKG_ROOT | ||
| # run: echo "VCPKG_ROOT=$GITHUB_WORKSPACE/nakama-cpp/submodules/vcpkg" >> $GITHUB_ENV | ||
| # - name: Bootstrap vcpkg | ||
| # run: ./bootstrap-vcpkg.sh -disableMetrics | ||
| # working-directory: nakama-cpp/submodules/vcpkg | ||