-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[No QA]Followups for HybridApp building on main test #55807
Changes from 20 commits
27a2851
463e3eb
53623ba
3e84a7d
b4e188c
e7a0759
13bbac4
d7bef9d
a75800d
fed9f59
88b5285
2a0726f
b136219
42ae684
08101e8
ae953f6
835194a
93175a2
4c0763d
47aad8d
0aee2cf
5c49011
70dac04
4b771fb
236fc8f
2336b9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
name: Verify HybridApp build | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches-ignore: [staging, production] | ||
|
@@ -18,29 +17,43 @@ on: | |
- 'android/AndroidManifest.xml' | ||
- 'ios/Podfile.lock' | ||
- 'ios/project.pbxproj' | ||
# TODO: Remove this line, just for debugging | ||
- '**.yml' | ||
|
||
concurrency: | ||
group: ${{ github.ref == 'refs/heads/main' && format('{0}-{1}', github.ref, github.sha) || github.ref }}-verify-main | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
comment_on_fork: | ||
name: Comment on all PRs that are forks | ||
# Only run on pull requests that *are* a fork | ||
if: ${{ github.event.pull_request.head.repo.fork }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Comment on forks | ||
run: | | ||
gh pr comment ${{github.event.pull_request.html_url }} --body \ | ||
":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:" | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
verify_android: | ||
name: Verify Android HybridApp builds on main | ||
runs-on: ubuntu-latest-xl | ||
# Only run on pull requests that are *not* on a fork | ||
if: ${{ !github.event.pull_request.head.repo.fork }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
token: ${{ secrets.OS_BOTIFY_TOKEN }} | ||
# fetch-depth: 0 is required in order to fetch the correct submodule branch | ||
fetch-depth: 0 | ||
|
||
- name: Update submodule to match main | ||
run: | | ||
git submodule update --init --remote | ||
git fetch | ||
git submodule update --init --remote --depth 1 | ||
cd Mobile-Expensify | ||
git checkout main | ||
|
||
- name: Configure MapBox SDK | ||
|
@@ -52,10 +65,17 @@ jobs: | |
with: | ||
IS_HYBRID_BUILD: 'true' | ||
|
||
- name: Setup Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Install New Expensify Gems | ||
run: bundle install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pretty sure that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice catch! Will remove |
||
|
||
- name: Build Android Debug | ||
working-directory: Mobile-Expensify/Android | ||
run: | | ||
if ! ./gradlew assembleDebug | ||
if ! npm run android-hybrid-build | ||
then | ||
echo "❌ Android HybridApp failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve." | ||
exit 1 | ||
|
@@ -64,20 +84,20 @@ jobs: | |
verify_ios: | ||
name: Verify iOS HybridApp builds on main | ||
runs-on: macos-15-xlarge | ||
# Only run on pull requests that are *not* on a fork | ||
if: ${{ !github.event.pull_request.head.repo.fork }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
token: ${{ secrets.OS_BOTIFY_TOKEN }} | ||
# fetch-depth: 0 is required in order to fetch the correct submodule branch | ||
fetch-depth: 0 | ||
|
||
- name: Update submodule to match main | ||
run: | | ||
git submodule update --init --remote | ||
git fetch | ||
git submodule update --init --remote --depth 1 | ||
cd Mobile-Expensify | ||
git checkout main | ||
|
||
- name: Configure MapBox SDK | ||
|
@@ -125,16 +145,7 @@ jobs: | |
export RCT_NO_LAUNCH_PACKAGER=1 | ||
|
||
# Build iOS using xcodebuild | ||
if ! xcodebuild \ | ||
-workspace Mobile-Expensify/iOS/Expensify.xcworkspace \ | ||
-scheme Expensify \ | ||
-configuration Debug \ | ||
-sdk iphonesimulator \ | ||
-arch x86_64 \ | ||
CODE_SIGN_IDENTITY="" \ | ||
CODE_SIGNING_REQUIRED=NO \ | ||
CODE_SIGNING_ALLOWED=NO \ | ||
build | xcpretty | ||
if ! npm run ios-hybrid-build | ||
then | ||
echo "❌ iOS HybridApp failed to build: Please reach out to Contributor+ and/or Expensify engineers for help in #expensify-open-source to resolve." | ||
exit 1 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,8 +120,7 @@ platform :android do | |
gradle( | ||
project_dir: 'Mobile-Expensify/Android', | ||
task: 'assemble', | ||
flavor: 'Production', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems fine, but I wonder if we can do an unsigned release build? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we can without keys |
||
build_type: 'Release', | ||
build_type: 'Debug', | ||
) | ||
setGradleOutputsInEnv() | ||
end | ||
|
@@ -458,7 +457,10 @@ platform :ios do | |
ENV["ENVFILE"]=".env.production" | ||
build_app( | ||
workspace: "./ios/NewExpensify.xcworkspace", | ||
scheme: "New Expensify" | ||
scheme: "New Expensify", | ||
configuration: "Debug", | ||
sdk: "iphonesimulator", | ||
skip_codesigning: true | ||
) | ||
setIOSBuildOutputsInEnv() | ||
end | ||
|
@@ -468,7 +470,11 @@ platform :ios do | |
ENV["ENVFILE"]="./Mobile-Expensify/.env.production.hybridapp.ios" | ||
build_app( | ||
workspace: "./Mobile-Expensify/iOS/Expensify.xcworkspace", | ||
scheme: "Expensify" | ||
scheme: "Expensify", | ||
configuration: "Debug", | ||
sdk: "iphonesimulator", | ||
skip_codesigning: true, | ||
export_method: "development" | ||
) | ||
setIOSBuildOutputsInEnv() | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still need to remove this, but will do so as the last commit before merge.