diff --git a/.github/PERFORMANCE.md b/.github/PERFORMANCE.md index c234a7b60..2fe59e1b1 100644 --- a/.github/PERFORMANCE.md +++ b/.github/PERFORMANCE.md @@ -74,6 +74,8 @@ The app artifact includes base/head SHAs, suite hashes, Release configuration, architecture and toolchain metadata. iOS apps are tar archives to preserve permissions and symlinks. Gradle's basic cache is the sole Android cache owner; Gradle still checks source/task inputs, while exact app reuse is by artifact ID. +Ruby's setup action caches each checkout's benchmark gems using its own Gemfile.lock +and Ruby version. Identical revisions skip base gem setup along with the base build. There is no new iOS compiler cache. App reuse avoids build work on manual reruns. With 46 cases in each revision, a run uses 92 fresh processes (46 base + 46 head). Closer comparisons reduce time separation, but fixed base-first order can still diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index f8d7ca5fd..201f3b72d 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -247,10 +247,19 @@ jobs: - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2 with: bun-version: 1.3.14 - - uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 + - name: Set up Ruby and cache head gems + uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 with: ruby-version: 3.3.12 + bundler-cache: true working-directory: head/apps/benchmark + - name: Cache base gems + if: needs.prepare.outputs.base_sha != needs.prepare.outputs.head_sha + uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0 + with: + ruby-version: 3.3.12 + bundler-cache: true + working-directory: base/apps/benchmark - name: Select Xcode 26.5 run: sudo xcode-select -s /Applications/Xcode_26.5.app/Contents/Developer - name: Build and package exact simulator apps diff --git a/scripts/performance/build-ios.sh b/scripts/performance/build-ios.sh index 0209dbc0d..e81caa25a 100755 --- a/scripts/performance/build-ios.sh +++ b/scripts/performance/build-ios.sh @@ -3,7 +3,7 @@ set -euo pipefail cd "${1:?Usage: build-ios.sh [application-id]}" bun install --frozen-lockfile cd apps/benchmark -bundle install +bundle check || bundle install bun pods cd ios xcodebuild \