android.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Android
  2. on:
  3. pull_request:
  4. branches:
  5. - dev
  6. jobs:
  7. build:
  8. strategy:
  9. fail-fast: false
  10. matrix:
  11. os: [ubuntu-latest]
  12. arch: [armeabi-v7a, arm64-v8a]
  13. ndk: ["r22", "r27"]
  14. ndk_sdkver: ["21", "30"]
  15. runs-on: ${{ matrix.os }}
  16. concurrency:
  17. group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Android-${{ matrix.arch }}-${{ matrix.ndk }}-${{ matrix.ndk_sdkver }}
  18. cancel-in-progress: true
  19. steps:
  20. - name: Cache ndk
  21. id: cache-ndk
  22. uses: actions/cache@v4
  23. with:
  24. path: ~/.xmake/packages/n/ndk
  25. key: ${{ matrix.os }}-ndk
  26. - uses: actions/checkout@v1
  27. - uses: xmake-io/github-action-setup-xmake@v1
  28. with:
  29. xmake-version: branch@master
  30. actions-cache-folder: ".xmake-cache"
  31. actions-cache-key: "android"
  32. - name: Set up system dependencies
  33. run: sudo apt-get update && sudo apt-get install -y gcc-multilib g++-multilib
  34. - name: Tests
  35. env:
  36. ANDROID_NDK_ROOT: ""
  37. ANDROID_NDK_HOME: ""
  38. run: |
  39. if test ${{ matrix.ndk }} = "r27"; then
  40. xrepo env -y -b "ndk 27" xmake l ./scripts/test.lua -D -p android -a ${{ matrix.arch }} --ndk_sdkver=${{ matrix.ndk_sdkver }}
  41. else
  42. xrepo env -y -b "ndk 22" xmake l ./scripts/test.lua -D -p android -a ${{ matrix.arch }} --ndk_sdkver=${{ matrix.ndk_sdkver }}
  43. fi