Skip to content

Commit

Permalink
Successfully setup iOS CircleCI config.yml
Browse files Browse the repository at this point in the history
- Added:
  - spm cache
  - yml config steps
  - Gemfile and Fastfile
  - set environment
  - checked in Package.resolved
  - SourcePackaged dir

Signed-off-by: kcw-grunt <mrkerrywashington@icloud.com>
  • Loading branch information
kcw-grunt committed Dec 26, 2024
1 parent ea30e2e commit 6459e07
Show file tree
Hide file tree
Showing 11 changed files with 810 additions and 53 deletions.
114 changes: 97 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,132 @@
# .circleci/config.yml
# ...
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/2.0/configuration-reference
version: 2.1
orbs:
macos: circleci/macos@2
steps:
- macos/switch-ruby:
version: "3.1"
version: 2.1

jobs:
build-and-test:
macos:
xcode: 14.0.1
xcode: 15.3.0
#parallelism: 2 Does not work of open source macOS
resource_class: macos.m1.medium.gen1
working_directory: ~/litewallet-ios/
environment:
FL_OUTPUT_DIR: output
FASTLANE_LANE: test
FASTLANE_LANE: all_unit_tests
shell: /bin/bash --login -o pipefail
steps:
- checkout
- run: bundle install
- run:
name: "Initialize submodule(s)"
command: "git submodule init && git submodule update --init --recursive"
- run:
name: "Setup env files"
command: |
echo 'export $GOOGLE_SERVICES_PLIST="$GOOGLE_SERVICES_PLIST"' >> $BASH_ENV
echo "$GOOGLE_SERVICES_PLIST" | base64 --decode > litewallet/GoogleService-Info.plist
echo 'export $REMOTE_CONFIG_DEFAULTS="$REMOTE_CONFIG_DEFAULTS"' >> $BASH_ENV
echo "$REMOTE_CONFIG_DEFAULTS" | base64 --decode > litewallet/remote-config-defaults.plist
echo 'export $DEBUG_PARTNER_KEYS="$DEBUG_PARTNER_KEYS"' >> $BASH_ENV
echo "$DEBUG_PARTNER_KEYS" | base64 --decode > litewallet/partner-keys.plist
- restore_cache:
name: Restore SPM Cache
keys:
- spm-cache-{{ checksum "Package.resolved" }}
- run:
name: Install Bundler
command: gem install bundler:1.17.2; bundle update --bundler; bundle install
- run:
name: Fastlane
command: bundle exec fastlane $FASTLANE_LANE
- save_cache:
name: Save SPM Cache
key: spm-cache-{{ checksum "Package.resolved" }}
paths:
- SourcePackages/
- store_artifacts:
path: output
- store_test_results:
path: output/scan

adhoc:
beta:
macos:
xcode: 14.0.1
working_directory: ~/litewallet-ios/
environment:
FL_OUTPUT_DIR: output
FASTLANE_LANE: adhoc
FASTLANE_LANE: beta
shell: /bin/bash --login -o pipefail
steps:
- checkout
- run: bundle install
- run:
name: Fastlane
command: bundle exec fastlane $FASTLANE_LANE
command: cd ios; bundle exec fastlane $FASTLANE_LANE
- store_artifacts:
path: output
path: output/litewallet.ipa

workflows:
build-test-adhoc:
version: 2
build-test:
jobs:
- build-and-test
- adhoc:
- beta:
filters:
branches:
only: development
only: develop
requires:
- build-and-test
- build-and-test






# ////////////////////////////b3b495cc-b860-4193-a60a-edd1ad305325//////////////////////
# ////////////////////Failed: GEMFILE NOT FOUND //////////////////////////
# version: 2.1
# jobs:
# build-and-test:
# macos:
# xcode: 14.0.1
# environment:
# FL_OUTPUT_DIR: output
# FASTLANE_LANE: test
# steps:
# - checkout
# - run: bundle install
# - run:
# name: Fastlane
# command: bundle exec fastlane $FASTLANE_LANE
# - store_artifacts:
# path: output
# - store_test_results:
# path: output/scan
#
# adhoc:
# macos:
# xcode: 14.0.1
# environment:
# FL_OUTPUT_DIR: output
# FASTLANE_LANE: adhoc
# steps:
# - checkout
# - run: bundle install
# - run:
# name: Fastlane
# command: bundle exec fastlane $FASTLANE_LANE
# - store_artifacts:
# path: output
#
# workflows:
# build-test-adhoc:
# jobs:
# - build-and-test
# - adhoc:
# filters:
# branches:
# only: development
# requires:
# - build-and-test
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ xcuserdata/
# Swift Package Manager
Packages/
Package.pins
Package.resolved
.build/

# Add this line if you want to avoid checking in Xcode SPM integration.
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

SourcePackages/

# SwiftFormat
BuildTools/.build
Expand Down
16 changes: 16 additions & 0 deletions BuildTools/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "SwiftFormat",
"repositoryURL": "https://github.com/nicklockwood/SwiftFormat",
"state": {
"branch": null,
"revision": "da637c398c5d08896521b737f2868ddc2e7996ae",
"version": "0.50.6"
}
}
]
},
"version": 1
}
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source 'https://rubygems.org'


gem 'rb-readline'
gem 'fastlane'

ruby '3.3.0'
Loading

0 comments on commit 6459e07

Please sign in to comment.