8
8
- " hotfix-rc"
9
9
pull_request_target :
10
10
types : [opened, synchronize]
11
+ workflow_dispatch :
12
+ inputs :
13
+ xcode-version :
14
+ description : " Xcode version override - e.g. '15.2'"
15
+ type : string
16
+ simulator-name :
17
+ description : " Simulator name override - e.g. 'iPhone 16 Pro'"
18
+ type : string
19
+ simulator-version :
20
+ description : " Simulator iOS version override - e.g. '18.0.1'"
21
+ type : string
22
+ workflow_call :
23
+ inputs :
24
+ xcode-version :
25
+ description : " Xcode version override - e.g. '15.2'"
26
+ type : string
27
+ simulator-name :
28
+ description : " Simulator name override - e.g. 'iPhone 16 Pro'"
29
+ type : string
30
+ simulator-version :
31
+ description : " Simulator iOS version override - e.g. '18.0.1'"
32
+ type : string
11
33
12
34
env :
13
- DEVELOPER_DIR : /Applications/Xcode_15.4.app/Contents/Developer
35
+ COVERAGE_PATH : build/coverage.xml
14
36
MINT_LINK_PATH : .mint/bin
15
37
MINT_PATH : .mint/lib
16
- SIMULATOR_DESTINATION : platform=iOS Simulator,name=iPhone 15 Pro,OS=17.0.1
17
38
RESULT_BUNDLE_PATH : build/BitwardenTests.xcresult
18
- COVERAGE_PATH : build/coverage.xml
19
- XCODE_VERSION : 15.4
39
+ SIMULATOR_NAME : ${{ inputs.simulator-name || 'iPhone 15 Pro' }}
40
+ SIMULATOR_VERSION : ${{ inputs.simulator-version || '17.0.1' }}
41
+ XCODE_VERSION : ${{ inputs.xcode-version }}
20
42
21
43
jobs :
22
44
check-run :
@@ -33,15 +55,28 @@ jobs:
33
55
pull-requests : write
34
56
35
57
steps :
58
+ - name : Log inputs to job summary
59
+ run : |
60
+ echo "<details><summary>Build Workflow Inputs</summary>" >> $GITHUB_STEP_SUMMARY
61
+ echo "" >> $GITHUB_STEP_SUMMARY
62
+ echo '```json' >> $GITHUB_STEP_SUMMARY
63
+ echo '${{ toJson(inputs) }}' >> $GITHUB_STEP_SUMMARY
64
+ echo '```' >> $GITHUB_STEP_SUMMARY
65
+ echo "</details>" >> $GITHUB_STEP_SUMMARY
66
+
36
67
- name : Check out repo
37
68
uses : actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
38
69
with :
39
70
ref : ${{ github.event.pull_request.head.sha }}
40
71
72
+ - name : Read default Xcode version
73
+ run : |
74
+ echo "DEFAULT_XCODE_VERSION=$(cat .xcode-version | tr -d '\n')" >> "$GITHUB_ENV"
75
+
41
76
- name : Set Xcode version
42
77
uses : maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0
43
78
with :
44
- xcode-version : ${{ env.XCODE_VERSION }}
79
+ xcode-version : ${{ env.XCODE_VERSION || env.DEFAULT_XCODE_VERSION }}
45
80
46
81
- name : Configure Ruby
47
82
uses : ruby/setup-ruby@c04af2bb7258bb6a03df1d3c1865998ac9390972 # v1.194.0
82
117
-project Bitwarden.xcodeproj \
83
118
-scheme Bitwarden \
84
119
-configuration Debug \
85
- -destination "${{ env.SIMULATOR_DESTINATION }}" \
120
+ -destination "platform=iOS Simulator,name= ${{ env.SIMULATOR_NAME }},OS=${{ env.SIMULATOR_VERSION }}" \
86
121
-resultBundlePath ${{ env.RESULT_BUNDLE_PATH }} \
87
122
-derivedDataPath build/DerivedData \
88
123
| xcbeautify --renderer github-actions
0 commit comments