Skip to content

Commit

Permalink
Merge pull request #266 from adobe/staging
Browse files Browse the repository at this point in the history
Staging to main for 5.0.0 release
  • Loading branch information
sbenedicadb committed Mar 21, 2024
2 parents c86b0a0 + 7ddee1b commit fc9175b
Show file tree
Hide file tree
Showing 139 changed files with 11,168 additions and 2,888 deletions.
69 changes: 32 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
version: 2.1

orbs:
codecov: codecov/codecov@3.2.5
# codecov: codecov/codecov@3.3.0
macos: circleci/macos@2

workflows:
Expand Down Expand Up @@ -40,38 +40,26 @@ commands:
paths:
- vendor/bundle

# restore pods related caches
- restore_cache:
name: Restore CocoaPods Cache
keys:
- cocoapods-cache-v5-{{ arch }}-{{ .Branch }}-{{ checksum "Podfile.lock" }}
- cocoapods-cache-v5-{{ arch }}-{{ .Branch }}
- cocoapods-cache-v5

# install CocoaPods - using default CocoaPods version, not the bundle
- run:
name: Repo Update & Install CocoaPods
command: make ci-pod-install

# save pods related files
- save_cache:
name: Save CocoaPods Cache
key: cocoapods-cache-v5-{{ arch }}-{{ .Branch }}-{{ checksum "Podfile.lock" }}
paths:
- ./Pods
- ~/.cocoapods
- run:
name: Install xcodegen
command: brew install xcodegen

prestart_ios_simulator:
steps:
- macos/preboot-simulator:
platform: "iOS"
version: "16.1"
device: "iPhone 14"
version: "17.2"
device: "iPhone 15"

jobs:
validate-code:
macos:
xcode: 14.1.0 # Specify the Xcode version to use
xcode: 15.1.0 # Specify the Xcode version to use

steps:
- checkout
Expand All @@ -88,7 +76,7 @@ jobs:

test-ios:
macos:
xcode: 14.1.0 # Specify the Xcode version to use
xcode: 15.1.0 # Specify the Xcode version to use

steps:
- checkout
Expand All @@ -98,40 +86,47 @@ jobs:
- prestart_ios_simulator

- run:
name: Run AEPMessaging Tests
command: make test
name: Run Unit Tests
command: make unit-test

# Code coverage upload using Codecov
# See options explanation here: https://docs.codecov.com/docs/codecov-uploader
- codecov/upload:
flags: aepmessaging-ios-tests
upload_name: Coverage Report for AEPMessaging iOS Tests
xtra_args: -c -v --xc --xp ./build/AEPMessaging.xcresult
# - codecov/upload:
# flags: aepmessaging-ios-tests
# upload_name: Coverage Report for AEPMessaging iOS Tests
# xtra_args: -c -v --xc --xp ./build/AEPMessaging.xcresult

- run:
name: Run Functional Tests
command: make functional-test
when: always # run even if unit tests fail

test-spm-podspec-archive:
macos:
xcode: 14.1.0 # Specify the Xcode version to use
xcode: 15.0 # Specify the Xcode version to use

steps:
- checkout
- install_dependencies

# verify XCFramework archive builds
- run:
name: Build XCFramework
command: |
if [ "${CIRCLE_BRANCH}" == "main" ]; then
make archive
if [ "${CIRCLE_BRANCH}" == "main" ] || [ "${CIRCLE_BRANCH}" == "staging" ]; then
make ci-archive
fi
# verify podspec is valid
- run:
name: Test Podspec
command: |
if [ "${CIRCLE_BRANCH}" == "main" ]; then
make test-podspec
fi
# - run:
# name: Test Podspec
# command: |
# if [ "${CIRCLE_BRANCH}" == "main" ]; then
# make test-podspec
# fi
# verify SPM works
- run:
name: Test SPM
command: |
if [ "${CIRCLE_BRANCH}" == "main" ]; then
if [ "${CIRCLE_BRANCH}" == "main" ] || [ "${CIRCLE_BRANCH}" == "staging" ]; then
make test-SPM-integration
fi
fi
11 changes: 7 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
tag:
description: 'tag/version'
required: true
default: '4.0.0'
default: '5.0.0'

action_tag:
description: 'create tag? ("no" to skip)'
Expand All @@ -20,20 +20,23 @@ on:

jobs:
release_messaging:
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v2
with:
ref: main
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.1'
xcode-version: '15.0.1'

- name: Install jq
run: brew install jq

- name: Install cocoapods
run: gem install cocoapods

- name: Install xcodegen
run: brew install xcodegen

- name: Check version in Podspec
run: |
Expand Down Expand Up @@ -92,6 +95,6 @@ jobs:
if: ${{ github.event.inputs.release_AEPMessaging == 'yes' }}
run: |
set -eo pipefail
pod trunk push AEPMessaging.podspec --allow-warnings --synchronous --swift-version=5.1
pod trunk push AEPMessaging.podspec --allow-warnings --synchronous
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
3 changes: 2 additions & 1 deletion .swiftformat
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# For details on formatting rules, refer https://github.com/nicklockwood/SwiftFormat/blob/master/Rules.md
--commas inline
--commas inline
--disable wrapMultilineStatementBraces
12 changes: 6 additions & 6 deletions AEPMessaging.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AEPMessaging"
s.version = "4.1.1"
s.version = "5.0.0"
s.summary = "Messaging extension for Adobe Experience Cloud SDK. Written and maintained by Adobe."
s.description = <<-DESC
The Messaging extension is used in conjunction with Adobe Journey Optimizer and Adobe Experience Platform to deliver in-app and push messages.
Expand All @@ -11,14 +11,14 @@ Pod::Spec.new do |s|
s.author = "Adobe Experience Platform Messaging SDK Team"
s.source = { :git => 'https://github.com/adobe/aepsdk-messaging-ios.git', :tag => s.version.to_s }

s.platform = :ios, "11.0"
s.platform = :ios, "12.0"
s.swift_version = '5.1'

s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
s.dependency 'AEPCore', '>= 4.0.0', '< 5.0.0'
s.dependency 'AEPServices', '>= 4.0.0', '< 5.0.0'
s.dependency 'AEPEdge', '>= 4.0.0', '< 5.0.0'
s.dependency 'AEPEdgeIdentity', '>= 4.0.0', '< 5.0.0'
s.dependency 'AEPCore', '>= 5.0.0', '< 6.0.0'
s.dependency 'AEPServices', '>= 5.0.0', '< 6.0.0'
s.dependency 'AEPEdge', '>= 5.0.0', '< 6.0.0'
s.dependency 'AEPEdgeIdentity', '>= 5.0.0', '< 6.0.0'

s.source_files = 'AEPMessaging/Sources/**/*.swift'

Expand Down
Loading

0 comments on commit fc9175b

Please sign in to comment.