Skip to content

Commit

Permalink
[update] updating CI yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
serajahmad01 authored Dec 16, 2024
1 parent 223c111 commit bdc6092
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,23 @@ jobs:
id: iOSVersion
if: github.event_name != 'workflow_dispatch'
run: |
iOSVersion=$(if [[ ${{env.determinedFrameworkVersion}} = 9* ]]; then echo '15.0'; else echo '16.0'; fi)
echo "$iOSVersion"
declare -A versionMapping
versionMapping=(
["24.12"]="17.0"
["24.8"]="16.0"
["24.4"]="16.0"
["10.0"]="16.0"
)
frameworkVersion=${{ env.determinedFrameworkVersion }}
majorMinorVersion=$(echo $frameworkVersion | cut -d '.' -f 1-2)
if [ -n "${versionMapping[$majorMinor]}" ]; then
iOSVersion="${versionMapping[$majorMinor]}"
else
iOSVersion="16.0"
fi
# iOSVersion=$(if [[ ${{env.determinedFrameworkVersion}} = 9* ]]; then echo '15.0'; else echo '16.0'; fi)
# echo "$iOSVersion"
echo "Framework version: $frameworkVersion -> iOS version: $iOSVersion"
echo "iOSVersion=$iOSVersion" >> $GITHUB_ENV
- name: Create Podfile with latest podspecs
if: github.event_name != 'workflow_dispatch'
Expand Down Expand Up @@ -100,13 +115,17 @@ jobs:
cat Podfile
- name: "Displays Xcode current version"
run: sudo xcode-select -p
- name: Determine Xcode version needed
- name: Determine Xcode version based on iOS version
run: |
neededXcode='Xcode_15.4'
if [[ ${{ env.iOSVersion }} == '17.0' ]]; then
neededXcode='Xcode_16.1'
else
neededXcode='Xcode_15.4'
fi
echo "neededXcode=$neededXcode" >> $GITHUB_ENV
- name: "Set Xcode version 15.4"
if: env.neededXcode == 'Xcode_15.4'
run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
- name: "Set Xcode version"
if: env.neededXcode != ''
run: sudo xcode-select -s /Applications/${{ env.neededXcode }}.app/Contents/Developer
- name: Create test application
run: |
cd .testing
Expand Down

0 comments on commit bdc6092

Please sign in to comment.