[update] updating spec.source 9.2.6 #202
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow supports podspec verification for iOS SDK 7.x and 8.x (iOS 14) and iOS SDK 9.x (iOS 15) | |
name: CI | |
on: | |
push: | |
branches: [ main, ci-test ] | |
pull_request: | |
workflow_dispatch: | |
inputs: | |
frameworkVersion: | |
description: 'Framework Version' | |
required: true | |
default: '8.0.4' | |
iOSVersion: | |
description: 'iOS Version' | |
required: true | |
default: '14.0' | |
jobs: | |
verify-podspec-install: | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Create .netrc file with credentials to download binaries from SAP RSBC | |
uses: little-core-labs/netrc-creds@master | |
with: | |
machine: rbsc.repositories.cloud.sap | |
login: sap-sdkiospecs | |
password: ${{ secrets.RSBC_USER_BASICAUTH_PWD }} | |
- name: Install required tools | |
run: brew install xcodegen | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v35 | |
if: github.event_name != 'workflow_dispatch' | |
- name: Determine relevant podspec versions (based on changed files) | |
id: frameworkVersion | |
if: github.event_name != 'workflow_dispatch' | |
run: | | |
relevantVersion=8.0.0 # 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 | |
echo "File checked: ${file}." | |
done | |
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' | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: '🚨 Cannot determine relevant framework version' | |
}) | |
- name: Determine iOSVersion | |
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) | |
echo "$iOSVersion" | |
echo "iOSVersion=$iOSVersion" >> $GITHUB_ENV | |
- name: Create Podfile with latest podspecs | |
if: github.event_name != 'workflow_dispatch' | |
run: | | |
cd .testing | |
rm Podfile | |
echo "platform :ios, '${{ env.iOSVersion }}'" >> Podfile | |
echo "use_frameworks!" >> Podfile | |
echo "target 'TestApp' do" >> Podfile | |
echo " pod 'SAPCommon', :podspec => '../SAPCommon/${{ env.determinedFrameworkVersion }}/SAPCommon.podspec'" >> Podfile | |
echo " pod 'SAPFoundation', :podspec => '../SAPFoundation/${{ env.determinedFrameworkVersion }}/SAPFoundation.podspec'" >> Podfile | |
echo " pod 'SAPFiori', :podspec => '../SAPFiori/${{ env.determinedFrameworkVersion }}/SAPFiori.podspec'" >> Podfile | |
echo " pod 'SAPFioriFlows', :podspec => '../SAPFioriFlows/${{ env.determinedFrameworkVersion }}/SAPFioriFlows.podspec'" >> Podfile | |
echo " pod 'SAPOData', :podspec => '../SAPOData/${{ env.determinedFrameworkVersion }}/SAPOData.podspec'" >> Podfile | |
echo " pod 'SAPOfflineOData', :podspec => '../SAPOfflineOData/${{ env.determinedFrameworkVersion }}/SAPOfflineOData.podspec'" >> Podfile | |
echo " pod 'SAPML', :podspec => '../SAPML/${{ env.determinedFrameworkVersion }}/SAPML.podspec'" >> Podfile | |
echo "end" >> Podfile | |
cat Podfile | |
- name: Create Podfile with version specified manually | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
cd .testing | |
rm Podfile | |
echo "platform :ios, '${{ github.event.inputs.iOSVersion }}'" >> Podfile | |
echo "use_frameworks!" >> Podfile | |
echo "target 'TestApp' do" >> Podfile | |
echo " pod 'SAPCommon', :podspec => '../SAPCommon/${{ github.event.inputs.frameworkVersion }}/SAPCommon.podspec'" >> Podfile | |
echo " pod 'SAPFoundation', :podspec => '../SAPFoundation/${{ github.event.inputs.frameworkVersion }}/SAPFoundation.podspec'" >> Podfile | |
echo " pod 'SAPFiori', :podspec => '../SAPFiori/${{ github.event.inputs.frameworkVersion }}/SAPFiori.podspec'" >> Podfile | |
echo " pod 'SAPFioriFlows', :podspec => '../SAPFioriFlows/${{ github.event.inputs.frameworkVersion }}/SAPFioriFlows.podspec'" >> Podfile | |
echo " pod 'SAPOData', :podspec => '../SAPOData/${{ github.event.inputs.frameworkVersion }}/SAPOData.podspec'" >> Podfile | |
echo " pod 'SAPOfflineOData', :podspec => '../SAPOfflineOData/${{ github.event.inputs.frameworkVersion }}/SAPOfflineOData.podspec'" >> Podfile | |
echo " pod 'SAPML', :podspec => '../SAPML/${{ github.event.inputs.frameworkVersion }}/SAPML.podspec'" >> Podfile | |
echo "end" >> Podfile | |
cat Podfile | |
- name: "Displays Xcode current version" | |
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 | |
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: Create test application | |
run: | | |
cd .testing | |
xcodegen generate | |
- name: Install pods for test application | |
run: | | |
cd .testing | |
pod install | |
- 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 |