wda-package.yml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. name: Building WebDriverAgent
  2. on:
  3. workflow_dispatch:
  4. workflow_run:
  5. workflows: ["Release"]
  6. types:
  7. - completed
  8. env:
  9. HOST: macos-12
  10. XCODE_VERSION: 14.2
  11. DESTINATION_SIM: platform=iOS Simulator,name=iPhone 14 Pro
  12. DESTINATION_SIM_tvOS: platform=tvOS Simulator,name=Apple TV
  13. jobs:
  14. host_machine:
  15. runs-on: ubuntu-latest
  16. outputs:
  17. host: ${{ steps.macos_host.outputs.host }}
  18. steps:
  19. - run: |
  20. echo "host=${{ env.HOST }}" >> $GITHUB_OUTPUT
  21. id: macos_host
  22. for_real_devices:
  23. needs: [host_machine]
  24. name: Build WDA for real iOS and tvOS devices
  25. runs-on: ${{ needs.host_machine.outputs.host }}
  26. env:
  27. ZIP_PKG_NAME_IOS: "WebDriverAgentRunner-Runner.zip"
  28. ZIP_PKG_NAME_TVOS: "WebDriverAgentRunner_tvOS-Runner.zip"
  29. steps:
  30. - name: Checkout
  31. uses: actions/checkout@v3
  32. - uses: maxim-lobanov/setup-xcode@v1
  33. with:
  34. xcode-version: "${{ env.XCODE_VERSION }}"
  35. - name: Create a zip file of WebDriverAgentRunner-Runner.app for iOS
  36. run: sh $GITHUB_WORKSPACE/Scripts/ci/build-real.sh
  37. env:
  38. DERIVED_DATA_PATH: appium_wda_ios
  39. SCHEME: WebDriverAgentRunner
  40. DESTINATION: generic/platform=iOS
  41. WD: appium_wda_ios/Build/Products/Debug-iphoneos
  42. ZIP_PKG_NAME: "${{ env.ZIP_PKG_NAME_IOS }}"
  43. - name: Create a zip file of WebDriverAgentRunner-Runner.app for tvOS
  44. run: sh $GITHUB_WORKSPACE/Scripts/ci/build-real.sh
  45. env:
  46. DERIVED_DATA_PATH: appium_wda_tvos
  47. SCHEME: WebDriverAgentRunner_tvOS
  48. DESTINATION: generic/platform=tvOS
  49. WD: appium_wda_tvos/Build/Products/Debug-appletvos
  50. ZIP_PKG_NAME: "${{ env.ZIP_PKG_NAME_TVOS }}"
  51. - name: Upload the built generic app package for iOS
  52. uses: actions/upload-artifact@v3.1.0
  53. with:
  54. path: "${{ env.ZIP_PKG_NAME_IOS }}"
  55. - name: Upload the built generic app package for tvOS
  56. uses: actions/upload-artifact@v3.1.0
  57. with:
  58. path: "${{ env.ZIP_PKG_NAME_TVOS }}"
  59. for_simulator_devices:
  60. needs: [host_machine]
  61. name: Build WDA for ${{ matrix.target }} simulators
  62. runs-on: ${{ needs.host_machine.outputs.host }}
  63. strategy:
  64. matrix:
  65. # '' is for iOS
  66. target: ['', '_tvOS']
  67. arch: [x86_64, arm64]
  68. steps:
  69. - name: Checkout
  70. uses: actions/checkout@v3
  71. - uses: maxim-lobanov/setup-xcode@v1
  72. with:
  73. xcode-version: "${{ env.XCODE_VERSION }}"
  74. - name: Create a zip of WebDriverAgentRunner${{ matrix.target }} for simulator for ${{ matrix.arch }}
  75. run: |
  76. DESTINATION=$DESTINATION_SIM${{ matrix.target }} sh $GITHUB_WORKSPACE/Scripts/ci/build-sim.sh
  77. env:
  78. TARGET: ${{ matrix.target }}
  79. SCHEME: WebDriverAgentRunner${{ matrix.target }}
  80. ARCHS: ${{ matrix.arch }}
  81. ZIP_PKG_NAME: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip"
  82. - name: Upload the built generic app package for WebDriverAgentRunner${{ matrix.target }} with ${{ matrix.arch }}
  83. uses: actions/upload-artifact@v3.1.0
  84. with:
  85. path: "WebDriverAgentRunner${{ matrix.target }}-Build-Sim-${{ matrix.arch }}.zip"