Skip to content

Commit 794ddd4

Browse files
calvincestariAnthonyMDevdesignatednerdtrevorbladesklanchman
authoredOct 2, 2022
release: Apollo iOS 1.0 (apollographql#2540)
Co-authored-by: Anthony Miller <[email protected]> Co-authored-by: Ellen Shapiro <[email protected]> Co-authored-by: Trevor Blades <[email protected]> Co-authored-by: Kyle Lanchman <[email protected]> Co-authored-by: Janessa Garrow <[email protected]> Co-authored-by: Eli Perkins <[email protected]> Co-authored-by: Alex Reilly <[email protected]> Co-authored-by: Martin Bonnin <[email protected]> Co-authored-by: Artem <[email protected]> Co-authored-by: bannzai <[email protected]> Co-authored-by: Zaur Giyasov <[email protected]> Co-authored-by: Dave Perry <[email protected]> Co-authored-by: Stephen Barlow <[email protected]> Co-authored-by: JV <[email protected]> Co-authored-by: Jeff Auriemma <[email protected]>
1 parent 5fdd947 commit 794ddd4

File tree

4,069 files changed

+736807
-27695
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,069 files changed

+736807
-27695
lines changed
 

‎.circleci/config.yml

+58-55
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,12 @@ parameters:
1010
ios_previous_version:
1111
type: string
1212
default: "15.5"
13-
ios_sdk:
14-
type: string
15-
default: "iphonesimulator16.0"
1613
macos_version: # The user-facing version string for macOS builds
1714
type: string
1815
default: "12.5.1"
19-
macos_sdk: # The full SDK string to use for macOS builds
20-
type: string
21-
default: "macosx12.3"
2216
tvos_version: # The user-facing version string of tvOS builds
2317
type: string
2418
default: "16.0"
25-
tvos_sdk:
26-
type: string
27-
default: "appletvsimulator16.0"
2819

2920
commands:
3021
integration_test_setup:
@@ -81,15 +72,34 @@ commands:
8172
- run:
8273
command: for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
8374
name: Github Key Workaround
84-
build_and_run_tests:
75+
- run:
76+
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install xcbeautify
77+
name: Install xcbeautify
78+
build_and_run_xcode_tests:
8579
steps:
8680
- run:
87-
command: xcodebuild clean build build-for-testing -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" -testPlan "${CIRCLE_XCODE_TEST_PLAN}" | xcpretty
81+
command: xcodebuild clean build-for-testing -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -destination "${DESTINATION}" -testPlan "${CIRCLE_XCODE_TEST_PLAN}" | xcbeautify
8882
name: Clean and build for testing
8983
- run:
90-
command: xcodebuild test-without-building -resultBundlePath ~/TestResults/ResultBundle.xcresult -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" -testPlan "${CIRCLE_XCODE_TEST_PLAN}" | xcpretty
91-
name: Run tests
84+
command: xcodebuild test-without-building -resultBundlePath ~/TestResults/ResultBundle.xcresult -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -destination "${DESTINATION}" -testPlan "${CIRCLE_XCODE_TEST_PLAN}" | xcbeautify
85+
name: Run Xcode tests
9286
- save-xcodebuild-artifacts
87+
run_js_tests:
88+
steps:
89+
- run:
90+
command: npm install && npm test
91+
name: Run JS frontend tests
92+
working_directory: Sources/ApolloCodegenLib/Frontend/JavaScript/
93+
cocoapods_install_test:
94+
steps:
95+
- run:
96+
working_directory: Tests/CodegenCLITests/pod-install-test/
97+
command: pod install --verbose
98+
name: Install Pod (verbose)
99+
- run:
100+
working_directory: Tests/CodegenCLITests/pod-install-test/Pods/Apollo/
101+
command: ./apollo-ios-cli --version
102+
name: Verify apollo-ios-cli binary exists
93103
save-xcodebuild-artifacts:
94104
description: Save artifacts logs, crash reports and test results generated by xcodebuild
95105
steps:
@@ -129,10 +139,9 @@ jobs:
129139
DESTINATION: platform=macOS,arch=x86_64
130140
CIRCLE_XCODE_SCHEME: Apollo
131141
CIRCLE_XCODE_TEST_PLAN: Apollo-IntegrationTestPlan
132-
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
133142
steps:
134143
- integration_test_setup
135-
- build_and_run_tests
144+
- build_and_run_xcode_tests
136145
- integration_test_cleanup
137146

138147
macOS_current:
@@ -142,10 +151,9 @@ jobs:
142151
DESTINATION: platform=macOS,arch=x86_64
143152
CIRCLE_XCODE_SCHEME: Apollo
144153
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
145-
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
146154
steps:
147155
- common_test_setup
148-
- build_and_run_tests
156+
- build_and_run_xcode_tests
149157

150158
iOS_current:
151159
macos:
@@ -154,10 +162,9 @@ jobs:
154162
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 14
155163
CIRCLE_XCODE_SCHEME: Apollo
156164
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
157-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
158165
steps:
159166
- common_test_setup
160-
- build_and_run_tests
167+
- build_and_run_xcode_tests
161168

162169
iOS_previous:
163170
macos:
@@ -166,10 +173,9 @@ jobs:
166173
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 13
167174
CIRCLE_XCODE_SCHEME: Apollo
168175
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
169-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
170176
steps:
171177
- common_test_setup
172-
- build_and_run_tests
178+
- build_and_run_xcode_tests
173179

174180
tvOS_current:
175181
macos:
@@ -178,10 +184,9 @@ jobs:
178184
DESTINATION: platform=tvOS Simulator,OS=<< pipeline.parameters.tvos_version >>,name=Apple TV
179185
CIRCLE_XCODE_SCHEME: Apollo
180186
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
181-
CIRCLE_XCODE_SDK: << pipeline.parameters.tvos_sdk >>
182187
steps:
183188
- common_test_setup
184-
- build_and_run_tests
189+
- build_and_run_xcode_tests
185190

186191
CodegenLib_macOS_current:
187192
macos:
@@ -190,53 +195,51 @@ jobs:
190195
DESTINATION: platform=macOS,arch=x86_64
191196
CIRCLE_XCODE_SCHEME: ApolloCodegenLib
192197
CIRCLE_XCODE_TEST_PLAN: Apollo-CodegenTestPlan
193-
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
194198
steps:
195199
- common_test_setup
196-
- build_and_run_tests
197-
198-
CocoaPodsTrunk:
200+
- build_and_run_xcode_tests
201+
- run_js_tests
202+
203+
CodegenCLI_macOS_current:
199204
macos:
200205
xcode: << pipeline.parameters.xcode_version >>
206+
environment:
207+
DESTINATION: platform=macOS,arch=x86_64
208+
CIRCLE_XCODE_SCHEME: CodegenCLI
209+
CIRCLE_XCODE_TEST_PLAN: CodegenCLITestPlan
201210
steps:
202-
- checkout
203-
# TODO: Remove when Circle updates the version of CP installed on their
204-
# image to one that doesn't have https://github.com/CocoaPods/CocoaPods/issues/9176
205-
- run: pod repo add-cdn trunk 'https://cdn.cocoapods.org/'
206-
- run: pod trunk push Apollo.podspec
207-
- run: pod trunk me clean-sessions --all
211+
- common_test_setup
212+
- build_and_run_xcode_tests
213+
214+
CodegenIntegration_macOS_current:
215+
macos:
216+
xcode: << pipeline.parameters.xcode_version >>
217+
environment:
218+
DESTINATION: platform=macOS,arch=x86_64
219+
steps:
220+
- common_test_setup
221+
- cocoapods_install_test
208222

209223
workflows:
210224
version: 2
211225
# This workflow builds and tests the library across various operating systems and versions
212226
build-and-test:
213227
jobs:
214228
- Swift_Build:
215-
name: Build with SPM
229+
name: Build as Swift package
216230
- IntegrationTests_macOS_current:
217-
name: Apollo Integration Tests macOS << pipeline.parameters.macos_version >>
231+
name: Apollo Integration Tests - macOS << pipeline.parameters.macos_version >>
218232
- macOS_current:
219-
name: Apollo macOS << pipeline.parameters.macos_version >>
233+
name: Apollo Unit Tests - macOS << pipeline.parameters.macos_version >>
220234
- iOS_current:
221-
name: Apollo iOS << pipeline.parameters.ios_current_version >>
235+
name: Apollo Unit Tests - iOS << pipeline.parameters.ios_current_version >>
222236
- iOS_previous:
223-
name: Apollo iOS << pipeline.parameters.ios_previous_version >>
237+
name: Apollo Unit Tests - iOS << pipeline.parameters.ios_previous_version >>
224238
- tvOS_current:
225-
name: Apollo tvOS << pipeline.parameters.tvos_version >>
239+
name: Apollo Unit Tests - tvOS << pipeline.parameters.tvos_version >>
226240
- CodegenLib_macOS_current:
227-
name: Swift Code Generation
228-
- CocoaPodsTrunk:
229-
name: Push Podspec to CocoaPods Trunk
230-
requires:
231-
- Apollo macOS << pipeline.parameters.macos_version >>
232-
- Apollo iOS << pipeline.parameters.ios_current_version >>
233-
- Apollo iOS << pipeline.parameters.ios_previous_version >>
234-
- Apollo tvOS << pipeline.parameters.tvos_version >>
235-
- Swift Code Generation
236-
filters:
237-
# Only build semver tags
238-
tags:
239-
only: /((\d*)\.(\d*)\.(\d*)).*/
240-
# Don't run this on any branches
241-
branches:
242-
ignore: /.*/
241+
name: Codegen Lib Unit Tests - macOS << pipeline.parameters.macos_version >>
242+
- CodegenCLI_macOS_current:
243+
name: Codegen CLI Unit Tests - macOS << pipeline.parameters.macos_version >>
244+
- CodegenIntegration_macOS_current:
245+
name: Codegen CLI Integration Tests - macOS << pipeline.parameters.macos_version >>

‎.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docs/docc/Apollo.doccarchive/** linguist-generated=true

0 commit comments

Comments
 (0)
Please sign in to comment.