@@ -84,9 +84,9 @@ commands:
8484 steps :
8585 - when :
8686 condition : << parameters.is_template >>
87- steps :
87+ steps :
8888 - save_cache :
89- key : nav-sdk-diff-cache-v7 -{{ << parameters.key >> }}
89+ key : nav-sdk-diff-cache-v8 -{{ << parameters.key >> }}
9090 paths :
9191 - api_logs
9292 - store_artifacts :
@@ -96,7 +96,7 @@ commands:
9696 condition : << parameters.is_template >>
9797 steps :
9898 - save_cache :
99- key : nav-sdk-diff-cache-v7 -<< parameters.key >>
99+ key : nav-sdk-diff-cache-v8 -<< parameters.key >>
100100 paths :
101101 - api_logs
102102 - store_artifacts :
@@ -112,52 +112,25 @@ commands:
112112 steps :
113113 - when :
114114 condition : << parameters.is_template >>
115- steps :
115+ steps :
116116 - restore_cache :
117- key : nav-sdk-diff-cache-v7 -{{ << parameters.key >> }}
117+ key : nav-sdk-diff-cache-v8 -{{ << parameters.key >> }}
118118 - unless :
119119 condition : << parameters.is_template >>
120120 steps :
121121 - restore_cache :
122- key : nav-sdk-diff-cache-v7 -<< parameters.key >>
122+ key : nav-sdk-diff-cache-v8 -<< parameters.key >>
123123
124- build-api-diff-cli-tool :
125- description : " Builds CLI tool which produce diff reports"
126- parameters :
127- swift-api-diff-version :
128- type : string
129- default : " v2.0.0-rc.2"
124+ run_api_log_in_current_env :
130125 steps :
131- - add_ssh_keys :
132- fingerprints :
133- - " 8c:24:d5:99:22:42:45:8f:16:6f:8d:24:ee:08:97:13"
134- - restore_cache :
135- key : swift-api-diff-v1-<<parameters.swift-api-diff-version>>
136126 - run :
137- name : Building API Diff Report if Needed
127+ name : " Build SDK API Logs "
138128 command : |
139- if [ ! -f "scripts/swift-api-diff/.build/release/swift-api-diff" ]; then
140- cd scripts && git clone [email protected] :mapbox/swift-api-diff.git --branch <<parameters.swift-api-diff-version>> --depth 1 141- cd swift-api-diff && swift build --configuration release;
142- fi
143- - save_cache :
144- key : swift-api-diff-v1-<<parameters.swift-api-diff-version>>
145- paths :
146- - scripts/swift-api-diff/.build/release/swift-api-diff
129+ set -e -o pipefail -u
130+
131+ mkdir $CIRCLE_WORKING_DIRECTORY/api_logs
132+ $CIRCLE_WORKING_DIRECTORY/scripts/api-compatibility-check/build-api-logs.sh "12.0" $CIRCLE_WORKING_DIRECTORY $CIRCLE_WORKING_DIRECTORY/api_logs/core_navigation_log.json $CIRCLE_WORKING_DIRECTORY/api_logs/navigation_log.json
147133
148- run_api_log_in_current_env :
149- parameters :
150- iOS :
151- type : string
152- device :
153- type : string
154- steps :
155- - run :
156- name : Generating MapboxCoreNavigation API Log
157- command : ./scripts/swift-api-diff/.build/release/swift-api-diff doc ./ $CIRCLE_WORKING_DIRECTORY/api_logs/core_navigation_log.json --module-name MapboxCoreNavigation -- -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=<< parameters.iOS >>,name=<< parameters.device >>' -scheme MapboxNavigation-Package build
158- - run :
159- name : Generating MapboxNavigation API Log
160- command : ./scripts/swift-api-diff/.build/release/swift-api-diff doc ./ $CIRCLE_WORKING_DIRECTORY/api_logs/navigation_log.json --module-name MapboxNavigation -- -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=<< parameters.iOS >>,name=<< parameters.device >>' -scheme MapboxNavigation-Package build
161134 run_breaking_changes_detector :
162135 parameters :
163136 module_name :
@@ -171,16 +144,7 @@ commands:
171144 name : Generating << parameters.module_name >> API Diff
172145 command : |
173146 export GITHUB_TOKEN=$(mbx-ci github issues public token)
174- LOG=$(./scripts/swift-api-diff/.build/release/swift-api-diff breaking_changes << parameters.base_api_path >> << parameters.new_api_path >> --ignore-undocumented true)
175- if [ ! -z "$CIRCLE_PULL_REQUEST" ]; then
176- if [ -z "$LOG" ]; then
177- echo "No breaking changes detected in << parameters.module_name >>"
178- else
179- PR_COMMENT=$'# Breaking Changes in << parameters.module_name >>\n\n'
180- PR_COMMENT+="$LOG"
181- gh pr comment -F - \<<< "$PR_COMMENT"
182- fi
183- fi
147+ ./scripts/api-compatibility-check/ci-analyze-api.sh << parameters.module_name >> << parameters.base_api_path >> << parameters.new_api_path >> $CIRCLE_WORKING_DIRECTORY/.breakage-allowlist.txt
184148
185149 carthage-bootstrap :
186150 steps :
@@ -216,7 +180,7 @@ step-library:
216180 key : 1-gems-{{ checksum "Gemfile.lock" }}
217181 paths :
218182 - vendor/bundle
219-
183+
220184 - &save-cache-cocoapods
221185 save_cache :
222186 key : nav-cache-pod-v1-{{ .Environment.CIRCLE_JOB }}-{{ checksum "Tests/CocoaPodsTest/PodInstall/Podfile.lock" }}
@@ -454,7 +418,7 @@ jobs:
454418 steps :
455419 - checkout
456420 - *trigger-metrics
457-
421+
458422 spm-test-job :
459423 parameters :
460424 xcode :
@@ -518,17 +482,11 @@ jobs:
518482 parameters :
519483 xcode :
520484 type : string
521- default : " 13.0.0"
522- device :
523- type : string
524- default : " iPhone 12 Pro Max"
525- iOS :
526- type : string
527- default : " 14.5"
485+ default : " 14.2.0"
528486 is_base_api :
529487 type : boolean
530488 default : false
531- commit_hash :
489+ commit_hash :
532490 description : " git hash of the commit to be used for generating logs in api_logs folder"
533491 type : string
534492 macos :
@@ -574,13 +532,7 @@ jobs:
574532 - run :
575533 name : Checking out commit
576534 command : git checkout << parameters.commit_hash >>
577- - build-api-diff-cli-tool
578- - run :
579- name : Move Xcode project aside
580- command : rm -rf *.xcodeproj
581- - run_api_log_in_current_env :
582- iOS : << parameters.iOS >>
583- device : << parameters.device >>
535+ - run_api_log_in_current_env
584536 - when :
585537 condition : << parameters.is_base_api >>
586538 steps :
@@ -594,26 +546,15 @@ jobs:
594546 key : << parameters.commit_hash >>
595547
596548 api-diff-job :
597- parameters :
598- xcode :
599- type : string
600- default : " 13.0.0"
601- device :
602- type : string
603- default : " iPhone 13 Pro Max"
604- iOS :
605- type : string
606- default : " 15.0"
607549 macos :
608- xcode : << parameters.xcode >>
550+ xcode : 14.2.0
609551 environment :
610552 HOMEBREW_NO_AUTO_UPDATE : 1
611553 steps :
612554 - checkout
613555 - *add-github-to-known-hosts
614556 - *prepare-mapbox-file
615557 - *prepare-netrc-file
616- - build-api-diff-cli-tool
617558 - install-mbx-ci
618559 - install-gh-cli
619560 - restore-api-diff-cache :
0 commit comments