1
1
name : Verify HybridApp build
2
2
3
3
on :
4
- workflow_call :
5
4
pull_request :
6
5
types : [opened, synchronize]
7
6
branches-ignore : [staging, production]
@@ -24,23 +23,35 @@ concurrency:
24
23
cancel-in-progress : true
25
24
26
25
jobs :
26
+ comment_on_fork :
27
+ name : Comment on all PRs that are forks
28
+ # Only run on pull requests that *are* a fork
29
+ if : ${{ github.event.pull_request.head.repo.fork }}
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - name : Comment on forks
33
+ run : |
34
+ gh pr comment ${{github.event.pull_request.html_url }} --body \
35
+ ":warning: This PR is possibly changing native code, it may cause problems with HybridApp. Please run an AdHoc build to verify that HybridApp will not break. :warning:"
36
+ env :
37
+ GITHUB_TOKEN : ${{ github.token }}
27
38
verify_android :
28
39
name : Verify Android HybridApp builds on main
29
40
runs-on : ubuntu-latest-xl
41
+ # Only run on pull requests that are *not* on a fork
42
+ if : ${{ !github.event.pull_request.head.repo.fork }}
30
43
steps :
31
44
- name : Checkout
32
45
uses : actions/checkout@v4
33
46
with :
34
47
submodules : true
35
48
ref : ${{ github.event.pull_request.head.sha }}
36
49
token : ${{ secrets.OS_BOTIFY_TOKEN }}
37
- # fetch-depth: 0 is required in order to fetch the correct submodule branch
38
- fetch-depth : 0
39
50
40
51
- name : Update submodule to match main
41
52
run : |
42
- git submodule update --init --remote
43
- git fetch
53
+ git submodule update --init --remote --depth 1
54
+ cd Mobile-Expensify
44
55
git checkout main
45
56
46
57
- name : Configure MapBox SDK
@@ -52,10 +63,14 @@ jobs:
52
63
with :
53
64
IS_HYBRID_BUILD : ' true'
54
65
66
+ - name : Setup Ruby
67
+
68
+ with :
69
+ bundler-cache : true
70
+
55
71
- name : Build Android Debug
56
- working-directory : Mobile-Expensify/Android
57
72
run : |
58
- if ! ./gradlew assembleDebug
73
+ if ! npm run android-hybrid-build
59
74
then
60
75
echo "❌ Android HybridApp failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve."
61
76
exit 1
@@ -64,20 +79,20 @@ jobs:
64
79
verify_ios :
65
80
name : Verify iOS HybridApp builds on main
66
81
runs-on : macos-15-xlarge
82
+ # Only run on pull requests that are *not* on a fork
83
+ if : ${{ !github.event.pull_request.head.repo.fork }}
67
84
steps :
68
85
- name : Checkout
69
86
uses : actions/checkout@v4
70
87
with :
71
88
submodules : true
72
89
ref : ${{ github.event.pull_request.head.sha }}
73
90
token : ${{ secrets.OS_BOTIFY_TOKEN }}
74
- # fetch-depth: 0 is required in order to fetch the correct submodule branch
75
- fetch-depth : 0
76
91
77
92
- name : Update submodule to match main
78
93
run : |
79
- git submodule update --init --remote
80
- git fetch
94
+ git submodule update --init --remote --depth 1
95
+ cd Mobile-Expensify
81
96
git checkout main
82
97
83
98
- name : Configure MapBox SDK
94
109
with :
95
110
bundler-cache : true
96
111
97
- - name : Install New Expensify Gems
98
- run : bundle install
99
-
100
112
- name : Cache Pod dependencies
101
113
uses : actions/cache@v4
102
114
id : pods-cache
@@ -125,16 +137,7 @@ jobs:
125
137
export RCT_NO_LAUNCH_PACKAGER=1
126
138
127
139
# Build iOS using xcodebuild
128
- if ! xcodebuild \
129
- -workspace Mobile-Expensify/iOS/Expensify.xcworkspace \
130
- -scheme Expensify \
131
- -configuration Debug \
132
- -sdk iphonesimulator \
133
- -arch x86_64 \
134
- CODE_SIGN_IDENTITY="" \
135
- CODE_SIGNING_REQUIRED=NO \
136
- CODE_SIGNING_ALLOWED=NO \
137
- build | xcpretty
140
+ if ! npm run ios-hybrid-build
138
141
then
139
142
echo "❌ iOS HybridApp failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve."
140
143
exit 1
0 commit comments