-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/allow-negative
- Loading branch information
Showing
285 changed files
with
6,137 additions
and
3,430 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
name: Build and profile Android apps | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
buildHybridAppAndroid: | ||
name: Build HybridApp Android | ||
runs-on: ubuntu-latest-xl | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
token: ${{ secrets.OS_BOTIFY_TOKEN }} | ||
|
||
- name: Update submodule to match main | ||
run: | | ||
git submodule update --init --remote | ||
cd Mobile-Expensify | ||
git fetch | ||
git checkout main | ||
- name: Configure MapBox SDK | ||
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }} | ||
|
||
- name: Setup Node | ||
id: setup-node | ||
uses: ./.github/actions/composite/setupNode | ||
with: | ||
IS_HYBRID_BUILD: 'true' | ||
|
||
- name: Run grunt build | ||
run: | | ||
cd Mobile-Expensify | ||
npm run grunt:build:shared | ||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'oracle' | ||
java-version: '17' | ||
|
||
- name: Setup Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Install New Expensify Gems | ||
run: bundle install | ||
|
||
- name: Install 1Password CLI | ||
uses: 1password/install-cli-action@v1 | ||
|
||
- name: Load files from 1Password | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | ||
run: | | ||
op document get --output ./upload-key.keystore upload-key.keystore | ||
op document get --output ./android-fastlane-json-key.json android-fastlane-json-key.json | ||
# Copy the keystore to the Android directory for Fullstory | ||
cp ./upload-key.keystore Mobile-Expensify/Android | ||
- name: Load Android upload keystore credentials from 1Password | ||
id: load-credentials | ||
uses: 1password/load-secrets-action@v2 | ||
with: | ||
export-env: false | ||
env: | ||
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | ||
ANDROID_UPLOAD_KEYSTORE_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_PASSWORD | ||
ANDROID_UPLOAD_KEYSTORE_ALIAS: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEYSTORE_ALIAS | ||
ANDROID_UPLOAD_KEY_PASSWORD: op://Mobile-Deploy-CI/Repository-Secrets/ANDROID_UPLOAD_KEY_PASSWORD | ||
|
||
- name: Build Android Release | ||
working-directory: Mobile-Expensify/Android | ||
run: | | ||
./gradlew --profile assembleRelease \ | ||
-Pandroid.injected.signing.store.file="./upload-key.keystore" \ | ||
-Pandroid.injected.signing.store.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_PASSWORD }} \ | ||
-Pandroid.injected.signing.key.alias=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEYSTORE_ALIAS }} \ | ||
-Pandroid.injected.signing.key.password=${{ steps.load-credentials.outputs.ANDROID_UPLOAD_KEY_PASSWORD }} | ||
echo "Printing Gradle profile report:" | ||
# Print the latest generated profile report | ||
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f) | ||
cat "$PROFILE_REPORT" | ||
buildStandaloneAndroid: | ||
name: Build Standalone Android | ||
runs-on: ubuntu-latest-xl | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.OS_BOTIFY_TOKEN }} | ||
|
||
- name: Configure MapBox SDK | ||
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }} | ||
|
||
- name: Setup Node | ||
id: setup-node | ||
uses: ./.github/actions/composite/setupNode | ||
with: | ||
IS_HYBRID_BUILD: 'false' | ||
|
||
- name: Decrypt keystore to sign the APK/AAB | ||
run: gpg --batch --yes --decrypt --passphrase="${{ secrets.LARGE_SECRET_PASSPHRASE }}" --output my-upload-key.keystore my-upload-key.keystore.gpg | ||
working-directory: android/app | ||
|
||
- name: Build Android Release | ||
working-directory: android | ||
env: | ||
MYAPP_UPLOAD_STORE_PASSWORD: ${{ secrets.MYAPP_UPLOAD_STORE_PASSWORD }} | ||
MYAPP_UPLOAD_KEY_PASSWORD: ${{ secrets.MYAPP_UPLOAD_KEY_PASSWORD }} | ||
run: | | ||
./gradlew --profile assembleProductionRelease | ||
echo "Printing Gradle profile report:" | ||
# Print the latest generated profile report | ||
PROFILE_REPORT=$(find build/reports/profile -maxdepth 1 -type f) | ||
cat "$PROFILE_REPORT" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,141 @@ | ||
name: Verify HybridApp build | ||
|
||
on: | ||
workflow_call: | ||
pull_request: | ||
types: [opened, synchronize] | ||
branches-ignore: [staging, production] | ||
paths: | ||
- '**.kt' | ||
- '**.java' | ||
- '**.swift' | ||
- '**.mm' | ||
- '**.h' | ||
- '**.cpp' | ||
- 'package.json' | ||
- 'patches/**' | ||
- 'android/build.gradle' | ||
- 'android/AndroidManifest.xml' | ||
- 'ios/Podfile.lock' | ||
- 'ios/project.pbxproj' | ||
|
||
concurrency: | ||
group: ${{ github.ref == 'refs/heads/main' && format('{0}-{1}', github.ref, github.sha) || github.ref }}-verify-main | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
verify_android: | ||
name: Verify Android HybridApp builds on main | ||
runs-on: ubuntu-latest-xl | ||
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 checkout main | ||
- name: Configure MapBox SDK | ||
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }} | ||
|
||
- name: Setup Node | ||
id: setup-node | ||
uses: ./.github/actions/composite/setupNode | ||
with: | ||
IS_HYBRID_BUILD: 'true' | ||
|
||
- name: Build Android Debug | ||
working-directory: Mobile-Expensify/Android | ||
run: | | ||
if ! ./gradlew assembleDebug | ||
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 | ||
fi | ||
verify_ios: | ||
name: Verify iOS HybridApp builds on main | ||
runs-on: macos-15-xlarge | ||
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 checkout main | ||
- name: Configure MapBox SDK | ||
run: ./scripts/setup-mapbox-sdk.sh ${{ secrets.MAPBOX_SDK_DOWNLOAD_TOKEN }} | ||
|
||
- name: Setup Node | ||
id: setup-node | ||
uses: ./.github/actions/composite/setupNode | ||
with: | ||
IS_HYBRID_BUILD: 'true' | ||
|
||
- name: Setup Ruby | ||
uses: ruby/[email protected] | ||
with: | ||
bundler-cache: true | ||
|
||
- name: Install New Expensify Gems | ||
run: bundle install | ||
|
||
- name: Cache Pod dependencies | ||
uses: actions/cache@v4 | ||
id: pods-cache | ||
with: | ||
path: Mobile-Expensify/iOS/Pods | ||
key: ${{ runner.os }}-pods-cache-${{ hashFiles('Mobile-Expensify/iOS/Podfile.lock', 'firebase.json') }} | ||
|
||
- name: Compare Podfile.lock and Manifest.lock | ||
id: compare-podfile-and-manifest | ||
run: echo "IS_PODFILE_SAME_AS_MANIFEST=${{ hashFiles('Mobile-Expensify/iOS/Podfile.lock') == hashFiles('Mobile-Expensify/iOS/Manifest.lock') }}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Install cocoapods | ||
uses: nick-fields/retry@3f757583fb1b1f940bc8ef4bf4734c8dc02a5847 | ||
if: steps.pods-cache.outputs.cache-hit != 'true' || steps.compare-podfile-and-manifest.outputs.IS_PODFILE_SAME_AS_MANIFEST != 'true' || steps.setup-node.outputs.cache-hit != 'true' | ||
with: | ||
timeout_minutes: 10 | ||
max_attempts: 5 | ||
command: npm run pod-install | ||
|
||
- name: Build iOS HybridApp | ||
run: | | ||
# Let us know if the builds fails | ||
set -o pipefail | ||
# Do not start metro | ||
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 | ||
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 | ||
fi |
Submodule Mobile-Expensify
updated
from e84274 to d7deab
Oops, something went wrong.