Skip to content

Harden CI and update vulnerable gems - #109

Merged
andiwand merged 2 commits into
modernize/02-conan-odr-indexfrom
modernize/03-ci-hardening
Jul 26, 2026
Merged

Harden CI and update vulnerable gems#109
andiwand merged 2 commits into
modernize/02-conan-odr-indexfrom
modernize/03-ci-hardening

Conversation

@andiwand

Copy link
Copy Markdown
Member

Stacked on #108.

CI only ever built the simulator slice of one configuration, so Release-only and device-only breakage surfaced at deploy time. It also rebuilt every conan package from scratch on every run.

Changes

Coverage

  • New build job compiles both flavors for iphoneos in their release configurations (ODR Full/Release, ODR Lite/Release Lite). Signing needs secrets this workflow does not have, so it runs with CODE_SIGNING_ALLOWED=NO and only proves the device slice compiles and links.

Speed

  • Cache ~/.conan2/p, keyed on the conan-odr-index commit plus conan/conanfile.py and the profiles. Restored before the recipe export so current recipes win over stale ones from the archive, and conan cache clean "*" runs before the save — same shape droid uses.
  • ruby/setup-ruby with bundler-cache: true instead of gem install bundler && bundle install cold every run.
  • The tests lane no longer calls clear_derived_data or reset_simulator. Runners start clean anyway, and locally it just threw away the incremental build of a C++-heavy project.

Currency

  • macos-14 + Xcode 16.2 → macos-26 + Xcode 26.0.1. Pinned to 26.0.1 specifically because that is the Xcode this stack was verified against locally; bumping further is a one-line change.

  • bundle update, clearing all four open dependabot alerts:

    gem before after patched at
    addressable 2.8.7 2.9.0 2.9.0
    excon 0.112.0 1.6.0 1.5.0
    faraday 1.10.5 1.10.6 1.10.6
    jwt 2.10.1 3.2.0 2.10.3

    fastlane goes 2.227.2 → 2.237.0 as a result, which regenerates fastlane/README.md.

  • Pin fastlane in the Gemfile, add .ruby-version, add the runner platforms to the lockfile.

  • Add .github/dependabot.yml (bundler, github-actions, cocoapods).

Verification

  • bundle exec fastlane tests locally on fastlane 2.237.0: 1 test, 0 failures.
  • Both device release builds run locally, exactly as the new build job invokes them: ODR Full/Release and ODR Lite/Release Lite for -sdk iphoneosBUILD SUCCEEDED.
  • Workflow and dependabot YAML parse clean.

Not included

SwiftLint. Adding it now would either fail on the existing code or be configured so loosely nobody reads it — it lands after the code cleanup PR later in this stack.

The pipeline only ever built the simulator slice of one configuration, so
anything that breaks in Release or on device surfaced at deploy time. It
also rebuilt every conan package from scratch on every run.

- add a build job that compiles both flavors for iphoneos in their release
  configurations. Signing needs secrets this workflow does not have, so it
  builds with CODE_SIGNING_ALLOWED=NO and only proves things compile and link
- cache ~/.conan2/p keyed on the conan-odr-index commit plus conanfile and
  profiles, restored before the recipe export so current recipes win over
  stale ones from the archive
- ruby/setup-ruby with bundler-cache instead of installing bundler and all
  gems from scratch every run
- macos-14 and Xcode 16.2 were about two Xcode majors behind. Pinned to
  Xcode 26.0.1 on macos-26, matching what this was verified against locally
- bundle update, which clears the four open dependabot alerts:
  addressable 2.8.7 -> 2.9.0, excon 0.112.0 -> 1.6.0, faraday 1.10.5 ->
  1.10.6, jwt 2.10.1 -> 3.2.0, pulling fastlane 2.227.2 -> 2.237.0
- pin fastlane, add .ruby-version and the runner platforms to the lockfile
- add dependabot config so gems and actions stay current

The tests lane no longer clears derived data or resets the simulator. CI
runners start clean and locally it only threw away the incremental build
of a C++ heavy project.
ruby/setup-ruby installs with frozen mode on. The lockfile still carried a
RUBY VERSION entry from an earlier iteration of the Gemfile, so bundler
wanted to rewrite it and refused.

The clean conan cache steps also ran on failure, where conan is not
installed yet, turning any earlier failure into a confusing
'conan: command not found'.
@andiwand
andiwand merged commit 170ce1f into modernize/02-conan-odr-index Jul 26, 2026
0 of 3 checks passed
@andiwand
andiwand deleted the modernize/03-ci-hardening branch July 26, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant