android_windows.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. name: Android (Windows)
  2. on:
  3. pull_request:
  4. branches:
  5. - dev
  6. jobs:
  7. build:
  8. runs-on: windows-latest
  9. strategy:
  10. fail-fast: false
  11. matrix:
  12. arch: [armeabi-v7a, arm64-v8a]
  13. ndk: ["r22", "r27"]
  14. ndk_sdkver: ["30"]
  15. concurrency:
  16. group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Android-Windows-${{ matrix.arch }}-${{ matrix.ndk }}-${{ matrix.ndk_sdkver }}
  17. cancel-in-progress: true
  18. steps:
  19. - uses: actions/checkout@v1
  20. - uses: xmake-io/github-action-setup-xmake@v1
  21. with:
  22. xmake-version: branch@master
  23. - name: Configure Pagefile
  24. uses: al-cheb/[email protected]
  25. with:
  26. minimum-size: 8GB
  27. maximum-size: 32GB
  28. disk-root: "D:"
  29. - name: Prepare
  30. run: |
  31. if ("${{ matrix.ndk }}" -eq "r27") {
  32. curl -fsSL "https://dl.google.com/android/repository/android-ndk-r27-windows.zip" -o android-ndk-r27-windows.zip
  33. Expand-Archive ./android-ndk-r27-windows.zip -DestinationPath ./ndk
  34. } else {
  35. curl -fsSL "https://dl.google.com/android/repository/android-ndk-r22-windows-x86_64.zip" -o android-ndk-r22-windows-x86_64.zip
  36. Expand-Archive ./android-ndk-r22-windows-x86_64.zip -DestinationPath ./ndk
  37. }
  38. - name: Tests
  39. run: |
  40. git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b master xmakesrc
  41. cd xmakesrc/core
  42. xmake
  43. cd ../..
  44. Copy-Item ./xmakesrc/core/build/xmake.exe ./xmakesrc/xmake
  45. Copy-Item ./xmakesrc/scripts/xrepo.bat ./xmakesrc/xmake
  46. Copy-Item ./xmakesrc/scripts/xrepo.ps1 ./xmakesrc/xmake
  47. $Env:XMAKE_MAIN_REPO = "https://github.com/xmake-io/xmake-repo.git"
  48. $Env:XMAKE_PROGRAM_DIR = $(Resolve-Path ./xmakesrc/xmake)
  49. Set-Item -Path Env:Path -Value ($Env:XMAKE_PROGRAM_DIR + ";" + $Env:Path)
  50. xmake --version
  51. xmake l ./scripts/test.lua -D -p android --ndk=D:/a/xmake-repo/xmake-repo/ndk/android-ndk-${{ matrix.ndk }} --ndk_sdkver=${{ matrix.ndk_sdkver }} -a ${{ matrix.arch }}