Skip to content

Commit

Permalink
Merge branch 'fastlane:master' into update-csr-to-sha256
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysoffian committed Jan 26, 2024
2 parents 1542109 + 14037c6 commit 2769669
Show file tree
Hide file tree
Showing 356 changed files with 8,908 additions and 1,616 deletions.
5 changes: 5 additions & 0 deletions .ci/bundler_version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env ruby
file = File.join(__dir__, "..", "Gemfile.lock")
lines = File.read(file).split("\n")
idx = lines.index { |l| l == "BUNDLED WITH" }
puts lines[idx + 1].strip
27 changes: 27 additions & 0 deletions .ci/compatible_gem_version
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env ruby
#
# prints out the latest version number of the gem compatible with the given version of ruby
#
require 'net/http'
require 'json'

GEM_TO_TEST = "rubygems-update"

if ARGV.count > 0
RUBY_VERSION_TO_MATCH = ARGV[0]
else
RUBY_VERSION_TO_MATCH = RUBY_VERSION
end

API_URL = "https://rubygems.org/api/v1/versions/#{GEM_TO_TEST}.json"

# Load list of all available versions of GEM_TO_TEST
gem_versions = JSON.parse(Net::HTTP.get(URI(API_URL)))

# Process list to find matching Ruby version
matching_gem = gem_versions.find { |gem|
Gem::Dependency.new('', gem['ruby_version']).
match?('', RUBY_VERSION_TO_MATCH)
}

puts matching_gem['number']
80 changes: 50 additions & 30 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

version: 2.1
orbs:
shellcheck: circleci/shellcheck@2.2.2 # brew install shellcheck stopped working so using this
shellcheck: circleci/shellcheck@2.2.2 # brew install shellcheck stopped working so using this
macos: circleci/macos@2

aliases:
- &important-branches
Expand Down Expand Up @@ -50,21 +51,15 @@ aliases:
paths:
- "~/.cache/rubocop_cache"

- &set_ruby
run:
name: Set Ruby version
command: | # see https://circleci.com/docs/2.0/testing-ios/#using-ruby
echo "ruby-${_RUBY_VERSION}" > ~/.ruby-version
# https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-shell-command
echo 'chruby ruby-${_RUBY_VERSION}' >> $BASH_ENV
- &bundle_install
run:
name: bundle install
command: |
sudo gem update --system `.ci/compatible_gem_version`
gem install bundler -v $(cat Gemfile.lock | tail -1 | tr -d " ")
bundle config set --local path .bundle
bundle check || bundle install --jobs=4 --retry=3
bundle env
jobs:
tests_macos: &tests_macos_base
Expand All @@ -83,14 +78,14 @@ jobs:
CIRCLE_TEST_REPORTS: '~/test-reports'
LC_ALL: 'en_US.UTF-8'
LANG: 'en_US.UTF-8'
_RUBY_VERSION: << parameters.ruby_version >>
shell: '/bin/bash --login -eo pipefail'
steps:
- *cache_restore_git
- checkout
- *cache_save_git
- *cache_restore_bundler
- *set_ruby
- macos/switch-ruby:
version: << parameters.ruby_version >>
- run:
name: debug | ruby version
command: |
Expand Down Expand Up @@ -132,15 +127,17 @@ jobs:

tests_ubuntu:
parameters:
ruby_version:
image:
type: string
ruby_version: # Used when restoring/saving bundler cache
type: string
environment:
CIRCLE_TEST_REPORTS: '~/test-reports'
LC_ALL: 'C.UTF-8'
LANG: 'C.UTF-8'
FASTLANE_ITUNES_TRANSPORTER_PATH: .bundle
docker:
- image: << parameters.ruby_version >>
- image: << parameters.image >>
steps:
- *cache_restore_git
- checkout
Expand Down Expand Up @@ -178,7 +175,8 @@ jobs:
- checkout
- *cache_save_git
- *cache_restore_bundler
- *set_ruby
- macos/switch-ruby:
version: << parameters.ruby_version >>
- *bundle_install
- *cache_save_bundler
- run:
Expand All @@ -198,10 +196,12 @@ jobs:

validate_documentation:
parameters:
ruby_version:
image:
type: string
ruby_version: # Used when restoring/saving bundler cache
type: string
docker:
- image: << parameters.ruby_version >>
- image: << parameters.image >>
steps:
- *cache_restore_git
- checkout
Expand All @@ -211,18 +211,20 @@ jobs:
- run:
name: Setup Build
command: |
gem update --system
gem update --system `.ci/compatible_gem_version`
- *bundle_install
- *cache_save_bundler

- run: bundle exec fastlane validate_docs

lint_source_code:
parameters:
ruby_version:
image:
type: string
ruby_version: # Used when restoring/saving bundler cache
type: string
docker:
- image: << parameters.ruby_version >>
- image: << parameters.image >>
steps:
- *cache_restore_git
- checkout
Expand All @@ -235,13 +237,13 @@ jobs:

modules_load_up_tests:
parameters:
ruby_version:
image:
type: string
environment:
LC_ALL: C.UTF-8
LANG: C.UTF-8
docker:
- image: << parameters.ruby_version >>
- image: << parameters.image >>
shell: /bin/bash --login -eo pipefail
steps:
- *cache_restore_git
Expand All @@ -258,7 +260,7 @@ jobs:

workflows:
version: 2
build:
"Run Tests & Checks": # Name of the workflow, which ends up displayed on GitHub's PR Check
jobs:
- tests_macos:
name: 'Execute tests on macOS (Xcode 12.5.1, Ruby 2.6)'
Expand All @@ -285,26 +287,44 @@ workflows:
- tests_macos:
name: 'Execute tests on macOS (Xcode 14.3.1, Ruby 3.1)'
xcode_version: '14.3.1'
ruby_version: '3.1.4'
ruby_version: '3.1'
ruby_opt: -W:deprecated
- tests_macos:
name: 'Execute tests on macOS (Xcode 15.0.1, Ruby 3.1)'
xcode_version: '15.0.1'
ruby_version: '3.1'
ruby_opt: -W:deprecated
- tests_macos:
name: 'Execute tests on macOS (Xcode 14.3.1, Ruby 3.2)'
xcode_version: '14.3.1'
ruby_version: '3.2'
ruby_opt: -W:deprecated
- tests_macos:
name: 'Execute tests on macOS (Xcode 15.0.1, Ruby 3.2)'
xcode_version: '15.0.1'
ruby_version: '3.2'
ruby_opt: -W:deprecated
- tests_macos:
name: 'Execute tests on macOS (Xcode 15.0.0, Ruby 3.1)'
xcode_version: '15.0.0'
ruby_version: '3.1.4'
name: 'Execute tests on macOS (Xcode 15.2.0, Ruby 3.2)'
xcode_version: '15.2.0'
ruby_version: '3.2'
ruby_opt: -W:deprecated
- tests_ubuntu:
name: 'Execute tests on Ubuntu'
ruby_version: 'fastlanetools/ci:0.3.0'
image: 'fastlanetools/ci:0.3.0'
ruby_version: '2.6'
- validate_fastlane_swift_generation:
name: 'Validate Fastlane.swift generation'
xcode_version: '12.5.1'
ruby_version: '2.7'
- validate_documentation:
name: 'Validate Documentation'
ruby_version: 'fastlanetools/ci:0.3.0'
image: 'cimg/ruby:3.2.2'
ruby_version: '3.2'
- lint_source_code:
name: 'Lint source code'
ruby_version: 'cimg/ruby:2.6'
image: 'cimg/ruby:2.6'
ruby_version: '2.6'
- modules_load_up_tests:
name: 'Modules load up tests'
ruby_version: 'cimg/ruby:2.6'
image: 'cimg/ruby:2.6'
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "bundler"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
103 changes: 103 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Configuration file for https://github.com/actions/labeler

"tool: action":
- changed-files:
- any-glob-to-any-file:
- fastlane/lib/fastlane/actions/**/*

"tool: cert":
- changed-files:
- any-glob-to-any-file:
- cert/**/*

"tool: deliver":
- changed-files:
- any-glob-to-any-file:
- deliver/**/*

"tool: fastlane_core":
- changed-files:
- any-glob-to-any-file:
- fastlane_core/**/*

"tool: frameit":
- changed-files:
- any-glob-to-any-file:
- frameit/**/*

"tool: gym":
- changed-files:
- any-glob-to-any-file:
- gym/**/*

"tool: match":
- changed-files:
- any-glob-to-any-file:
- match/**/*

"tool: pem":
- changed-files:
- any-glob-to-any-file:
- pem/**/*

"tool: pilot":
- changed-files:
- any-glob-to-any-file:
- pilot/**/*

"tool: precheck":
- changed-files:
- any-glob-to-any-file:
- precheck/**/*

"tool: produce":
- changed-files:
- any-glob-to-any-file:
- produce/**/*

"tool: scan":
- changed-files:
- any-glob-to-any-file:
- scan/**/*

"tool: screengrab":
- changed-files:
- any-glob-to-any-file:
- screengrab/**/*

"tool: sigh":
- changed-files:
- any-glob-to-any-file:
- sigh/**/*

"tool: snapshot":
- changed-files:
- any-glob-to-any-file:
- snapshot/**/*

"tool: spaceship":
- changed-files:
- any-glob-to-any-file:
- spaceship/**/*

"tool: supply":
- changed-files:
- any-glob-to-any-file:
- supply/**/*

"topic: swift":
- changed-files:
- any-glob-to-any-file:
- fastlane/swift/**/*

"tool: trainer":
- changed-files:
- any-glob-to-any-file:
- trainer/**/*

"type: ci":
- changed-files:
- any-glob-to-any-file:
- .github/**/*
- .circleci/**/*
- appveyor.yml
20 changes: 20 additions & 0 deletions .github/workflows/announce_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Process release
on:
release:
types:
- published

jobs:
announce-release-on-released-pull-requests:
name: Announce release on released pull requests
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@master
with:
ref: refs/heads/master
- name: Announce release on released pull requests
uses: fastlane/github-actions/communicate-on-pull-request-released@latest
with:
repo-token: '${{ secrets.BOT_GITHUB_TOKEN }}'
22 changes: 22 additions & 0 deletions .github/workflows/deploy_to_rubygems.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Deploy to RubyGems
on:
release:
types:
- published

jobs:
deploy-to-rubygems:
name: Deploy to RubyGems
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: '3.2'
- uses: rubygems/release-gem@v1

0 comments on commit 2769669

Please sign in to comment.