From 8fcd032e004b191b276a92dfc8f6b19d7e87d102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:29:53 +0100 Subject: [PATCH 01/11] vagrant user --- .github/actions/setup-e2e-env/action.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 1763bef7..cad1ff59 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -89,6 +89,13 @@ runs: - run: echo "Setup E2E Environment started" shell: bash + # Set user path for Bitrise vagrant user + - name: Set user paths for Bitrise runner + run: | + echo "USER_HOME=/Users/vagrant" >> "$GITHUB_ENV" + echo "Using hardcoded vagrant user path: /Users/vagrant" + shell: bash + ## Android Setup (early for fail-fast) ## # Set Android environment variables (self-hosted runner has SDK pre-installed) @@ -146,8 +153,8 @@ runs: if: ${{ inputs.platform == 'android'}} shell: bash run: | - echo "ANDROID_AVD_HOME=$HOME/.android/avd" >> "$GITHUB_ENV" - mkdir -p "$HOME/.android/avd" + echo "ANDROID_AVD_HOME=$USER_HOME/.android/avd" >> "$GITHUB_ENV" + mkdir -p "$USER_HOME/.android/avd" - name: Create Android Virtual Device (AVD) if: ${{ inputs.platform == 'android'}} @@ -223,7 +230,7 @@ runs: run: | echo "Installing Foundry via foundryup..." - export FOUNDRY_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/.foundry" + export FOUNDRY_DIR="${XDG_CONFIG_HOME:-$USER_HOME/.config}/.foundry" export FOUNDRY_BIN="$FOUNDRY_DIR/bin" mkdir -p "$FOUNDRY_BIN" From 1740194387ae521c4dccf2074c5c33c894762119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:36:01 +0100 Subject: [PATCH 02/11] vagrant user --- .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 cad1ff59..5b42636d 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -93,6 +93,7 @@ runs: - name: Set user paths for Bitrise runner run: | echo "USER_HOME=/Users/vagrant" >> "$GITHUB_ENV" + echo "HOME=/Users/vagrant" >> "$GITHUB_ENV" echo "Using hardcoded vagrant user path: /Users/vagrant" shell: bash From 83455390dac6c1b7946f9e6fb47ac74fec567e0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:37:52 +0100 Subject: [PATCH 03/11] vagrant user --- .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 5b42636d..2875018c 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -94,6 +94,11 @@ runs: run: | echo "USER_HOME=/Users/vagrant" >> "$GITHUB_ENV" echo "HOME=/Users/vagrant" >> "$GITHUB_ENV" + echo "RUNNER_TOOL_CACHE=/Users/vagrant/hostedtoolcache" >> "$GITHUB_ENV" + echo "RUNNER_TEMP=/Users/vagrant/tmp" >> "$GITHUB_ENV" + # Create the directories if they don't exist + mkdir -p /Users/vagrant/hostedtoolcache + mkdir -p /Users/vagrant/tmp echo "Using hardcoded vagrant user path: /Users/vagrant" shell: bash From c9d60ff8833dd43c32180b827435280c3a339ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:41:05 +0100 Subject: [PATCH 04/11] try ruby stuff --- .github/actions/setup-e2e-env/action.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2875018c..a76d6ff3 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -251,19 +251,19 @@ runs: ## IOS Setup ## ## Ruby Setup & Cache Management - - name: Setup Ruby + - name: Setup Ruby (use system Ruby for vagrant user) if: ${{ inputs.platform == 'ios' }} - uses: ruby/setup-ruby@a4effe49ee8ee5b8b5091268c473a4628afb5651 - with: - ruby-version: ${{ inputs.ruby-version }} - - # Install Bundler first - - name: Install bundler - if: ${{ inputs.platform == 'ios' }} - run: gem install bundler -v ${{ inputs.bundler-version }} - working-directory: ios + run: | + # Use system Ruby instead of ruby/setup-ruby action to avoid permission issues + echo "Using system Ruby for vagrant user" + ruby --version + gem --version + # Install bundler globally + gem install bundler -v ${{ inputs.bundler-version }} shell: bash + # Install Bundler first (now handled in Ruby setup step above) + # Restore cached Ruby gems - name: Restore Bundler cache if: ${{ inputs.platform == 'ios' }} @@ -291,7 +291,6 @@ runs: - name: Generate binstubs for CocoaPods if: ${{ inputs.platform == 'ios' }} run: bundle binstubs cocoapods --force --path=vendor/bundle/bin - working-directory: ios shell: bash From 2cd4ab19adc0ee418ffddb65a4a56ab584d97fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:43:07 +0100 Subject: [PATCH 05/11] try ruby stuff --- .github/actions/setup-e2e-env/action.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index a76d6ff3..01f4dfdf 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -256,6 +256,17 @@ runs: run: | # Use system Ruby instead of ruby/setup-ruby action to avoid permission issues echo "Using system Ruby for vagrant user" + + # Check if rbenv is being used and install required Ruby version + if command -v rbenv &> /dev/null; then + echo "rbenv detected, installing Ruby ${{ inputs.ruby-version }}" + # Install the required Ruby version if not already installed + rbenv install -s ${{ inputs.ruby-version }} + rbenv global ${{ inputs.ruby-version }} + # Reload rbenv + eval "$(rbenv init -)" + fi + ruby --version gem --version # Install bundler globally From 7492c2cafbe3e29a5f680ee843dda23f770d1a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:45:00 +0100 Subject: [PATCH 06/11] try ruby stuff --- .github/actions/setup-e2e-env/action.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 01f4dfdf..7f79e458 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -260,9 +260,16 @@ runs: # Check if rbenv is being used and install required Ruby version if command -v rbenv &> /dev/null; then echo "rbenv detected, installing Ruby ${{ inputs.ruby-version }}" + # Use full version number for rbenv install + RUBY_FULL_VERSION="${{ inputs.ruby-version }}" + # If version is just "3.1", use latest patch version + if [ "$RUBY_FULL_VERSION" = "3.1" ]; then + RUBY_FULL_VERSION="3.1.7" + fi + echo "Installing Ruby version: $RUBY_FULL_VERSION" # Install the required Ruby version if not already installed - rbenv install -s ${{ inputs.ruby-version }} - rbenv global ${{ inputs.ruby-version }} + rbenv install -s "$RUBY_FULL_VERSION" + rbenv global "$RUBY_FULL_VERSION" # Reload rbenv eval "$(rbenv init -)" fi From 6494330108750f3140a01f1ebf269792d4f50eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:47:56 +0100 Subject: [PATCH 07/11] try ruby stuff --- .github/actions/setup-e2e-env/action.yml | 26 ++++++++++++++---------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 7f79e458..2ecd304d 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -257,19 +257,23 @@ runs: # Use system Ruby instead of ruby/setup-ruby action to avoid permission issues echo "Using system Ruby for vagrant user" - # Check if rbenv is being used and install required Ruby version + # Check if rbenv is being used and set Ruby version if command -v rbenv &> /dev/null; then - echo "rbenv detected, installing Ruby ${{ inputs.ruby-version }}" - # Use full version number for rbenv install - RUBY_FULL_VERSION="${{ inputs.ruby-version }}" - # If version is just "3.1", use latest patch version - if [ "$RUBY_FULL_VERSION" = "3.1" ]; then - RUBY_FULL_VERSION="3.1.7" + echo "rbenv detected, checking available Ruby versions" + rbenv versions + + # Map requested version to available version on Bitrise stack + REQUESTED_VERSION="${{ inputs.ruby-version }}" + if [ "$REQUESTED_VERSION" = "3.1" ]; then + # Ruby 3.1 not available on Bitrise, use Ruby 3.2 (closest available) + RUBY_VERSION="3.2" + echo "Ruby 3.1 not available, using Ruby 3.2 instead" + else + RUBY_VERSION="$REQUESTED_VERSION" fi - echo "Installing Ruby version: $RUBY_FULL_VERSION" - # Install the required Ruby version if not already installed - rbenv install -s "$RUBY_FULL_VERSION" - rbenv global "$RUBY_FULL_VERSION" + + echo "Setting Ruby version to: $RUBY_VERSION" + rbenv global "$RUBY_VERSION" # Reload rbenv eval "$(rbenv init -)" fi From 00182a502eb1a8ecd3e6c8e359420a9568110f32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:50:12 +0100 Subject: [PATCH 08/11] try ruby stuff --- .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 2ecd304d..1c62656d 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -265,9 +265,18 @@ runs: # Map requested version to available version on Bitrise stack REQUESTED_VERSION="${{ inputs.ruby-version }}" if [ "$REQUESTED_VERSION" = "3.1" ]; then - # Ruby 3.1 not available on Bitrise, use Ruby 3.2 (closest available) - RUBY_VERSION="3.2" - echo "Ruby 3.1 not available, using Ruby 3.2 instead" + # Use the available 3.1.7 version + RUBY_VERSION="3.1.7" + echo "Using available Ruby 3.1.7" + elif [ "$REQUESTED_VERSION" = "3.2" ]; then + RUBY_VERSION="3.2.9" + echo "Using available Ruby 3.2.9" + elif [ "$REQUESTED_VERSION" = "3.3" ]; then + RUBY_VERSION="3.3.9" + echo "Using available Ruby 3.3.9" + elif [ "$REQUESTED_VERSION" = "3.4" ]; then + RUBY_VERSION="3.4.5" + echo "Using available Ruby 3.4.5" else RUBY_VERSION="$REQUESTED_VERSION" fi From 90100fc28253e716e20fd466838e6dfc9934edac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:52:00 +0100 Subject: [PATCH 09/11] try ruby stuff --- .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 1c62656d..2876d32f 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -282,6 +282,12 @@ runs: fi echo "Setting Ruby version to: $RUBY_VERSION" + # Remove any local .ruby-version file that might conflict + if [ -f ".ruby-version" ]; then + echo "Found .ruby-version file, backing it up and updating it" + cp .ruby-version .ruby-version.backup + echo "$RUBY_VERSION" > .ruby-version + fi rbenv global "$RUBY_VERSION" # Reload rbenv eval "$(rbenv init -)" From e0dca4237a5364095763415a8c34e8eaf0d3d5b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Fri, 24 Oct 2025 13:54:35 +0100 Subject: [PATCH 10/11] try xcode stuff --- .github/actions/setup-e2e-env/action.yml | 27 +++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2876d32f..2673ed9a 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -357,7 +357,32 @@ runs: # Select Xcode version - name: Select Xcode version if: ${{ inputs.platform == 'ios' }} - run: sudo xcode-select -s /Applications/Xcode_${{ inputs.xcode-version }}.app + run: | + # Check available Xcode versions + echo "Available Xcode versions:" + ls -la /Applications/ | grep -i xcode || echo "No Xcode apps found in /Applications/" + + # Try to find the correct Xcode path + REQUESTED_VERSION="${{ inputs.xcode-version }}" + if [ -d "/Applications/Xcode_${REQUESTED_VERSION}.app" ]; then + XCODE_PATH="/Applications/Xcode_${REQUESTED_VERSION}.app" + elif [ -d "/Applications/Xcode.app" ]; then + XCODE_PATH="/Applications/Xcode.app" + echo "Using default Xcode.app since Xcode_${REQUESTED_VERSION}.app not found" + else + # Find any available Xcode version + XCODE_PATH=$(find /Applications -name "Xcode*.app" -type d | head -1) + if [ -n "$XCODE_PATH" ]; then + echo "Using available Xcode: $XCODE_PATH" + else + echo "No Xcode installation found" + exit 1 + fi + fi + + echo "Setting Xcode path to: $XCODE_PATH" + sudo xcode-select -s "$XCODE_PATH" + xcode-select -p shell: bash # Restore CocoaPods cache From 4f960df7be2137d27b372553616b7b8862f7fa41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o?= Date: Tue, 28 Oct 2025 10:53:59 +0000 Subject: [PATCH 11/11] ruby --- .github/actions/setup-e2e-env/action.yml | 57 ++++++++++++++++-------- 1 file changed, 39 insertions(+), 18 deletions(-) diff --git a/.github/actions/setup-e2e-env/action.yml b/.github/actions/setup-e2e-env/action.yml index 2673ed9a..5c6406c3 100644 --- a/.github/actions/setup-e2e-env/action.yml +++ b/.github/actions/setup-e2e-env/action.yml @@ -28,7 +28,7 @@ inputs: ruby-version: description: Ruby version to use (only for iOS) required: false - default: '3.1' + default: '3.2' xcode-version: description: Xcode version to select (e.g., 16.3) required: false @@ -264,27 +264,48 @@ runs: # Map requested version to available version on Bitrise stack REQUESTED_VERSION="${{ inputs.ruby-version }}" - if [ "$REQUESTED_VERSION" = "3.1" ]; then - # Use the available 3.1.7 version - RUBY_VERSION="3.1.7" - echo "Using available Ruby 3.1.7" - elif [ "$REQUESTED_VERSION" = "3.2" ]; then - RUBY_VERSION="3.2.9" - echo "Using available Ruby 3.2.9" - elif [ "$REQUESTED_VERSION" = "3.3" ]; then - RUBY_VERSION="3.3.9" - echo "Using available Ruby 3.3.9" - elif [ "$REQUESTED_VERSION" = "3.4" ]; then - RUBY_VERSION="3.4.5" - echo "Using available Ruby 3.4.5" - else - RUBY_VERSION="$REQUESTED_VERSION" + + # Check if .ruby-version file exists and has a full version + if [ -f ".ruby-version" ]; then + EXISTING_VERSION=$(cat .ruby-version | tr -d '\n' | tr -d ' ') + echo "Found .ruby-version file with version: $EXISTING_VERSION" + + # Check if the version from .ruby-version is available + if rbenv versions --bare | grep -q "^${EXISTING_VERSION}$"; then + RUBY_VERSION="$EXISTING_VERSION" + echo "Using Ruby version from .ruby-version: $RUBY_VERSION" + else + echo "Ruby $EXISTING_VERSION from .ruby-version is not installed" + echo "Available versions:" + rbenv versions + # Fall back to mapping logic below + fi + fi + + # If RUBY_VERSION not set, map requested version to available + if [ -z "$RUBY_VERSION" ]; then + if [ "$REQUESTED_VERSION" = "3.1" ]; then + RUBY_VERSION="3.2.9" + echo "Mapping 3.1 -> 3.2.9 (3.1.x not available)" + elif [ "$REQUESTED_VERSION" = "3.2" ]; then + RUBY_VERSION="3.2.9" + echo "Using available Ruby 3.2.9" + elif [ "$REQUESTED_VERSION" = "3.3" ]; then + RUBY_VERSION="3.3.9" + echo "Using available Ruby 3.3.9" + elif [ "$REQUESTED_VERSION" = "3.4" ]; then + RUBY_VERSION="3.4.5" + echo "Using available Ruby 3.4.5" + else + RUBY_VERSION="$REQUESTED_VERSION" + fi fi echo "Setting Ruby version to: $RUBY_VERSION" - # Remove any local .ruby-version file that might conflict + + # Update .ruby-version file to ensure consistency if [ -f ".ruby-version" ]; then - echo "Found .ruby-version file, backing it up and updating it" + echo "Backing up and updating .ruby-version file" cp .ruby-version .ruby-version.backup echo "$RUBY_VERSION" > .ruby-version fi