Skip to content

Commit

Permalink
ci: podspec verification for iOS SDK 9.x (iOS 15) and iOS SDK 10.x (i…
Browse files Browse the repository at this point in the history
…OS 16) (#100)

* ci: podspec verification for iOS SDK 9.x (iOS 15) and iOS SDK 10.x (iOS 16)

* ci: use 9.0.1 as fallback as 9.0.0 does not exist

* ci: use iphone15
  • Loading branch information
MarcoEidinger authored Mar 8, 2024
1 parent 481b6de commit 0dfa3a9
Showing 1 changed file with 14 additions and 35 deletions.
49 changes: 14 additions & 35 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow supports podspec verification for iOS SDK 7.x and 8.x (iOS 14) and iOS SDK 9.x (iOS 15)
# Workflow supports podspec verification for iOS SDK 9.x (iOS 15) and iOS SDK 10.x (iOS 16)
name: CI

on:
Expand All @@ -10,20 +10,20 @@ on:
frameworkVersion:
description: 'Framework Version'
required: true
default: '8.0.4'
default: '9.2.7'
iOSVersion:
description: 'iOS Version'
required: true
default: '14.0'
default: '15.0'

jobs:
verify-podspec-install:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Create .netrc file with credentials to download binaries from SAP RSBC
uses: little-core-labs/netrc-creds@master
uses: bcomnes/netrc-creds@v3
with:
machine: rbsc.repositories.cloud.sap
login: sap-sdkiospecs
Expand All @@ -38,7 +38,7 @@ jobs:
id: frameworkVersion
if: github.event_name != 'workflow_dispatch'
run: |
relevantVersion=8.0.0 # safeguard in case no podspec file(s) were changed
relevantVersion=9.0.1 # safeguard in case no podspec file(s) were changed
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
lastVersion=`echo ${file} | cut -d / -f 2`
[[ $lastVersion == [0-9]* ]] && relevantVersion=$lastVersion
Expand All @@ -47,7 +47,7 @@ jobs:
echo ${relevantVersion}
echo "determinedFrameworkVersion=$relevantVersion" >> $GITHUB_ENV
- name: Comment on PR if no framework version can be determined
if: github.event_name == 'pull_request' && env.determinedFrameworkVersion == '8.0.0'
if: github.event_name == 'pull_request' && env.determinedFrameworkVersion == '9.0.1'
uses: actions/github-script@v6
with:
script: |
Expand All @@ -61,7 +61,7 @@ jobs:
id: iOSVersion
if: github.event_name != 'workflow_dispatch'
run: |
iOSVersion=$(if [[ ${{env.determinedFrameworkVersion}} = 7* || ${{env.determinedFrameworkVersion}} = 8* ]]; then echo '14.0'; else echo '15.0'; fi)
iOSVersion=$(if [[ ${{env.determinedFrameworkVersion}} = 9* ]]; then echo '15.0'; else echo '16.0'; fi)
echo "$iOSVersion"
echo "iOSVersion=$iOSVersion" >> $GITHUB_ENV
- name: Create Podfile with latest podspecs
Expand Down Expand Up @@ -102,32 +102,11 @@ jobs:
run: sudo xcode-select -p
- name: Determine Xcode version needed
run: |
iOSVersion="${{ github.event.inputs.iOSVersion }}"
if [ -z "$iOSVersion" ]
then
iOSVersion="${{ env.iOSVersion }}"
fi
if [[ "$iOSVersion" == '14.0' ]]
then
echo "use Xcode 13"
neededXcode='Xcode_13.2.1'
elif [[ "$iOSVersion" == '15.0' ]]
then
echo "use Xcode 14"
neededXcode='Xcode_14.0.1'
else
exit 1
fi
neededXcode='Xcode_15.2'
echo "neededXcode=$neededXcode" >> $GITHUB_ENV
- name: "Set Xcode version 13"
if: env.neededXcode == 'Xcode_13.2.1'
run: sudo xcode-select -s /Applications/Xcode_13.2.1.app/Contents/Developer
- name: "Set Xcode version 14"
if: env.neededXcode == 'Xcode_14.0.1'
run: sudo xcode-select -s /Applications/Xcode_14.0.1.app/Contents/Developer
- name: "Set Xcode version 15.2"
if: env.neededXcode == 'Xcode_15.2'
run: sudo xcode-select -s /Applications/Xcode_15.2.app/Contents/Developer
- name: Create test application
run: |
cd .testing
Expand All @@ -139,4 +118,4 @@ jobs:
- name: Build test application (which uses the frameworks)
run: |
cd .testing
xcodebuild -workspace TestApp.xcworkspace -scheme 'TestApp' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11' clean build
xcodebuild -workspace TestApp.xcworkspace -scheme 'TestApp' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15' clean build

0 comments on commit 0dfa3a9

Please sign in to comment.