Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ on:
workflow_dispatch:
inputs:
frameworkVersion:
description: 'Framework Version'
description: 'Framework Version'
required: true
default: '24.12.0'
default: '25.4.0'
iOSVersion:
description: 'iOS Version'
required: true
default: '17.0'

jobs:
verify-podspec-install:
runs-on: macos-14
runs-on: macos-15

steps:
- uses: actions/checkout@v4
Expand All @@ -38,7 +38,7 @@ jobs:
id: frameworkVersion
if: github.event_name != 'workflow_dispatch'
run: |
relevantVersion=24.12.0 # safeguard in case no podspec file(s) were changed
relevantVersion="25.4.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
Expand All @@ -63,14 +63,15 @@ jobs:
run: |
frameworkVersion=${{ env.determinedFrameworkVersion }}
majorMinorVersion=$(echo $frameworkVersion | cut -d '.' -f 1-2)
if [ "$majorMinorVersion" = "24.12" ] || [ "$majorMinorVersion" = "25.4" ]; then
if [ "$majorMinorVersion" = "24.12" ] || [ "$majorMinorVersion" = "25.4" ] || [ "$majorMinorVersion" = "25.8" ]; then
iOSVersion="17.0"
elif [ "$majorMinorVersion" = "24.8" ] || [ "$majorMinorVersion" = "24.4" ] || [ "$majorMinorVersion" = "10.0" ]; then
iOSVersion="16.0"
else
iOSVersion="16.0" # Default fallback
iOSVersion="17.0" # Default fallback
fi
echo "Framework version: $frameworkVersion -> iOS version: $iOSVersion"
echo "majorMinorVersion=$majorMinorVersion" >> $GITHUB_ENV
echo "iOSVersion=$iOSVersion" >> $GITHUB_ENV

- name: Create Podfile with latest podspecs
Expand Down Expand Up @@ -108,30 +109,38 @@ jobs:
echo "end" >> Podfile
cat Podfile
- name: "Displays Xcode current version"
run: sudo xcode-select -p
run: |
sudo xcode-select -p
xcodebuild -version
- name: "List installed Xcode versions"
run: ls /Applications | grep Xcode
- name: Determine Xcode version based on iOS version
run: |
if [ -z "${{ env.iOSVersion }}" ]; then
echo "iOSVersion is not set. Using latest Xcode version."
neededXcode='Xcode_16.1'
elif [[ ${{ env.iOSVersion }} == '17.0' ]]; then
neededXcode='Xcode_16.1'
frameworkVersion=${{ env.majorMinorVersion }}
if [ "$frameworkVersion" = "25.8" ] || [ "$frameworkVersion" = "25.4" ]; then
neededXcode="Xcode_16.3"
elif [ "$frameworkVersion" = "24.12" ]; then
neededXcode="Xcode_16.1"
elif [ "$frameworkVersion" = "24.8" ] || [ "$frameworkVersion" = "24.4" ] || [ "$frameworkVersion" = "10.0" ]; then
neededXcode="Xcode_16.0"
else
neededXcode='Xcode_15.4'
neededXcode="Xcode_16.3" # Default fallback
fi
echo "neededXcode=$neededXcode" >> $GITHUB_ENV
- name: "Set Xcode version"
if: env.neededXcode != ''
run: sudo xcode-select -s /Applications/${{ env.neededXcode }}.app/Contents/Developer
run: |
sudo xcode-select -s /Applications/${{ env.neededXcode }}.app/Contents/Developer
xcodebuild -version
- name: Create test application
run: |
cd .testing
xcodegen generate
XCODEGEN_PROJECT_OBJECT_VERSION=60 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 15' clean build
xcodebuild -workspace TestApp.xcworkspace -scheme 'TestApp' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 16' clean build
Loading