From a75fa8b07dfe23177335ebdaf9d90075d26a468b Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 9 Jul 2025 15:35:25 -0500 Subject: [PATCH 01/77] e2e-env-action --- .github/actions/setup-e2e-env/action.yml | 108 +++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 .github/actions/setup-e2e-env/action.yml diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml new file mode 100644 index 00000000..ada83594 --- /dev/null +++ b/.github/actions/setup-e2e-env/action.yml @@ -0,0 +1,108 @@ +name: 'Setup E2E Test Environment' +description: 'Sets up the environment for running E2E tests' +inputs: + platform: + description: 'Platform (ios or android)' + required: true + node-version: + description: 'Node.js version' + required: false + default: '20.18.0' + setup-simulator: + description: 'Whether to setup simulator/emulator' + required: false + default: 'false' + # See https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators + ios-simulator-device: + description: Name of iOS simulator device to boot (e.g., "iPhone 15") + required: false + default: "iPhone 15" + cache-prefix: + description: 'Cache key prefix' + required: false + default: 'e2e' + ruby-version: + description: Ruby version to use (only for iOS) + required: false + default: "3.1" + xcode-version: + description: Xcode version to select (e.g., 16.0) + required: false + default: "15.0" + + +runs: + using: "composite" + steps: + +## Common Setup ## + - run: echo "Setup E2E Environment started" + shell: bash + + - name: Install Yarn + run: corepack enable && corepack prepare yarn@stable --activate + shell: bash + + - name: Install Detox CLI + run: yarn global add detox-cli + shell: bash + + - name: Install Foundry + run: curl -L https://foundry.paradigm.xyz | bash && ~/.foundry/bin/foundryup + shell: bash + +## IOS Setup ## + - name: Setup Ruby + if: ${{ inputs.platform == 'ios' }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ inputs.ruby-version }} + + - name: Select Xcode version + if: ${{ inputs.platform == 'ios' }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app + shell: bash + + - name: Install CocoaPods + if: ${{ inputs.platform == 'ios' }} + run: sudo gem install cocoapods + shell: bash + + - name: Install applesimutils + if: ${{ inputs.platform == 'ios' }} + run: brew tap wix/brew && brew install applesimutils + shell: bash + + - name: Boot iOS Simulator (if not already booted) + if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} + run: | + echo "Looking for simulator named: ${{ inputs.ios-simulator-device }}" + + SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-simulator-device }}") + if [ -z "$SIMULATOR_LINE" ]; then + echo "No simulator found with name '${{ inputs.ios-simulator-device }}'" + exit 1 + fi + + SIMULATOR_ID=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $2}') + SIMULATOR_STATE=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $NF}') + + echo "Simulator ID: $SIMULATOR_ID" + echo "Simulator State: $SIMULATOR_STATE" + + if [ "$SIMULATOR_STATE" = "Booted" ]; then + echo "Simulator is already booted. Skipping boot step." + else + echo "Booting simulator..." + xcrun simctl boot "$SIMULATOR_ID" + fi + shell: bash + + + + + + + + + From ab67becfb6159db204cb73d4647ca291c597137d Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 9 Jul 2025 16:07:53 -0500 Subject: [PATCH 02/77] add more deps --- .github/actions/setup-e2e-env/action.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index ada83594..5a1f7a2b 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -17,6 +17,10 @@ inputs: description: Name of iOS simulator device to boot (e.g., "iPhone 15") required: false default: "iPhone 15" + bundler-version: + description: 'Bundler version to use (only for iOS)' + required: false + default: '2.5.8' cache-prefix: description: 'Cache key prefix' required: false @@ -54,18 +58,30 @@ runs: ## IOS Setup ## - name: Setup Ruby if: ${{ inputs.platform == 'ios' }} - uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@e851ebd3adcc861aa9e9763c26a9025811f77cd9 # ( v1.245.0 ) with: ruby-version: ${{ inputs.ruby-version }} + - name: Install bundler + if: ${{ inputs.platform == 'ios' }} + run: gem install bundler -v ${{ inputs.bundler-version }} + shell: bash + - name: Select Xcode version if: ${{ inputs.platform == 'ios' }} run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app shell: bash - - name: Install CocoaPods + - name: Install Ruby gems via bundler if: ${{ inputs.platform == 'ios' }} - run: sudo gem install cocoapods + run: bundle install + working-directory: ios + shell: bash + + - name: Install CocoaPods via bundler + if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} + run: bundle exec pod install + working-directory: ios shell: bash - name: Install applesimutils From 22a7b88557bef52b446f28c48d450e026a30b49b Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Wed, 9 Jul 2025 16:17:34 -0500 Subject: [PATCH 03/77] fix cursor bug --- .github/actions/setup-e2e-env/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 5a1f7a2b..82ec8dd2 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -92,16 +92,16 @@ runs: - name: Boot iOS Simulator (if not already booted) if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: | - echo "Looking for simulator named: ${{ inputs.ios-simulator-device }}" + echo "Looking for simulator named: ${{ inputs.ios-device }}" - SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-simulator-device }}") + SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-device }}") if [ -z "$SIMULATOR_LINE" ]; then - echo "No simulator found with name '${{ inputs.ios-simulator-device }}'" + echo "No simulator found with name '${{ inputs.ios-device }}'" exit 1 fi SIMULATOR_ID=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $2}') - SIMULATOR_STATE=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $NF}') + SIMULATOR_STATE=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $(NF-1)}') echo "Simulator ID: $SIMULATOR_ID" echo "Simulator State: $SIMULATOR_STATE" @@ -117,6 +117,7 @@ runs: + From 610d928d5d9430ae38720c05f8079f7c12e89d5e Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 09:47:56 -0500 Subject: [PATCH 04/77] new action shas --- .github/actions/setup-e2e-env/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 82ec8dd2..6e49ba71 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -58,7 +58,7 @@ runs: ## IOS Setup ## - name: Setup Ruby if: ${{ inputs.platform == 'ios' }} - uses: ruby/setup-ruby@e851ebd3adcc861aa9e9763c26a9025811f77cd9 # ( v1.245.0 ) + uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 with: ruby-version: ${{ inputs.ruby-version }} @@ -114,6 +114,11 @@ runs: fi shell: bash +## Android Setup + - name: Setup Java + if: ${{ inputs.platform == 'android' }} + uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 + From 6ebb0f3ecfb6ad5486b8d20982088f7b1231ee01 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 10:16:18 -0500 Subject: [PATCH 05/77] yarn install --- .github/actions/setup-e2e-env/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 6e49ba71..98445e72 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -62,6 +62,11 @@ runs: with: ruby-version: ${{ inputs.ruby-version }} + - name: Install JavaScript dependencies + if: ${{ inputs.platform == 'ios' }} + run: yarn install --frozen-lockfile + shell: bash + - name: Install bundler if: ${{ inputs.platform == 'ios' }} run: gem install bundler -v ${{ inputs.bundler-version }} From f6e583de84731fd259a2641cd13a0935bd54f9b8 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 17:52:31 -0500 Subject: [PATCH 06/77] yarn cache --- .github/actions/setup-e2e-env/action.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 98445e72..bad52702 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -43,10 +43,28 @@ runs: - run: echo "Setup E2E Environment started" shell: bash +## Yarn Setup & Cache Management + - name: Install Yarn run: corepack enable && corepack prepare yarn@stable --activate shell: bash + - name: Restore Yarn cache + uses: actions/cache@8d5c5ea20e39b25cfe73e20a7e3cc8232c7a80e8 + with: + path: | + **/node_modules + key: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}- + + # Step 3: Install JS deps (fast if node_modules is cached) + - name: Install JavaScript dependencies + if: ${{ inputs.platform == 'ios' }} + run: yarn install --frozen-lockfile + shell: bash + + - name: Install Detox CLI run: yarn global add detox-cli shell: bash From e4322a44ca0694b24fe0f77141867ca1a77444ba Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 17:59:36 -0500 Subject: [PATCH 07/77] cache act --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index bad52702..5b222cd8 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -50,7 +50,7 @@ runs: shell: bash - name: Restore Yarn cache - uses: actions/cache@8d5c5ea20e39b25cfe73e20a7e3cc8232c7a80e8 + uses: actions/cache@v4 with: path: | **/node_modules From 4a813306947ff1181bf014d6de7fd1101c9eac98 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 18:08:29 -0500 Subject: [PATCH 08/77] fix sim device --- .github/actions/setup-e2e-env/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 5b222cd8..81b969d5 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -115,11 +115,11 @@ runs: - name: Boot iOS Simulator (if not already booted) if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: | - echo "Looking for simulator named: ${{ inputs.ios-device }}" + echo "Looking for simulator named: ${{ inputs.ios-simulator-device }}" - SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-device }}") + SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-simulator-device }}") if [ -z "$SIMULATOR_LINE" ]; then - echo "No simulator found with name '${{ inputs.ios-device }}'" + echo "No simulator found with name '${{ inputs.ios-simulator-device }}'" exit 1 fi From bc2f52fdd495127caf7ffbe5a68936cf3e54ca49 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 18:58:05 -0500 Subject: [PATCH 09/77] bundler-cache --- .github/actions/setup-e2e-env/action.yml | 38 ++++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 81b969d5..59acff55 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -8,6 +8,10 @@ inputs: description: 'Node.js version' required: false default: '20.18.0' + yarn-version: + description: Yarn version to use with Corepack + required: false + default: '1.22.22' setup-simulator: description: 'Whether to setup simulator/emulator' required: false @@ -46,25 +50,24 @@ runs: ## Yarn Setup & Cache Management - name: Install Yarn - run: corepack enable && corepack prepare yarn@stable --activate + run: corepack enable && corepack prepare yarn@${{ inputs.yarn-version }} --activate shell: bash + - name: Restore Yarn cache uses: actions/cache@v4 with: path: | - **/node_modules + node_modules key: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} restore-keys: | ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}- - # Step 3: Install JS deps (fast if node_modules is cached) - name: Install JavaScript dependencies if: ${{ inputs.platform == 'ios' }} run: yarn install --frozen-lockfile shell: bash - - name: Install Detox CLI run: yarn global add detox-cli shell: bash @@ -74,33 +77,42 @@ runs: shell: bash ## IOS Setup ## + +## Ruby Setup & Cache Management - name: Setup Ruby if: ${{ inputs.platform == 'ios' }} uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 with: ruby-version: ${{ inputs.ruby-version }} - - name: Install JavaScript dependencies - if: ${{ inputs.platform == 'ios' }} - run: yarn install --frozen-lockfile - shell: bash - + # Install Bundler first - name: Install bundler if: ${{ inputs.platform == 'ios' }} run: gem install bundler -v ${{ inputs.bundler-version }} shell: bash - - name: Select Xcode version + # Restore cached Ruby gems + - name: Restore Bundler cache if: ${{ inputs.platform == 'ios' }} - run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app - shell: bash + uses: actions/cache@v4 + with: + path: ios/vendor/bundle + key: ${{ inputs.cache-prefix }}-bundler-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('ios/Gemfile.lock') }} + restore-keys: | + ${{ inputs.cache-prefix }}-bundler-${{ inputs.platform }}-${{ runner.os }}- + # Install Ruby gems into ios/vendor/bundle ( cache management & awareness ) - name: Install Ruby gems via bundler if: ${{ inputs.platform == 'ios' }} - run: bundle install + run: bundle install --path=vendor/bundle working-directory: ios shell: bash + - name: Select Xcode version + if: ${{ inputs.platform == 'ios' }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app + shell: bash + - name: Install CocoaPods via bundler if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: bundle exec pod install From 27eed964de1fd8c92ec390ebefc066dcaba023a8 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 19:19:30 -0500 Subject: [PATCH 10/77] try yarn.lock perf fix --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 59acff55..2ce06385 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -59,7 +59,7 @@ runs: with: path: | node_modules - key: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} + key: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}- From c9e4d1eb0e1a630593019770b7a44b25c2d4894e Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 19:37:01 -0500 Subject: [PATCH 11/77] cocoapods caching --- .github/actions/setup-e2e-env/action.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2ce06385..8ac54c84 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -101,10 +101,17 @@ runs: restore-keys: | ${{ inputs.cache-prefix }}-bundler-${{ inputs.platform }}-${{ runner.os }}- + # Configure bundler to use a specific path for gem installation + - name: Configure bundler install path + if: ${{ inputs.platform == 'ios' }} + run: bundle config set path 'vendor/bundle' + working-directory: ios + shell: bash + # Install Ruby gems into ios/vendor/bundle ( cache management & awareness ) - name: Install Ruby gems via bundler if: ${{ inputs.platform == 'ios' }} - run: bundle install --path=vendor/bundle + run: bundle install working-directory: ios shell: bash @@ -113,6 +120,16 @@ runs: run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app shell: bash + - name: Restore CocoaPods cache + if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} + uses: actions/cache@v4 + with: + path: ios/Pods + key: ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('ios/Podfile.lock') }} + restore-keys: | + ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}- + + - name: Install CocoaPods via bundler if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: bundle exec pod install From f5c4f53ed10a375ab8e1334d51315bacfeb3c722 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:13:06 -0500 Subject: [PATCH 12/77] android tuning --- .github/actions/setup-e2e-env/action.yml | 36 ++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8ac54c84..1e97f0d4 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -37,6 +37,18 @@ inputs: description: Xcode version to select (e.g., 16.0) required: false default: "15.0" + jdk-version: + description: JDK version to use (only for Android) + required: false + default: "17" + jdk-distribution: + description: JDK distribution to use (only for Android) + required: false + default: "temurin" + ndk-version: + description: NDK version to use (only for Android) + required: false + default: "26.1.10909125" runs: @@ -167,9 +179,33 @@ runs: shell: bash ## Android Setup + +## JDK Setup - name: Setup Java if: ${{ inputs.platform == 'android' }} uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 + with: + java-version: ${{ inputs.jdk-version }} + distribution: ${{ inputs.jdk-distribution }} + +## Android SDK Setup + - name: Install Android SDK packages + if: ${{ inputs.platform == 'android' }} + run: | + yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses + + sdkmanager --install \ + "platform-tools" \ + "platforms;android-34" \ + "build-tools;34.0.0" \ + "emulator" \ + "system-images;android-34;google_apis;x86_64" + + sdkmanager --update + shell: bash + + + From 860c7d4ab2d3fee6422d4c4b840cd221c7f780c5 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:24:41 -0500 Subject: [PATCH 13/77] tuning --- .github/actions/setup-e2e-env/action.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 1e97f0d4..3fa4d7b5 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -204,6 +204,19 @@ runs: sdkmanager --update shell: bash + ## NDK Setup + - name: Install Android NDK + if: ${{ inputs.platform == 'android' }} + run: sdkmanager "ndk;${{ inputs.ndk-version }}" + shell: bash + + - name: Set ANDROID_NDK_HOME + if: ${{ inputs.platform == 'android' }} + run: echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> $GITHUB_ENV + shell: bash + + + From 4898cab6e0390b39dc1a1483eb27674153b4b30c Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:29:59 -0500 Subject: [PATCH 14/77] license-accepts --- .github/actions/setup-e2e-env/action.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 3fa4d7b5..ebf1f267 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -192,18 +192,22 @@ runs: - name: Install Android SDK packages if: ${{ inputs.platform == 'android' }} run: | - yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses + echo "Accepting SDK licenses..." + printf 'y\n%.0s' {1..10} | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses - sdkmanager --install \ + echo "Installing Android SDK components..." + "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install \ "platform-tools" \ "platforms;android-34" \ "build-tools;34.0.0" \ "emulator" \ "system-images;android-34;google_apis;x86_64" - sdkmanager --update + echo "Updating SDK packages..." + "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update shell: bash + ## NDK Setup - name: Install Android NDK if: ${{ inputs.platform == 'android' }} From 8b76ea875ce616c4d5d09e81cac421d090e1e201 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:38:14 -0500 Subject: [PATCH 15/77] foundry agnostic --- .github/actions/setup-e2e-env/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index ebf1f267..28b3ec17 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -85,8 +85,12 @@ runs: shell: bash - name: Install Foundry - run: curl -L https://foundry.paradigm.xyz | bash && ~/.foundry/bin/foundryup shell: bash + run: | + mkdir -p ~/.foundry + curl -L https://foundry.paradigm.xyz | bash + ~/.foundry/bin/foundryup --quiet + ## IOS Setup ## From f1008f72d4e3a0c550024c2f732faaf2b6ec8c8d Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:42:25 -0500 Subject: [PATCH 16/77] setup --- .github/actions/setup-e2e-env/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 28b3ec17..76eeb6e2 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -61,7 +61,8 @@ runs: ## Yarn Setup & Cache Management - - name: Install Yarn + - name: Corepack + id: corepack run: corepack enable && corepack prepare yarn@${{ inputs.yarn-version }} --activate shell: bash @@ -76,17 +77,21 @@ runs: ${{ inputs.cache-prefix }}-yarn-${{ inputs.platform }}-${{ runner.os }}- - name: Install JavaScript dependencies + id: yarn-install if: ${{ inputs.platform == 'ios' }} run: yarn install --frozen-lockfile shell: bash - name: Install Detox CLI + id: install-detox-cli run: yarn global add detox-cli shell: bash - name: Install Foundry + id: install-foundry shell: bash run: | + echo "Installing Foundry..." mkdir -p ~/.foundry curl -L https://foundry.paradigm.xyz | bash ~/.foundry/bin/foundryup --quiet From 9884d8a0a0655c88b7101c0dcd9c6e92021250b9 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:42:59 -0500 Subject: [PATCH 17/77] foundry ubuntu-mac-agnostic --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 76eeb6e2..45a40141 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -94,7 +94,7 @@ runs: echo "Installing Foundry..." mkdir -p ~/.foundry curl -L https://foundry.paradigm.xyz | bash - ~/.foundry/bin/foundryup --quiet + ~/.foundry/bin/foundryup ## IOS Setup ## From 682cafb34f6e6c4b6944bdc62767abddc44c5666 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 20:47:36 -0500 Subject: [PATCH 18/77] act --- .github/actions/setup-e2e-env/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 45a40141..291ba320 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -88,13 +88,14 @@ runs: shell: bash - name: Install Foundry - id: install-foundry shell: bash run: | echo "Installing Foundry..." - mkdir -p ~/.foundry - curl -L https://foundry.paradigm.xyz | bash - ~/.foundry/bin/foundryup + mkdir -p ~/.foundry/bin + curl -sL https://foundry.paradigm.xyz/foundryup -o ~/.foundry/bin/foundryup + chmod +x ~/.foundry/bin/foundryup + ~/.foundry/bin/foundryup --quiet + ## IOS Setup ## From 6a1ff9081d6c0d87c219a77491f5fb9ce510a17b Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:04:10 -0500 Subject: [PATCH 19/77] foundry --- .github/actions/setup-e2e-env/action.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 291ba320..2fd90762 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -49,6 +49,11 @@ inputs: description: NDK version to use (only for Android) required: false default: "26.1.10909125" + foundry-version: + description: Foundry version to install + required: false + default: "v1.2.3" + runs: @@ -90,11 +95,15 @@ runs: - name: Install Foundry shell: bash run: | - echo "Installing Foundry..." + echo "Installing Foundry version: ${{ inputs.foundry-version }}" + mkdir -p ~/.foundry/bin - curl -sL https://foundry.paradigm.xyz/foundryup -o ~/.foundry/bin/foundryup + + curl -sL "https://github.com/foundry-rs/foundry/releases/download/${{ inputs.foundry-version }}/foundryup" -o ~/.foundry/bin/foundryup chmod +x ~/.foundry/bin/foundryup - ~/.foundry/bin/foundryup --quiet + ~/.foundry/bin/foundryup --version ${{ inputs.foundry-version }} + echo "$HOME/.foundry/bin" >> $GITHUB_PATH + From 38bd065904851bcc93440b89f84424ecbe08ec8f Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:14:58 -0500 Subject: [PATCH 20/77] foundry android --- .github/actions/setup-e2e-env/action.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2fd90762..2bc15cfc 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -93,19 +93,15 @@ runs: shell: bash - name: Install Foundry + id: install-foundry shell: bash run: | echo "Installing Foundry version: ${{ inputs.foundry-version }}" - mkdir -p ~/.foundry/bin - - curl -sL "https://github.com/foundry-rs/foundry/releases/download/${{ inputs.foundry-version }}/foundryup" -o ~/.foundry/bin/foundryup + curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash chmod +x ~/.foundry/bin/foundryup - ~/.foundry/bin/foundryup --version ${{ inputs.foundry-version }} - echo "$HOME/.foundry/bin" >> $GITHUB_PATH - - - + foundryup --version ${{ inputs.foundry-version }} + echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" ## IOS Setup ## From 2f5e2a6bee7abb30e9260ad69d2f86e4148c75ff Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:17:12 -0500 Subject: [PATCH 21/77] remover chmod --- .github/actions/setup-e2e-env/action.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2bc15cfc..3082d055 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -99,7 +99,6 @@ runs: echo "Installing Foundry version: ${{ inputs.foundry-version }}" mkdir -p ~/.foundry/bin curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash - chmod +x ~/.foundry/bin/foundryup foundryup --version ${{ inputs.foundry-version }} echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" From a3ea5d4e557612a022702b37f377460799493ef2 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:20:02 -0500 Subject: [PATCH 22/77] act --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 3082d055..03bd4731 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -99,7 +99,7 @@ runs: echo "Installing Foundry version: ${{ inputs.foundry-version }}" mkdir -p ~/.foundry/bin curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash - foundryup --version ${{ inputs.foundry-version }} + ~/.foundry/foundryup --version ${{ inputs.foundry-version }} echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" ## IOS Setup ## From 8f3fdcbfd0e1dc5361cb7db40e74a191e676430f Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:21:36 -0500 Subject: [PATCH 23/77] act --- .github/actions/setup-e2e-env/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 03bd4731..de23ff60 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -96,9 +96,10 @@ runs: id: install-foundry shell: bash run: | - echo "Installing Foundry version: ${{ inputs.foundry-version }}" + echo "Downloading Foundry version: ${{ inputs.foundry-version }}" mkdir -p ~/.foundry/bin curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash + echo "Running Foundryup to install version: ${{ inputs.foundry-version }}" ~/.foundry/foundryup --version ${{ inputs.foundry-version }} echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" From c7d998722198af7fb61a983e039069b34ae43736 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:23:25 -0500 Subject: [PATCH 24/77] act --- .github/actions/setup-e2e-env/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index de23ff60..8b4ff152 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -100,7 +100,8 @@ runs: mkdir -p ~/.foundry/bin curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash echo "Running Foundryup to install version: ${{ inputs.foundry-version }}" - ~/.foundry/foundryup --version ${{ inputs.foundry-version }} + ls ~/.foundry/bin + ~/.foundry/bin/foundryup --version ${{ inputs.foundry-version }} echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" ## IOS Setup ## From 90d1bd2385bf4686df1c6572b4fb2c443cfc10d9 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:51:19 -0500 Subject: [PATCH 25/77] foundry --- .github/actions/setup-e2e-env/action.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8b4ff152..bc3d82ef 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -93,16 +93,14 @@ runs: shell: bash - name: Install Foundry - id: install-foundry shell: bash + id: install-foundry run: | - echo "Downloading Foundry version: ${{ inputs.foundry-version }}" - mkdir -p ~/.foundry/bin - curl -sL "https://raw.githubusercontent.com/foundry-rs/foundry/${{ inputs.foundry-version }}/foundryup/install" | bash - echo "Running Foundryup to install version: ${{ inputs.foundry-version }}" - ls ~/.foundry/bin - ~/.foundry/bin/foundryup --version ${{ inputs.foundry-version }} + echo "Installing Foundry via foundryup..." + curl -L https://foundry.paradigm.xyz | bash echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" + ~/.foundry/bin/foundryup + ## IOS Setup ## From bfd20d8fabe155b989ae570fab2e7d9561d4a482 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:53:21 -0500 Subject: [PATCH 26/77] act --- .github/actions/setup-e2e-env/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index bc3d82ef..e45b0944 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -94,14 +94,16 @@ runs: - name: Install Foundry shell: bash - id: install-foundry run: | echo "Installing Foundry via foundryup..." - curl -L https://foundry.paradigm.xyz | bash + mkdir -p ~/.foundry/bin + curl -sL https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o ~/.foundry/bin/foundryup + chmod +x ~/.foundry/bin/foundryup echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" ~/.foundry/bin/foundryup + ## IOS Setup ## ## Ruby Setup & Cache Management From 6d49bac79bf8c9045f7198490401cfb30d7b713f Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 21:56:05 -0500 Subject: [PATCH 27/77] cfgs --- .github/actions/setup-e2e-env/action.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index e45b0944..32143333 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -96,11 +96,19 @@ runs: shell: bash run: | echo "Installing Foundry via foundryup..." - mkdir -p ~/.foundry/bin - curl -sL https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o ~/.foundry/bin/foundryup - chmod +x ~/.foundry/bin/foundryup - echo "$HOME/.foundry/bin" >> "$GITHUB_PATH" - ~/.foundry/bin/foundryup + + export FOUNDRY_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/.foundry" + export FOUNDRY_BIN="$FOUNDRY_DIR/bin" + + mkdir -p "$FOUNDRY_BIN" + + curl -sL https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup -o "$FOUNDRY_BIN/foundryup" + chmod +x "$FOUNDRY_BIN/foundryup" + + echo "$FOUNDRY_BIN" >> "$GITHUB_PATH" + + "$FOUNDRY_BIN/foundryup" + From b2e0ef39049eabbb7da1db55a6471f8729aa01cb Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:05:12 -0500 Subject: [PATCH 28/77] ndk setup --- .github/actions/setup-e2e-env/action.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 32143333..8e835aa3 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -233,11 +233,20 @@ runs: ## NDK Setup + + - name: Ensure sdkmanager is available + run: | + yes | "${ANDROID_SDK_ROOT}/cmdline-tools/11.0/bin/sdkmanager" --licenses + shell: bash + + - name: Install Android NDK if: ${{ inputs.platform == 'android' }} - run: sdkmanager "ndk;${{ inputs.ndk-version }}" + run: | + "${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" shell: bash + - name: Set ANDROID_NDK_HOME if: ${{ inputs.platform == 'android' }} run: echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> $GITHUB_ENV From c35dbc6d431a589d3fe76debe2bdad973b2c249b Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:10:51 -0500 Subject: [PATCH 29/77] ndk --- .github/actions/setup-e2e-env/action.yml | 29 ++++++++++++++++++------ 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8e835aa3..5b75074c 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -234,22 +234,36 @@ runs: ## NDK Setup - - name: Ensure sdkmanager is available + - name: Debug Android SDK Paths + if: ${{ inputs.platform == 'android' }} run: | - yes | "${ANDROID_SDK_ROOT}/cmdline-tools/11.0/bin/sdkmanager" --licenses + echo "ANDROID_HOME: $ANDROID_HOME" + echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" + echo "Available sdkmanager paths:" + find "$ANDROID_HOME" -type f -name sdkmanager || true shell: bash - - - name: Install Android NDK + - name: Accept Android SDK Licenses if: ${{ inputs.platform == 'android' }} run: | - "${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" + yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses shell: bash + - name: Install Android SDK Packages + if: ${{ inputs.platform == 'android' }} + run: | + "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install \ + "platform-tools" \ + "platforms;android-34" \ + "build-tools;34.0.0" \ + "emulator" \ + "system-images;android-34;google_apis;x86_64" + shell: bash - - name: Set ANDROID_NDK_HOME + - name: Install Android NDK if: ${{ inputs.platform == 'android' }} - run: echo "ANDROID_NDK_HOME=$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> $GITHUB_ENV + run: | + "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" shell: bash @@ -261,6 +275,7 @@ runs: + From 9e75e069a72f7577eeda9f3fef0b6c7b8cbf4b41 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:13:35 -0500 Subject: [PATCH 30/77] ndk --- .github/actions/setup-e2e-env/action.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 5b75074c..8d002605 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -239,10 +239,15 @@ runs: run: | echo "ANDROID_HOME: $ANDROID_HOME" echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" - echo "Available sdkmanager paths:" - find "$ANDROID_HOME" -type f -name sdkmanager || true + + echo "Searching for sdkmanager under cmdline-tools..." + find "$ANDROID_HOME/cmdline-tools" -type f -name sdkmanager || echo "sdkmanager not found" + + echo "Listing directories under cmdline-tools for visibility:" + ls -R "$ANDROID_HOME/cmdline-tools" || echo "cmdline-tools directory missing" shell: bash + - name: Accept Android SDK Licenses if: ${{ inputs.platform == 'android' }} run: | From dda3178cdda79292980fcb9482a21add9150db2d Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:16:39 -0500 Subject: [PATCH 31/77] act --- .github/actions/setup-e2e-env/action.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8d002605..8bc3c4c2 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -248,12 +248,14 @@ runs: shell: bash - - name: Accept Android SDK Licenses + - name: Accept Android SDK licenses if: ${{ inputs.platform == 'android' }} run: | - yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses + echo "Accepting Android SDK licenses..." + printf 'y\n%.0s' {1..20} | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses shell: bash + - name: Install Android SDK Packages if: ${{ inputs.platform == 'android' }} run: | From 03cd24bd547349017f8c52e57066a6541e4fd963 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:23:01 -0500 Subject: [PATCH 32/77] licenses --- .github/actions/setup-e2e-env/action.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8bc3c4c2..7cd24dfe 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -239,12 +239,6 @@ runs: run: | echo "ANDROID_HOME: $ANDROID_HOME" echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" - - echo "Searching for sdkmanager under cmdline-tools..." - find "$ANDROID_HOME/cmdline-tools" -type f -name sdkmanager || echo "sdkmanager not found" - - echo "Listing directories under cmdline-tools for visibility:" - ls -R "$ANDROID_HOME/cmdline-tools" || echo "cmdline-tools directory missing" shell: bash @@ -252,10 +246,11 @@ runs: if: ${{ inputs.platform == 'android' }} run: | echo "Accepting Android SDK licenses..." - printf 'y\n%.0s' {1..20} | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --licenses + bash -c 'yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses' || true shell: bash + - name: Install Android SDK Packages if: ${{ inputs.platform == 'android' }} run: | From 4b4e46f9a2f03cc9fbddd5c81e3d7f16e20852dd Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:27:31 -0500 Subject: [PATCH 33/77] android tools --- .github/actions/setup-e2e-env/action.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 7cd24dfe..aaabaff6 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -250,7 +250,6 @@ runs: shell: bash - - name: Install Android SDK Packages if: ${{ inputs.platform == 'android' }} run: | @@ -268,6 +267,15 @@ runs: "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" "ndk;${{ inputs.ndk-version }}" shell: bash + - name: Add Android tools to PATH + if: ${{ inputs.platform == 'android' }} + run: | + echo "$ANDROID_HOME/platform-tools" >> "$GITHUB_PATH" + echo "$ANDROID_HOME/emulator" >> "$GITHUB_PATH" + echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH" + shell: bash + + From 02ff9a92b1b3367f704c6a96c8752be0b8e18abd Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:32:10 -0500 Subject: [PATCH 34/77] e2e --- .github/actions/setup-e2e-env/action.yml | 29 +++++++++++------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index aaabaff6..7b6af29d 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -213,6 +213,14 @@ runs: distribution: ${{ inputs.jdk-distribution }} ## Android SDK Setup + + - name: Install required emulator dependencies + if: ${{ inputs.platform == 'android' }} + run: | + sudo apt-get update + sudo apt-get install -y libpulse0 libglu1-mesa + shell: bash + - name: Install Android SDK packages if: ${{ inputs.platform == 'android' }} run: | @@ -275,19 +283,8 @@ runs: echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH" shell: bash - - - - - - - - - - - - - - - - + - name: Check Installed NDK Versions + run: | + echo "Installed NDKs:" + ls -la "$ANDROID_SDK_ROOT/ndk" || echo "No NDK installed" + shell: bash From 5695370448cf0490b14ad0aced71da33f5082d65 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:39:52 -0500 Subject: [PATCH 35/77] act --- .github/actions/setup-e2e-env/action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 7b6af29d..a3375836 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -283,6 +283,13 @@ runs: echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH" shell: bash + - name: Add NDK toolchain to PATH + if: ${{ inputs.platform == 'android' }} + run: | + NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" + echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" + shell : bash + - name: Check Installed NDK Versions run: | echo "Installed NDKs:" From f399c35ba12447b233733e651b7559ba035de4dc Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 22:47:20 -0500 Subject: [PATCH 36/77] act --- .github/actions/setup-e2e-env/action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index a3375836..7be5f9e1 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -283,11 +283,12 @@ runs: echo "$ANDROID_HOME/cmdline-tools/latest/bin" >> "$GITHUB_PATH" shell: bash - - name: Add NDK toolchain to PATH + - name: Add NDK related toolchains to PATH if: ${{ inputs.platform == 'android' }} run: | NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" + echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" shell : bash - name: Check Installed NDK Versions From 4d875528b92c6b9099789395976e60d8e57ddac5 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 10 Jul 2025 23:00:50 -0500 Subject: [PATCH 37/77] upgrade default xcode-version --- .github/actions/setup-e2e-env/action.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 7be5f9e1..19259f0e 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -34,9 +34,9 @@ inputs: required: false default: "3.1" xcode-version: - description: Xcode version to select (e.g., 16.0) + description: Xcode version to select (e.g., 16.2) required: false - default: "15.0" + default: "16.2" jdk-version: description: JDK version to use (only for Android) required: false @@ -151,11 +151,13 @@ runs: working-directory: ios shell: bash + # Select Xcode version - name: Select Xcode version if: ${{ inputs.platform == 'ios' }} run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app shell: bash + # Restore CocoaPods cache - name: Restore CocoaPods cache if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} uses: actions/cache@v4 @@ -165,7 +167,7 @@ runs: restore-keys: | ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}- - + # Install CocoaPods w/ cached bundler environment - name: Install CocoaPods via bundler if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: bundle exec pod install @@ -202,7 +204,8 @@ runs: fi shell: bash -## Android Setup + +## Android Setup ## ## JDK Setup - name: Setup Java @@ -289,10 +292,4 @@ runs: NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" - shell : bash - - - name: Check Installed NDK Versions - run: | - echo "Installed NDKs:" - ls -la "$ANDROID_SDK_ROOT/ndk" || echo "No NDK installed" - shell: bash + shell : bash \ No newline at end of file From 929ddaaba614e40d28514263ae5f6d4c0f295ae1 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 10:23:13 -0500 Subject: [PATCH 38/77] e2e --- .github/actions/setup-e2e-env/action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 19259f0e..463173ea 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -86,6 +86,8 @@ runs: if: ${{ inputs.platform == 'ios' }} run: yarn install --frozen-lockfile shell: bash + env: + NODE_OPTIONS: --max-old-space-size=4096 # Increase memory limit for Node.js due to large dependencies - name: Install Detox CLI id: install-detox-cli From d9de05d4c20c649b2467ef2a5b43a99f0807e750 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 14:02:09 -0500 Subject: [PATCH 39/77] lint --- .github/actions/setup-e2e-env/action.yml | 56 ++++++++++-------------- 1 file changed, 22 insertions(+), 34 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 463173ea..22de0e84 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -17,10 +17,10 @@ inputs: required: false default: 'false' # See https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators - ios-simulator-device: + ios-simulator-device: description: Name of iOS simulator device to boot (e.g., "iPhone 15") required: false - default: "iPhone 15" + default: 'iPhone 15' bundler-version: description: 'Bundler version to use (only for iOS)' required: false @@ -32,46 +32,42 @@ inputs: ruby-version: description: Ruby version to use (only for iOS) required: false - default: "3.1" + default: '3.1' xcode-version: description: Xcode version to select (e.g., 16.2) required: false - default: "16.2" + default: '16.2' jdk-version: description: JDK version to use (only for Android) required: false - default: "17" + default: '17' jdk-distribution: description: JDK distribution to use (only for Android) required: false - default: "temurin" + default: 'temurin' ndk-version: description: NDK version to use (only for Android) required: false - default: "26.1.10909125" + default: '26.1.10909125' foundry-version: description: Foundry version to install required: false - default: "v1.2.3" - - + default: 'v1.2.3' runs: - using: "composite" + using: 'composite' steps: - -## Common Setup ## + ## Common Setup ## - run: echo "Setup E2E Environment started" shell: bash -## Yarn Setup & Cache Management + ## Yarn Setup & Cache Management - name: Corepack id: corepack run: corepack enable && corepack prepare yarn@${{ inputs.yarn-version }} --activate shell: bash - - name: Restore Yarn cache uses: actions/cache@v4 with: @@ -83,7 +79,6 @@ runs: - name: Install JavaScript dependencies id: yarn-install - if: ${{ inputs.platform == 'ios' }} run: yarn install --frozen-lockfile shell: bash env: @@ -98,7 +93,7 @@ runs: shell: bash run: | echo "Installing Foundry via foundryup..." - + export FOUNDRY_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/.foundry" export FOUNDRY_BIN="$FOUNDRY_DIR/bin" @@ -111,12 +106,9 @@ runs: "$FOUNDRY_BIN/foundryup" + ## IOS Setup ## - - -## IOS Setup ## - -## Ruby Setup & Cache Management + ## Ruby Setup & Cache Management - name: Setup Ruby if: ${{ inputs.platform == 'ios' }} uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 @@ -206,10 +198,9 @@ runs: fi shell: bash + ## Android Setup ## -## Android Setup ## - -## JDK Setup + ## JDK Setup - name: Setup Java if: ${{ inputs.platform == 'android' }} uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 @@ -217,7 +208,7 @@ runs: java-version: ${{ inputs.jdk-version }} distribution: ${{ inputs.jdk-distribution }} -## Android SDK Setup + ## Android SDK Setup - name: Install required emulator dependencies if: ${{ inputs.platform == 'android' }} @@ -244,8 +235,7 @@ runs: "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update shell: bash - - ## NDK Setup + ## NDK Setup - name: Debug Android SDK Paths if: ${{ inputs.platform == 'android' }} @@ -254,7 +244,6 @@ runs: echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" shell: bash - - name: Accept Android SDK licenses if: ${{ inputs.platform == 'android' }} run: | @@ -262,7 +251,6 @@ runs: bash -c 'yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses' || true shell: bash - - name: Install Android SDK Packages if: ${{ inputs.platform == 'android' }} run: | @@ -291,7 +279,7 @@ runs: - name: Add NDK related toolchains to PATH if: ${{ inputs.platform == 'android' }} run: | - NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" - echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" - echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" - shell : bash \ No newline at end of file + NDK_TOOLCHAIN="$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}/toolchains/llvm/prebuilt/linux-x86_64/bin" + echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" + echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" + shell: bash From 18421e818eb3b4a94a5d12f32bfa4f8f80d1279c Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:00:15 -0500 Subject: [PATCH 40/77] android-simulator --- .github/actions/setup-e2e-env/action.yml | 50 ++++++++++++++++++++---- 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 22de0e84..61b2f0f1 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -17,8 +17,8 @@ inputs: required: false default: 'false' # See https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators - ios-simulator-device: - description: Name of iOS simulator device to boot (e.g., "iPhone 15") + ios-device: + description: Name of iOS device to boot (e.g., "iPhone 15") required: false default: 'iPhone 15' bundler-version: @@ -53,6 +53,18 @@ inputs: description: Foundry version to install required: false default: 'v1.2.3' + android-avd-name: + description: 'Name of AVD to create and boot (for Android)' + required: false + default: 'test_e2e_avd' + android-device: + description: 'AVD device profile (e.g. "pixel")' + required: false + default: 'pixel' + android-api-level: + description: 'Android API level to use (e.g. "34")' + required: false + default: '34' runs: using: 'composite' @@ -176,11 +188,11 @@ runs: - name: Boot iOS Simulator (if not already booted) if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} run: | - echo "Looking for simulator named: ${{ inputs.ios-simulator-device }}" + echo "Looking for simulator named: ${{ inputs.ios-device }}" - SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-simulator-device }}") + SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-device }}") if [ -z "$SIMULATOR_LINE" ]; then - echo "No simulator found with name '${{ inputs.ios-simulator-device }}'" + echo "No simulator found with name '${{ inputs.ios-device }}'" exit 1 fi @@ -256,10 +268,10 @@ runs: run: | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install \ "platform-tools" \ - "platforms;android-34" \ + "platforms;android-${{ inputs.android-api-level }}" \ "build-tools;34.0.0" \ "emulator" \ - "system-images;android-34;google_apis;x86_64" + "system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" shell: bash - name: Install Android NDK @@ -283,3 +295,27 @@ runs: echo "$NDK_TOOLCHAIN" >> "$GITHUB_PATH" echo "$ANDROID_SDK_ROOT/ndk/${{ inputs.ndk-version }}" >> "$GITHUB_PATH" shell: bash + + ## Launch AVD + - name: Install Android system image + if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} + run: | + IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + echo "Installing system image: $IMAGE" + "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" + shell: bash + + - name: Create Android Virtual Device (AVD) + if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} + run: | + IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ + --name ${{ inputs.android-avd-name }} \ + --package "$IMAGE" \ + --device ${ inputs.android-device } + shell: bash + + - name: Launch Android Emulator + if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} + run: nohup $ANDROID_HOME/emulator/emulator -avd ${{ inputs.android-avd-name }} -no-window -no-audio -no-boot-anim > /dev/null 2>&1 & + shell: bash From 93cf96ae2ba6d22eaa67286bc50b8a52eade70b5 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:05:03 -0500 Subject: [PATCH 41/77] android-act --- .github/actions/setup-e2e-env/action.yml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 61b2f0f1..9c3b1791 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -297,6 +297,7 @@ runs: shell: bash ## Launch AVD + - name: Install Android system image if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} run: | @@ -315,7 +316,32 @@ runs: --device ${ inputs.android-device } shell: bash + # Launch Android Emulator - name: Launch Android Emulator if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} run: nohup $ANDROID_HOME/emulator/emulator -avd ${{ inputs.android-avd-name }} -no-window -no-audio -no-boot-anim > /dev/null 2>&1 & shell: bash + + ## Wait for Emulator to Boot + - name: Wait for Android Emulator to Boot + if: ${{ inputs.platform == 'android' }} + run: | + adb wait-for-device + bootanim="" + timeout=300 # 5 minutes in seconds + elapsed=0 + + until [[ "$bootanim" == *"stopped"* || "$elapsed" -ge "$timeout" ]]; do + bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null) + echo "Waiting for emulator... ($bootanim) (${elapsed}s elapsed)" + sleep 5 + elapsed=$((elapsed + 5)) + done + + if [[ "$bootanim" != *"stopped"* ]]; then + echo "❌ Timeout waiting for emulator to boot" + exit 1 + fi + + echo "✅ Emulator booted successfully" + shell: bash From db782297505f2ceba855a3a3867b1cf642927600 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:11:52 -0500 Subject: [PATCH 42/77] fix emu bug --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 9c3b1791..d1c77c91 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -313,7 +313,7 @@ runs: echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ --name ${{ inputs.android-avd-name }} \ --package "$IMAGE" \ - --device ${ inputs.android-device } + --device "${{ inputs.android-device }}" shell: bash # Launch Android Emulator From 37051d08e2e1e8d3d4e9a90fb81f47276bbdf506 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:22:53 -0500 Subject: [PATCH 43/77] act --- .github/actions/setup-e2e-env/action.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index d1c77c91..687f01d9 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -326,22 +326,27 @@ runs: - name: Wait for Android Emulator to Boot if: ${{ inputs.platform == 'android' }} run: | + echo "Waiting for emulator to be ready..." adb wait-for-device + bootanim="" timeout=300 # 5 minutes in seconds elapsed=0 - until [[ "$bootanim" == *"stopped"* || "$elapsed" -ge "$timeout" ]]; do - bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null) + while [[ "$elapsed" -lt "$timeout" ]]; do + bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null || echo "unknown") echo "Waiting for emulator... ($bootanim) (${elapsed}s elapsed)" + + if [[ "$bootanim" == *"stopped"* ]]; then + echo "✅ Emulator booted successfully" + exit 0 + fi + sleep 5 elapsed=$((elapsed + 5)) done - if [[ "$bootanim" != *"stopped"* ]]; then - echo "❌ Timeout waiting for emulator to boot" - exit 1 - fi - - echo "✅ Emulator booted successfully" + echo "❌ Timeout waiting for emulator to boot" + exit 1 shell: bash + From dade4762c46c41351b9d271436695f984a4e888c Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:35:50 -0500 Subject: [PATCH 44/77] act --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 687f01d9..82d56642 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -319,7 +319,7 @@ runs: # Launch Android Emulator - name: Launch Android Emulator if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} - run: nohup $ANDROID_HOME/emulator/emulator -avd ${{ inputs.android-avd-name }} -no-window -no-audio -no-boot-anim > /dev/null 2>&1 & + run: $ANDROID_HOME/emulator/emulator -avd test_e2e_avd -no-audio -no-boot-anim -no-window -verbose shell: bash ## Wait for Emulator to Boot From 852925609a53c81893997a24cbe0a72c39371cb8 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 17:43:42 -0500 Subject: [PATCH 45/77] emulator bugs --- .github/actions/setup-e2e-env/action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 82d56642..66dd2da5 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -299,7 +299,7 @@ runs: ## Launch AVD - name: Install Android system image - if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" echo "Installing system image: $IMAGE" @@ -307,11 +307,11 @@ runs: shell: bash - name: Create Android Virtual Device (AVD) - if: ${{ inputs.platform == 'android' }} ${{ inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ - --name ${{ inputs.android-avd-name }} \ + --name "${{ inputs.android-avd-name }}" \ --package "$IMAGE" \ --device "${{ inputs.android-device }}" shell: bash @@ -324,7 +324,7 @@ runs: ## Wait for Emulator to Boot - name: Wait for Android Emulator to Boot - if: ${{ inputs.platform == 'android' }} + if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} run: | echo "Waiting for emulator to be ready..." adb wait-for-device From 3b49d849bf1ab5cc4085807614fcf11433ec74bd Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:02:32 -0500 Subject: [PATCH 46/77] android-sim --- .github/actions/setup-e2e-env/action.yml | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 66dd2da5..3b137eb1 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -298,6 +298,8 @@ runs: ## Launch AVD +## Launch AVD + - name: Install Android system image if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | @@ -306,25 +308,40 @@ runs: "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" shell: bash + - name: Set ANDROID_AVD_HOME for downstream steps + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + shell: bash + run: | + echo "ANDROID_AVD_HOME=$HOME/.android/avd" >> "$GITHUB_ENV" + mkdir -p "$HOME/.android/avd" + - name: Create Android Virtual Device (AVD) if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + echo "Creating AVD with image: $IMAGE" echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ --name "${{ inputs.android-avd-name }}" \ --package "$IMAGE" \ --device "${{ inputs.android-device }}" shell: bash + - name: List available AVDs + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + run: | + echo "✅ Available AVDs:" + "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" list avd || true + # Launch Android Emulator - name: Launch Android Emulator - if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} - run: $ANDROID_HOME/emulator/emulator -avd test_e2e_avd -no-audio -no-boot-anim -no-window -verbose + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + run: | + "$ANDROID_HOME/emulator/emulator" -avd "${{ inputs.android-avd-name }}" -no-audio -no-boot-anim -no-window -verbose shell: bash ## Wait for Emulator to Boot - name: Wait for Android Emulator to Boot - if: ${{ inputs.platform == 'android' }} && ${{ inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | echo "Waiting for emulator to be ready..." adb wait-for-device @@ -350,3 +367,4 @@ runs: exit 1 shell: bash + From a4ca242158ee881023863c24d53298cd6853536e Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:04:25 -0500 Subject: [PATCH 47/77] act --- .github/actions/setup-e2e-env/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 3b137eb1..241c423a 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -328,6 +328,7 @@ runs: - name: List available AVDs if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + shell: bash run: | echo "✅ Available AVDs:" "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" list avd || true From b1867a914271f7d3b97d95d393bb8738f569bd2d Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:16:33 -0500 Subject: [PATCH 48/77] act --- .github/actions/setup-e2e-env/action.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 241c423a..e71dc9a0 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -65,6 +65,11 @@ inputs: description: 'Android API level to use (e.g. "34")' required: false default: '34' + android-abi: + description: 'System architecture ABI for the Android system image (e.g. x86_64, arm64-v8a, armeabi-v7a)' + required: false + default: 'arm64-v8a' + runs: using: 'composite' @@ -238,10 +243,10 @@ runs: echo "Installing Android SDK components..." "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install \ "platform-tools" \ - "platforms;android-34" \ + "platforms;android-${{ inputs.android-api-level }}" \ "build-tools;34.0.0" \ "emulator" \ - "system-images;android-34;google_apis;x86_64" + "system-images;android-34;google_apis;${{ inputs.android-abi }}" \ echo "Updating SDK packages..." "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update @@ -271,7 +276,7 @@ runs: "platforms;android-${{ inputs.android-api-level }}" \ "build-tools;34.0.0" \ "emulator" \ - "system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + "system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" shell: bash - name: Install Android NDK @@ -303,7 +308,7 @@ runs: - name: Install Android system image if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | - IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" echo "Installing system image: $IMAGE" "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" shell: bash @@ -318,7 +323,7 @@ runs: - name: Create Android Virtual Device (AVD) if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | - IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;x86_64" + IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" echo "Creating AVD with image: $IMAGE" echo "no" | "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" create avd \ --name "${{ inputs.android-avd-name }}" \ From 860e85f9a4e89d4723c6e5e494f358fce112c43e Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:34:19 -0500 Subject: [PATCH 49/77] env --- .github/actions/setup-e2e-env/action.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index e71dc9a0..8c040811 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -227,12 +227,12 @@ runs: ## Android SDK Setup - - name: Install required emulator dependencies - if: ${{ inputs.platform == 'android' }} - run: | - sudo apt-get update - sudo apt-get install -y libpulse0 libglu1-mesa - shell: bash + # - name: Install required emulator dependencies + # if: ${{ inputs.platform == 'android' }} + # run: | + # sudo apt-get update + # sudo apt-get install -y libpulse0 libglu1-mesa + # shell: bash - name: Install Android SDK packages if: ${{ inputs.platform == 'android' }} From 032380e447a50a81cd6cdbceba0c57eb4027dd45 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:37:02 -0500 Subject: [PATCH 50/77] update android default abi --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8c040811..312c75a5 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -68,7 +68,7 @@ inputs: android-abi: description: 'System architecture ABI for the Android system image (e.g. x86_64, arm64-v8a, armeabi-v7a)' required: false - default: 'arm64-v8a' + default: 'x86_64' runs: From eea10a61e6e4f6cd6c2e037a0d58f09bc1d3712c Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 18:48:11 -0500 Subject: [PATCH 51/77] act --- .github/actions/setup-e2e-env/action.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 312c75a5..24358f25 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -342,7 +342,12 @@ runs: - name: Launch Android Emulator if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | - "$ANDROID_HOME/emulator/emulator" -avd "${{ inputs.android-avd-name }}" -no-audio -no-boot-anim -no-window -verbose + nohup "$ANDROID_HOME/emulator/emulator" \ + -avd "${{ inputs.android-avd-name }}" \ + -no-audio \ + -no-boot-anim \ + -no-window \ + -verbose > /dev/null 2>&1 & shell: bash ## Wait for Emulator to Boot From 13662757307a9b5dec0584f1fc5006291e8c90a9 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 11 Jul 2025 19:39:11 -0500 Subject: [PATCH 52/77] linting --- .github/actions/setup-e2e-env/action.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 24358f25..cad340cb 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -70,7 +70,6 @@ inputs: required: false default: 'x86_64' - runs: using: 'composite' steps: @@ -303,7 +302,7 @@ runs: ## Launch AVD -## Launch AVD + ## Launch AVD - name: Install Android system image if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} @@ -377,5 +376,3 @@ runs: echo "❌ Timeout waiting for emulator to boot" exit 1 shell: bash - - From 367c013c332b567159831dfb4ad69b2432fdc530 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Tue, 15 Jul 2025 16:33:52 -0500 Subject: [PATCH 53/77] always lay out simulator cfgs --- .github/actions/setup-e2e-env/action.yml | 27 ++++++++---------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index cad340cb..2be4eef4 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -226,12 +226,12 @@ runs: ## Android SDK Setup - # - name: Install required emulator dependencies - # if: ${{ inputs.platform == 'android' }} - # run: | - # sudo apt-get update - # sudo apt-get install -y libpulse0 libglu1-mesa - # shell: bash + - name: Install required emulator dependencies + if: ${{ inputs.platform == 'android' && runner.os == 'Linux' }} + run: | + sudo apt-get update + sudo apt-get install -y libpulse0 libglu1-mesa + shell: bash - name: Install Android SDK packages if: ${{ inputs.platform == 'android' }} @@ -302,10 +302,8 @@ runs: ## Launch AVD - ## Launch AVD - - name: Install Android system image - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android' }} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" echo "Installing system image: $IMAGE" @@ -313,14 +311,14 @@ runs: shell: bash - name: Set ANDROID_AVD_HOME for downstream steps - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android'}} shell: bash run: | echo "ANDROID_AVD_HOME=$HOME/.android/avd" >> "$GITHUB_ENV" mkdir -p "$HOME/.android/avd" - name: Create Android Virtual Device (AVD) - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} + if: ${{ inputs.platform == 'android'}} run: | IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" echo "Creating AVD with image: $IMAGE" @@ -330,13 +328,6 @@ runs: --device "${{ inputs.android-device }}" shell: bash - - name: List available AVDs - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} - shell: bash - run: | - echo "✅ Available AVDs:" - "${ANDROID_HOME}/cmdline-tools/latest/bin/avdmanager" list avd || true - # Launch Android Emulator - name: Launch Android Emulator if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} From d7a349b87908485cfff22c5a76d114f8af3ba88b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Wed, 16 Jul 2025 14:56:23 +0100 Subject: [PATCH 54/77] E2e ubuntu runners (#87) * feat(INFRA-2766): update for ubuntu runners * feat(INFRA-2766): remove ios references not used * feat(INFRA-2766): pwetty --- .github/actions/setup-e2e-env/action.yml | 85 ++++++++++++++---------- 1 file changed, 51 insertions(+), 34 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2be4eef4..2a29f58f 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -230,7 +230,13 @@ runs: if: ${{ inputs.platform == 'android' && runner.os == 'Linux' }} run: | sudo apt-get update - sudo apt-get install -y libpulse0 libglu1-mesa + sudo apt-get install -y \ + libpulse0 \ + libglu1-mesa \ + libnss3 \ + libxss1 + + echo "✅ Linux dependencies installed successfully" shell: bash - name: Install Android SDK packages @@ -245,10 +251,12 @@ runs: "platforms;android-${{ inputs.android-api-level }}" \ "build-tools;34.0.0" \ "emulator" \ - "system-images;android-34;google_apis;${{ inputs.android-abi }}" \ + "system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" \ echo "Updating SDK packages..." "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --update + + echo "✅ Android SDK packages installed successfully" shell: bash ## NDK Setup @@ -260,24 +268,6 @@ runs: echo "ANDROID_SDK_ROOT: $ANDROID_SDK_ROOT" shell: bash - - name: Accept Android SDK licenses - if: ${{ inputs.platform == 'android' }} - run: | - echo "Accepting Android SDK licenses..." - bash -c 'yes | "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --licenses' || true - shell: bash - - - name: Install Android SDK Packages - if: ${{ inputs.platform == 'android' }} - run: | - "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --install \ - "platform-tools" \ - "platforms;android-${{ inputs.android-api-level }}" \ - "build-tools;34.0.0" \ - "emulator" \ - "system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" - shell: bash - - name: Install Android NDK if: ${{ inputs.platform == 'android' }} run: | @@ -302,14 +292,6 @@ runs: ## Launch AVD - - name: Install Android system image - if: ${{ inputs.platform == 'android' }} - run: | - IMAGE="system-images;android-${{ inputs.android-api-level }};google_apis;${{ inputs.android-abi }}" - echo "Installing system image: $IMAGE" - "${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager" --install "$IMAGE" - shell: bash - - name: Set ANDROID_AVD_HOME for downstream steps if: ${{ inputs.platform == 'android'}} shell: bash @@ -332,11 +314,16 @@ runs: - name: Launch Android Emulator if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | + # Linux with KVM hardware acceleration nohup "$ANDROID_HOME/emulator/emulator" \ -avd "${{ inputs.android-avd-name }}" \ -no-audio \ -no-boot-anim \ -no-window \ + -gpu swiftshader_indirect \ + -no-snapshot \ + -wipe-data \ + -accel on \ -verbose > /dev/null 2>&1 & shell: bash @@ -344,26 +331,56 @@ runs: - name: Wait for Android Emulator to Boot if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} run: | - echo "Waiting for emulator to be ready..." + echo "Waiting for emulator to be ready on $RUNNER_OS..." + + # Wait for device to be detected by ADB + echo "Waiting for ADB to detect device..." adb wait-for-device + # Additional wait for emulator to stabilize + sleep 10 + + # Check emulator status + echo "Checking emulator processes..." + if [ "$RUNNER_OS" = "Linux" ]; then + ps aux | grep emulator || echo "No emulator processes found" + fi + + # Wait for boot to complete bootanim="" - timeout=300 # 5 minutes in seconds + timeout=600 # 10 minutes for initial boot (Linux might be slower) elapsed=0 while [[ "$elapsed" -lt "$timeout" ]]; do bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null || echo "unknown") - echo "Waiting for emulator... ($bootanim) (${elapsed}s elapsed)" + sys_boot_completed=$(adb shell getprop sys.boot_completed 2>/dev/null || echo "0") + + echo "Waiting for emulator... bootanim: $bootanim, boot_completed: $sys_boot_completed (${elapsed}s elapsed)" - if [[ "$bootanim" == *"stopped"* ]]; then + if [[ "$bootanim" == *"stopped"* ]] && [[ "$sys_boot_completed" == "1" ]]; then echo "✅ Emulator booted successfully" + + # Unlock screen and disable animations for testing + adb shell input keyevent 82 # Unlock + adb shell settings put global window_animation_scale 0 + adb shell settings put global transition_animation_scale 0 + adb shell settings put global animator_duration_scale 0 + + echo "✅ Emulator is ready for testing" exit 0 fi - sleep 5 - elapsed=$((elapsed + 5)) + sleep 10 + elapsed=$((elapsed + 10)) done echo "❌ Timeout waiting for emulator to boot" + + # Debug information on failure + echo "Debug: ADB devices:" + adb devices + echo "Debug: Emulator processes:" + ps aux | grep emulator || echo "No emulator processes found" + exit 1 shell: bash From 4459e301b7c2da1223d34d9492285731bc2eb56c Mon Sep 17 00:00:00 2001 From: jake-perkins <128608287+jake-perkins@users.noreply.github.com> Date: Fri, 18 Jul 2025 01:59:02 -0500 Subject: [PATCH 55/77] E2e env actions keystore (#90) * keystore-actions * act * --repo-update on pod install * keystore * android keystore configuration * ios signing * keystores * ios-crypto --- .github/actions/configure-keystore/action.yml | 115 ++++++++++++++++++ .github/actions/setup-e2e-env/action.yml | 6 +- 2 files changed, 120 insertions(+), 1 deletion(-) create mode 100644 .github/actions/configure-keystore/action.yml diff --git a/.github/actions/configure-keystore/action.yml b/.github/actions/configure-keystore/action.yml new file mode 100644 index 00000000..d10cbc5c --- /dev/null +++ b/.github/actions/configure-keystore/action.yml @@ -0,0 +1,115 @@ +name: "Configure Keystore" +description: "Assume an AWS role and fetch a secret into environment variables" + +inputs: + aws-role-to-assume: + description: "The AWS IAM role to assume" + required: true + aws-region: + description: "The AWS region where the secret is stored" + required: true + secret-name: + description: "The name of the secret in AWS Secrets Manager" + required: true + platform: + description: "The platform for which the keystore is being configured (e.g., ios, android)" + required: true + environment: + description: "The environment for which the keystore is being configured (e.g., qa, flask, main)" + required: true + +runs: + using: "composite" + steps: + - name: Determine signing secret name + shell: bash + run: | + case "${{ inputs.environment }}" in + qa) + SECRET_NAME="metamask-mobile-qa-signing-certificates" + ;; + flask) + SECRET_NAME="metamask-mobile-flask-signing-certificates" + ;; + main) + SECRET_NAME="metamask-mobile-main-signing-certificates" + ;; + *) + echo "❌ Unknown environment: ${{ inputs.environment }}" + exit 1 + ;; + esac + echo "AWS_SIGNING_CERT_SECRET_NAME=$SECRET_NAME" >> "$GITHUB_ENV" + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ inputs.aws-role-to-assume }} + aws-region: ${{ inputs.aws-region }} + + - name: Fetch secret and export as environment variables + shell: bash + run: | + echo "🔐 Fetching secret from Secrets Manager..." + secret_json=$(aws secretsmanager get-secret-value \ + --region "${{ inputs.aws-region }}" \ + --secret-id "${AWS_SIGNING_CERT_SECRET_NAME}" \ + --query SecretString \ + --output text) + + keys=$(echo "$secret_json" | jq -r 'keys[]') + for key in $keys; do + value=$(echo "$secret_json" | jq -r --arg k "$key" '.[$k]') + echo "::add-mask::$value" + echo "$key=$(printf '%s' "$value")" >> "$GITHUB_ENV" + echo "✅ Set secret for key: $key" + done + + - name: Configure Android Signing Certificates + if: inputs.platform == 'android' + shell: bash + run: | + echo "📦 Configuring Android keystore..." + if [[ -z "$ANDROID_KEYSTORE" ]]; then + echo "⚠️ ANDROID_KEYSTORE is not set. Skipping keystore decoding." + exit 1 + fi + + # Use provided path if set, fallback to default + KEYSTORE_PATH="${ANDROID_KEYSTORE_PATH:-/tmp/android.keystore}" + echo "$ANDROID_KEYSTORE" | base64 --decode > "$KEYSTORE_PATH" + echo "✅ Android keystore written to $KEYSTORE_PATH" + + - name: Configure iOS Signing Certificates + if: inputs.platform == 'ios' + shell: bash + run: | + echo "📦 Configuring iOS code signing..." + + # Create paths + CERT_PATH="$RUNNER_TEMP/build_certificate.p12" + PROFILE_PATH="$RUNNER_TEMP/build_pp.mobileprovision" + KEYCHAIN_PATH="$RUNNER_TEMP/app-signing.keychain-db" + CERT_PW="${IOS_SIGNING_KEYSTORE_PASSWORD}" + + # Decode base64 files + echo "$IOS_SIGNING_KEYSTORE" | base64 --decode > "$CERT_PATH" + echo "$IOS_SIGNING_PROFILE" | base64 --decode > "$PROFILE_PATH" + echo "✅ Decoded .p12 and provisioning profile" + + # Create and unlock keychain + security create-keychain -p "$CERT_PW" "$KEYCHAIN_PATH" + security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH" + security unlock-keychain -p "$CERT_PW" "$KEYCHAIN_PATH" + + # Import cert + security import "$CERT_PATH" -P "$CERT_PW" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH" > /dev/null + security set-key-partition-list -S apple-tool:,apple: -k "$CERT_PW" "$KEYCHAIN_PATH" > /dev/null + security find-identity -p codesigning "$KEYCHAIN_PATH" + + + # Install provisioning profile + mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles + cp "$PROFILE_PATH" ~/Library/MobileDevice/Provisioning\ Profiles/ + echo "✅ Installed provisioning profile" + diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2a29f58f..02c3ceb0 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -69,6 +69,10 @@ inputs: description: 'System architecture ABI for the Android system image (e.g. x86_64, arm64-v8a, armeabi-v7a)' required: false default: 'x86_64' + configure-keystores: + description: 'Whether to configure keystores for E2E tests' + required: false + default: 'true' runs: using: 'composite' @@ -180,7 +184,7 @@ runs: # Install CocoaPods w/ cached bundler environment - name: Install CocoaPods via bundler if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} - run: bundle exec pod install + run: bundle exec pod install --repo-update working-directory: ios shell: bash From 4ee8ff1e8324891aaf372b6db0c8b38485c7b214 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 18 Jul 2025 02:02:52 -0500 Subject: [PATCH 56/77] keystore-integrations --- .github/actions/configure-keystore/action.yml | 17 +++++++------- .github/actions/setup-e2e-env/action.yml | 22 +++++++++++++++++++ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/actions/configure-keystore/action.yml b/.github/actions/configure-keystore/action.yml index d10cbc5c..9a67871d 100644 --- a/.github/actions/configure-keystore/action.yml +++ b/.github/actions/configure-keystore/action.yml @@ -1,25 +1,25 @@ -name: "Configure Keystore" -description: "Assume an AWS role and fetch a secret into environment variables" +name: 'Configure Keystore' +description: 'Assume an AWS role and fetch a secret into environment variables' inputs: aws-role-to-assume: - description: "The AWS IAM role to assume" + description: 'The AWS IAM role to assume' required: true aws-region: - description: "The AWS region where the secret is stored" + description: 'The AWS region where the secret is stored' required: true secret-name: - description: "The name of the secret in AWS Secrets Manager" + description: 'The name of the secret in AWS Secrets Manager' required: true platform: - description: "The platform for which the keystore is being configured (e.g., ios, android)" + description: 'The platform for which the keystore is being configured (e.g., ios, android)' required: true environment: - description: "The environment for which the keystore is being configured (e.g., qa, flask, main)" + description: 'The environment for which the keystore is being configured (e.g., qa, flask, main)' required: true runs: - using: "composite" + using: 'composite' steps: - name: Determine signing secret name shell: bash @@ -112,4 +112,3 @@ runs: mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles cp "$PROFILE_PATH" ~/Library/MobileDevice/Provisioning\ Profiles/ echo "✅ Installed provisioning profile" - diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 02c3ceb0..0a4ca9b8 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -73,6 +73,10 @@ inputs: description: 'Whether to configure keystores for E2E tests' required: false default: 'true' + environment: + description: 'Environment for which the keystore is being configured (e.g., qa, flask, main)' + required: false + default: 'qa' runs: using: 'composite' @@ -127,6 +131,14 @@ runs: "$FOUNDRY_BIN/foundryup" ## IOS Setup ## + - name: Configure iOS Signing Certificates + if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }} + uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions + with: + aws-role-to-assume: 'arn:aws:iam::722264665990:role/metamask-mobile-build-signing-certificate-manager' + aws-region: 'us-east-2' + platform: 'ios' + environment: ${{ inputs.environment }} ## Ruby Setup & Cache Management - name: Setup Ruby @@ -228,6 +240,16 @@ runs: java-version: ${{ inputs.jdk-version }} distribution: ${{ inputs.jdk-distribution }} + ## Android Certificate Setup + - name: Configure Android Signing Certificates + if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} + uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions + with: + aws-role-to-assume: 'arn:aws:iam::722264665990:role/metamask-mobile-build-signing-certificate-manager' + aws-region: 'us-east-2' + platform: 'android' + environment: ${{ inputs.environment }} + ## Android SDK Setup - name: Install required emulator dependencies From 9e04ceab892376d88d48e8c67206c2a861a71f6b Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 18 Jul 2025 08:41:39 -0500 Subject: [PATCH 57/77] keystores --- .github/actions/setup-e2e-env/action.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 0a4ca9b8..47ec1654 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -73,6 +73,10 @@ inputs: description: 'Whether to configure keystores for E2E tests' required: false default: 'true' + keystore-role-to-assume: + description: 'AWS IAM role to assume for keystore configuration' + required: false + default: 'arn:aws:iam::363762752069:role/metamask-mobile-build-signing-certificate-manager' environment: description: 'Environment for which the keystore is being configured (e.g., qa, flask, main)' required: false @@ -135,7 +139,7 @@ runs: if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }} uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions with: - aws-role-to-assume: 'arn:aws:iam::722264665990:role/metamask-mobile-build-signing-certificate-manager' + aws-role-to-assume: ${{ inputs.keystore-role-to-assume }} aws-region: 'us-east-2' platform: 'ios' environment: ${{ inputs.environment }} @@ -245,7 +249,7 @@ runs: if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions with: - aws-role-to-assume: 'arn:aws:iam::722264665990:role/metamask-mobile-build-signing-certificate-manager' + #aws-role-to-assume: 'arn:aws:iam::722264665990:role/metamask-mobile-build-signing-certificate-manager' aws-region: 'us-east-2' platform: 'android' environment: ${{ inputs.environment }} From aa884d691ad2b73e53f2d955bbdcac162406f984 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 18 Jul 2025 08:43:57 -0500 Subject: [PATCH 58/77] keystore --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 47ec1654..d56e4a2c 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -249,7 +249,7 @@ runs: if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions with: - #aws-role-to-assume: 'arn:aws:iam::722264665990:role/metamask-mobile-build-signing-certificate-manager' + aws-role-to-assume: ${{ inputs.keystore-role-to-assume }} aws-region: 'us-east-2' platform: 'android' environment: ${{ inputs.environment }} From a4d8ac30105da3f29315236fcac5cea7e18c4e1a Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 18 Jul 2025 09:53:12 -0500 Subject: [PATCH 59/77] manage node version --- .github/actions/setup-e2e-env/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index d56e4a2c..bb71d6c1 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -89,6 +89,11 @@ runs: - run: echo "Setup E2E Environment started" shell: bash + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ inputs.node-version }} + ## Yarn Setup & Cache Management - name: Corepack From a3cd1cbba80624cee0d0882f1cda0af5a76e7d6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 18 Jul 2025 16:20:14 +0100 Subject: [PATCH 60/77] Emulator configs (#88) * feat(INFRA-2766): test simulator configs * feat(INFRA-2766): remove boot * feat(INFRA-2766): list ios emuls * feat(INFRA-2766): test * feat(INFRA-2766): remove boot stuff for commented * feat(INFRA-2766): add kvm stuff --- .github/actions/setup-e2e-env/action.yml | 117 +++-------------------- 1 file changed, 12 insertions(+), 105 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index bb71d6c1..8549d29c 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -16,11 +16,6 @@ inputs: description: 'Whether to setup simulator/emulator' required: false default: 'false' - # See https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md#installed-simulators - ios-device: - description: Name of iOS device to boot (e.g., "iPhone 15") - required: false - default: 'iPhone 15' bundler-version: description: 'Bundler version to use (only for iOS)' required: false @@ -214,29 +209,9 @@ runs: run: brew tap wix/brew && brew install applesimutils shell: bash - - name: Boot iOS Simulator (if not already booted) - if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} - run: | - echo "Looking for simulator named: ${{ inputs.ios-device }}" - - SIMULATOR_LINE=$(xcrun simctl list devices | grep -m1 "${{ inputs.ios-device }}") - if [ -z "$SIMULATOR_LINE" ]; then - echo "No simulator found with name '${{ inputs.ios-device }}'" - exit 1 - fi - - SIMULATOR_ID=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $2}') - SIMULATOR_STATE=$(echo "$SIMULATOR_LINE" | awk -F '[()]' '{print $(NF-1)}') - - echo "Simulator ID: $SIMULATOR_ID" - echo "Simulator State: $SIMULATOR_STATE" - - if [ "$SIMULATOR_STATE" = "Booted" ]; then - echo "Simulator is already booted. Skipping boot step." - else - echo "Booting simulator..." - xcrun simctl boot "$SIMULATOR_ID" - fi + - name: Check simutils + if: ${{ inputs.platform == 'ios' }} + run: xcrun simctl list devices shell: bash ## Android Setup ## @@ -248,8 +223,7 @@ runs: with: java-version: ${{ inputs.jdk-version }} distribution: ${{ inputs.jdk-distribution }} - - ## Android Certificate Setup + - name: Configure Android Signing Certificates if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions @@ -259,6 +233,14 @@ runs: platform: 'android' environment: ${{ inputs.environment }} + - name: Enable KVM group perms (Ubuntu only) + if: ${{ inputs.platform == 'android' && runner.os == 'Linux' }} + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + shell: bash + ## Android SDK Setup - name: Install required emulator dependencies @@ -344,78 +326,3 @@ runs: --package "$IMAGE" \ --device "${{ inputs.android-device }}" shell: bash - - # Launch Android Emulator - - name: Launch Android Emulator - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} - run: | - # Linux with KVM hardware acceleration - nohup "$ANDROID_HOME/emulator/emulator" \ - -avd "${{ inputs.android-avd-name }}" \ - -no-audio \ - -no-boot-anim \ - -no-window \ - -gpu swiftshader_indirect \ - -no-snapshot \ - -wipe-data \ - -accel on \ - -verbose > /dev/null 2>&1 & - shell: bash - - ## Wait for Emulator to Boot - - name: Wait for Android Emulator to Boot - if: ${{ inputs.platform == 'android' && inputs.setup-simulator == 'true' }} - run: | - echo "Waiting for emulator to be ready on $RUNNER_OS..." - - # Wait for device to be detected by ADB - echo "Waiting for ADB to detect device..." - adb wait-for-device - - # Additional wait for emulator to stabilize - sleep 10 - - # Check emulator status - echo "Checking emulator processes..." - if [ "$RUNNER_OS" = "Linux" ]; then - ps aux | grep emulator || echo "No emulator processes found" - fi - - # Wait for boot to complete - bootanim="" - timeout=600 # 10 minutes for initial boot (Linux might be slower) - elapsed=0 - - while [[ "$elapsed" -lt "$timeout" ]]; do - bootanim=$(adb shell getprop init.svc.bootanim 2>/dev/null || echo "unknown") - sys_boot_completed=$(adb shell getprop sys.boot_completed 2>/dev/null || echo "0") - - echo "Waiting for emulator... bootanim: $bootanim, boot_completed: $sys_boot_completed (${elapsed}s elapsed)" - - if [[ "$bootanim" == *"stopped"* ]] && [[ "$sys_boot_completed" == "1" ]]; then - echo "✅ Emulator booted successfully" - - # Unlock screen and disable animations for testing - adb shell input keyevent 82 # Unlock - adb shell settings put global window_animation_scale 0 - adb shell settings put global transition_animation_scale 0 - adb shell settings put global animator_duration_scale 0 - - echo "✅ Emulator is ready for testing" - exit 0 - fi - - sleep 10 - elapsed=$((elapsed + 10)) - done - - echo "❌ Timeout waiting for emulator to boot" - - # Debug information on failure - echo "Debug: ADB devices:" - adb devices - echo "Debug: Emulator processes:" - ps aux | grep emulator || echo "No emulator processes found" - - exit 1 - shell: bash From b74890801c7688479980787bda42e82fac421772 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 18 Jul 2025 13:13:29 -0500 Subject: [PATCH 61/77] remove cocoapods caching --- .github/actions/setup-e2e-env/action.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8549d29c..b9912ea1 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -188,19 +188,19 @@ runs: shell: bash # Restore CocoaPods cache - - name: Restore CocoaPods cache - if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} - uses: actions/cache@v4 - with: - path: ios/Pods - key: ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('ios/Podfile.lock') }} - restore-keys: | - ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}- + # - name: Restore CocoaPods cache + # if: ${{ inputs.platform == 'ios'}} + # uses: actions/cache@v4 + # with: + # path: ios/Pods + # key: ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}-${{ hashFiles('ios/Podfile.lock') }} + # restore-keys: | + # ${{ inputs.cache-prefix }}-pods-${{ inputs.platform }}-${{ runner.os }}- # Install CocoaPods w/ cached bundler environment - name: Install CocoaPods via bundler - if: ${{ inputs.platform == 'ios' && inputs.setup-simulator == 'true' }} - run: bundle exec pod install --repo-update + if: ${{ inputs.platform == 'ios'}} + run: bundle exec pod install--repo-update --verbose working-directory: ios shell: bash From 8553525bb4c5a04948e7e0bfd8ca0ae44ee33268 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Fri, 18 Jul 2025 13:16:28 -0500 Subject: [PATCH 62/77] fmt --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index b9912ea1..043fc766 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -200,7 +200,7 @@ runs: # Install CocoaPods w/ cached bundler environment - name: Install CocoaPods via bundler if: ${{ inputs.platform == 'ios'}} - run: bundle exec pod install--repo-update --verbose + run: bundle exec pod install --repo-update --verbose working-directory: ios shell: bash From cf5b15f15d04892480edd800af7a1969080eb396 Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Mon, 4 Aug 2025 09:43:36 +0200 Subject: [PATCH 63/77] chore: add conditional to start decoupling some steps For self hosted nodes we can decoupling some steps. --- .github/actions/setup-e2e-env/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 043fc766..985a5f47 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -76,6 +76,10 @@ inputs: description: 'Environment for which the keystore is being configured (e.g., qa, flask, main)' required: false default: 'qa' + is-self-hosted: + description: 'Whether the GitHub Actions runner is self-hosted' + required: false + default: 'false' runs: using: 'composite' @@ -146,7 +150,7 @@ runs: ## Ruby Setup & Cache Management - name: Setup Ruby - if: ${{ inputs.platform == 'ios' }} + if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'false' }} uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 with: ruby-version: ${{ inputs.ruby-version }} From 5827d9910e1d31476fae5cf02392c3f7e3e88be3 Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Mon, 4 Aug 2025 10:48:42 +0200 Subject: [PATCH 64/77] chore: test more self hosted conditionals --- .github/actions/setup-e2e-env/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 985a5f47..7b343766 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -187,7 +187,7 @@ runs: # Select Xcode version - name: Select Xcode version - if: ${{ inputs.platform == 'ios' }} + if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'false' }} run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app shell: bash @@ -203,7 +203,7 @@ runs: # Install CocoaPods w/ cached bundler environment - name: Install CocoaPods via bundler - if: ${{ inputs.platform == 'ios'}} + if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'false' }} run: bundle exec pod install --repo-update --verbose working-directory: ios shell: bash From ac3212f41782513cab184b35a2d6cba1784f513f Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Mon, 4 Aug 2025 11:15:09 +0200 Subject: [PATCH 65/77] chore: test path xcode self hosted --- .github/actions/setup-e2e-env/action.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 7b343766..1f3f2c66 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -191,6 +191,12 @@ runs: run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app shell: bash + # Select Xcode version + - name: Select Xcode version + if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'true' }} + run: sudo xcode-select -s /Library/Developer/CommandLineTools/Xcode_${{ inputs.xcode-version }}.app + shell: bash + # Restore CocoaPods cache # - name: Restore CocoaPods cache # if: ${{ inputs.platform == 'ios'}} From f850b3eaf8e75f256889b62cf2f4c52c89eadc99 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Mon, 4 Aug 2025 17:22:01 -0500 Subject: [PATCH 66/77] targets --- .github/actions/configure-keystore/action.yml | 4 ++-- .github/actions/setup-e2e-env/action.yml | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/configure-keystore/action.yml b/.github/actions/configure-keystore/action.yml index 9a67871d..6ae43416 100644 --- a/.github/actions/configure-keystore/action.yml +++ b/.github/actions/configure-keystore/action.yml @@ -14,8 +14,8 @@ inputs: platform: description: 'The platform for which the keystore is being configured (e.g., ios, android)' required: true - environment: - description: 'The environment for which the keystore is being configured (e.g., qa, flask, main)' + target: + description: 'The target for which the keystore is being configured (e.g., qa, flask, main)' required: true runs: diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 1f3f2c66..f940ee4b 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -71,9 +71,9 @@ inputs: keystore-role-to-assume: description: 'AWS IAM role to assume for keystore configuration' required: false - default: 'arn:aws:iam::363762752069:role/metamask-mobile-build-signing-certificate-manager' - environment: - description: 'Environment for which the keystore is being configured (e.g., qa, flask, main)' + default: 'arn:aws:iam::363762752069:role/metamask-mobile-build-signer-qa' + target: + description: 'target for which the keystore is being configured (e.g., qa, flask, main)' required: false default: 'qa' is-self-hosted: @@ -146,7 +146,7 @@ runs: aws-role-to-assume: ${{ inputs.keystore-role-to-assume }} aws-region: 'us-east-2' platform: 'ios' - environment: ${{ inputs.environment }} + target: ${{ inputs.target }} ## Ruby Setup & Cache Management - name: Setup Ruby @@ -233,7 +233,7 @@ runs: with: java-version: ${{ inputs.jdk-version }} distribution: ${{ inputs.jdk-distribution }} - + - name: Configure Android Signing Certificates if: ${{ inputs.platform == 'android' && inputs.configure-keystores == 'true' }} uses: MetaMask/github-tools/.github/actions/configure-keystore@e2e-env-actions @@ -241,7 +241,7 @@ runs: aws-role-to-assume: ${{ inputs.keystore-role-to-assume }} aws-region: 'us-east-2' platform: 'android' - environment: ${{ inputs.environment }} + target: ${{ inputs.target }} - name: Enable KVM group perms (Ubuntu only) if: ${{ inputs.platform == 'android' && runner.os == 'Linux' }} From a3886bc0324c4f8e1bfc4854b715e9ab1b456133 Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Mon, 4 Aug 2025 19:17:24 -0500 Subject: [PATCH 67/77] fix target ref --- .github/actions/configure-keystore/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/configure-keystore/action.yml b/.github/actions/configure-keystore/action.yml index 6ae43416..f67bfaf9 100644 --- a/.github/actions/configure-keystore/action.yml +++ b/.github/actions/configure-keystore/action.yml @@ -24,7 +24,7 @@ runs: - name: Determine signing secret name shell: bash run: | - case "${{ inputs.environment }}" in + case "${{ inputs.target }}" in qa) SECRET_NAME="metamask-mobile-qa-signing-certificates" ;; From af1ea7af51fe2ceb6236dd08bd32b1ed3a713ec8 Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:12:03 +0200 Subject: [PATCH 68/77] chore: comment line --- .github/actions/setup-e2e-env/action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index f940ee4b..a9631fd8 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -187,15 +187,15 @@ runs: # Select Xcode version - name: Select Xcode version - if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'false' }} + if: ${{ inputs.platform == 'ios' }} run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app shell: bash # Select Xcode version - - name: Select Xcode version - if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'true' }} - run: sudo xcode-select -s /Library/Developer/CommandLineTools/Xcode_${{ inputs.xcode-version }}.app - shell: bash + # - name: Select Xcode version + # if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'false' }} + # run: sudo xcode-select -s /Library/Developer/CommandLineTools/Xcode_${{ inputs.xcode-version }}.app + # shell: bash # Restore CocoaPods cache # - name: Restore CocoaPods cache From 9c677131cdb45e659ab1bd0aad8a7e381974949e Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:34:53 +0200 Subject: [PATCH 69/77] chore: add code develop path --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index a9631fd8..8b455773 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -188,7 +188,7 @@ runs: # Select Xcode version - name: Select Xcode version if: ${{ inputs.platform == 'ios' }} - run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app/Contents/Developer shell: bash # Select Xcode version From 87877ab496795441211f808eaff07e426f07f8ad Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Tue, 5 Aug 2025 12:41:35 +0200 Subject: [PATCH 70/77] chore: now fail because can't find xcodebuild --- .github/actions/setup-e2e-env/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8b455773..cb1955fd 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -138,6 +138,11 @@ runs: "$FOUNDRY_BIN/foundryup" + # Select Xcode version + - name: Select Xcode version + if: ${{ inputs.platform == 'ios' }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app + ## IOS Setup ## - name: Configure iOS Signing Certificates if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }} From 48f952e2e66ebfa7b5b54f08def562e548ab263b Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Tue, 5 Aug 2025 12:46:05 +0200 Subject: [PATCH 71/77] chore: add shell removed by cursor --- .github/actions/setup-e2e-env/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index cb1955fd..a2cac8b4 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -142,6 +142,7 @@ runs: - name: Select Xcode version if: ${{ inputs.platform == 'ios' }} run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app + shell: bash ## IOS Setup ## - name: Configure iOS Signing Certificates From 72283754fd40867c4d6815c310908b0697a3fab7 Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Tue, 5 Aug 2025 13:12:54 +0200 Subject: [PATCH 72/77] chore: add conditional and point to the correct develop foler --- .github/actions/setup-e2e-env/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index a2cac8b4..e9aa1bbd 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -140,8 +140,8 @@ runs: # Select Xcode version - name: Select Xcode version - if: ${{ inputs.platform == 'ios' }} - run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app + if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'true' }} + run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app/Contents/Developer shell: bash ## IOS Setup ## From d942920a93ce6dcdb3d6dda729cdd878a393b121 Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Tue, 5 Aug 2025 13:29:23 +0200 Subject: [PATCH 73/77] chore: rollback to previous state without duplicated block --- .github/actions/setup-e2e-env/action.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index e9aa1bbd..8b455773 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -138,12 +138,6 @@ runs: "$FOUNDRY_BIN/foundryup" - # Select Xcode version - - name: Select Xcode version - if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'true' }} - run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app/Contents/Developer - shell: bash - ## IOS Setup ## - name: Configure iOS Signing Certificates if: ${{ inputs.platform == 'ios' && inputs.configure-keystores == 'true' }} From c9620dcc8b935f8d497f1fbe0bcc9266c0443800 Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Thu, 7 Aug 2025 14:47:09 +0200 Subject: [PATCH 74/77] chore: set true to install ruby 3.1 compatible version --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 8b455773..1f8c9db4 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -150,7 +150,7 @@ runs: ## Ruby Setup & Cache Management - name: Setup Ruby - if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'false' }} + if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'true' }} uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 with: ruby-version: ${{ inputs.ruby-version }} From 6fe7aea91552b1452140d4a1223834fe13915a5a Mon Sep 17 00:00:00 2001 From: Jake Perkins Date: Thu, 7 Aug 2025 20:03:24 -0500 Subject: [PATCH 75/77] bundler slef-host flag --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 1f8c9db4..b7bedbb7 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -209,7 +209,7 @@ runs: # Install CocoaPods w/ cached bundler environment - name: Install CocoaPods via bundler - if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'false' }} + if: ${{ inputs.platform == 'ios' }} run: bundle exec pod install --repo-update --verbose working-directory: ios shell: bash From f8b417abc1cb408b2999739ff768cf9eb8e3e601 Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Fri, 8 Aug 2025 10:18:20 +0200 Subject: [PATCH 76/77] chore: some clean up --- .github/actions/setup-e2e-env/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index b7bedbb7..dcc83c20 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -150,7 +150,7 @@ runs: ## Ruby Setup & Cache Management - name: Setup Ruby - if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'true' }} + if: ${{ inputs.platform == 'ios' }} uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 with: ruby-version: ${{ inputs.ruby-version }} From 11952a48142fa8139a58fb994729f8a228bb0ba3 Mon Sep 17 00:00:00 2001 From: Alejandro Som <560018+alucardzom@users.noreply.github.com> Date: Fri, 8 Aug 2025 11:33:57 +0200 Subject: [PATCH 77/77] chore: remove unused blocks --- .github/actions/setup-e2e-env/action.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index dcc83c20..a526ae97 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -76,10 +76,7 @@ inputs: description: 'target for which the keystore is being configured (e.g., qa, flask, main)' required: false default: 'qa' - is-self-hosted: - description: 'Whether the GitHub Actions runner is self-hosted' - required: false - default: 'false' + runs: using: 'composite' @@ -191,12 +188,6 @@ runs: run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app/Contents/Developer shell: bash - # Select Xcode version - # - name: Select Xcode version - # if: ${{ inputs.platform == 'ios' && inputs.is-self-hosted == 'false' }} - # run: sudo xcode-select -s /Library/Developer/CommandLineTools/Xcode_${{ inputs.xcode-version }}.app - # shell: bash - # Restore CocoaPods cache # - name: Restore CocoaPods cache # if: ${{ inputs.platform == 'ios'}}