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