Skip to content

Commit

Permalink
release: Apollo iOS 1.0 (#2540)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
16 people authored Oct 2, 2022
1 parent 5fdd947 commit 794ddd4
Show file tree
Hide file tree
Showing 4,069 changed files with 736,807 additions and 27,695 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
113 changes: 58 additions & 55 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,12 @@ parameters:
ios_previous_version:
type: string
default: "15.5"
ios_sdk:
type: string
default: "iphonesimulator16.0"
macos_version: # The user-facing version string for macOS builds
type: string
default: "12.5.1"
macos_sdk: # The full SDK string to use for macOS builds
type: string
default: "macosx12.3"
tvos_version: # The user-facing version string of tvOS builds
type: string
default: "16.0"
tvos_sdk:
type: string
default: "appletvsimulator16.0"

commands:
integration_test_setup:
Expand Down Expand Up @@ -81,15 +72,34 @@ commands:
- run:
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
name: Github Key Workaround
build_and_run_tests:
- run:
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install xcbeautify
name: Install xcbeautify
build_and_run_xcode_tests:
steps:
- run:
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
command: xcodebuild clean build-for-testing -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -destination "${DESTINATION}" -testPlan "${CIRCLE_XCODE_TEST_PLAN}" | xcbeautify
name: Clean and build for testing
- run:
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
name: Run tests
command: xcodebuild test-without-building -resultBundlePath ~/TestResults/ResultBundle.xcresult -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -destination "${DESTINATION}" -testPlan "${CIRCLE_XCODE_TEST_PLAN}" | xcbeautify
name: Run Xcode tests
- save-xcodebuild-artifacts
run_js_tests:
steps:
- run:
command: npm install && npm test
name: Run JS frontend tests
working_directory: Sources/ApolloCodegenLib/Frontend/JavaScript/
cocoapods_install_test:
steps:
- run:
working_directory: Tests/CodegenCLITests/pod-install-test/
command: pod install --verbose
name: Install Pod (verbose)
- run:
working_directory: Tests/CodegenCLITests/pod-install-test/Pods/Apollo/
command: ./apollo-ios-cli --version
name: Verify apollo-ios-cli binary exists
save-xcodebuild-artifacts:
description: Save artifacts logs, crash reports and test results generated by xcodebuild
steps:
Expand Down Expand Up @@ -129,10 +139,9 @@ jobs:
DESTINATION: platform=macOS,arch=x86_64
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_TEST_PLAN: Apollo-IntegrationTestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
steps:
- integration_test_setup
- build_and_run_tests
- build_and_run_xcode_tests
- integration_test_cleanup

macOS_current:
Expand All @@ -142,10 +151,9 @@ jobs:
DESTINATION: platform=macOS,arch=x86_64
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
steps:
- common_test_setup
- build_and_run_tests
- build_and_run_xcode_tests

iOS_current:
macos:
Expand All @@ -154,10 +162,9 @@ jobs:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 14
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
- common_test_setup
- build_and_run_tests
- build_and_run_xcode_tests

iOS_previous:
macos:
Expand All @@ -166,10 +173,9 @@ jobs:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 13
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
- common_test_setup
- build_and_run_tests
- build_and_run_xcode_tests

tvOS_current:
macos:
Expand All @@ -178,10 +184,9 @@ jobs:
DESTINATION: platform=tvOS Simulator,OS=<< pipeline.parameters.tvos_version >>,name=Apple TV
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.tvos_sdk >>
steps:
- common_test_setup
- build_and_run_tests
- build_and_run_xcode_tests

CodegenLib_macOS_current:
macos:
Expand All @@ -190,53 +195,51 @@ jobs:
DESTINATION: platform=macOS,arch=x86_64
CIRCLE_XCODE_SCHEME: ApolloCodegenLib
CIRCLE_XCODE_TEST_PLAN: Apollo-CodegenTestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
steps:
- common_test_setup
- build_and_run_tests

CocoaPodsTrunk:
- build_and_run_xcode_tests
- run_js_tests

CodegenCLI_macOS_current:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=macOS,arch=x86_64
CIRCLE_XCODE_SCHEME: CodegenCLI
CIRCLE_XCODE_TEST_PLAN: CodegenCLITestPlan
steps:
- checkout
# TODO: Remove when Circle updates the version of CP installed on their
# image to one that doesn't have https://github.com/CocoaPods/CocoaPods/issues/9176
- run: pod repo add-cdn trunk 'https://cdn.cocoapods.org/'
- run: pod trunk push Apollo.podspec
- run: pod trunk me clean-sessions --all
- common_test_setup
- build_and_run_xcode_tests

CodegenIntegration_macOS_current:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=macOS,arch=x86_64
steps:
- common_test_setup
- cocoapods_install_test

workflows:
version: 2
# This workflow builds and tests the library across various operating systems and versions
build-and-test:
jobs:
- Swift_Build:
name: Build with SPM
name: Build as Swift package
- IntegrationTests_macOS_current:
name: Apollo Integration Tests macOS << pipeline.parameters.macos_version >>
name: Apollo Integration Tests - macOS << pipeline.parameters.macos_version >>
- macOS_current:
name: Apollo macOS << pipeline.parameters.macos_version >>
name: Apollo Unit Tests - macOS << pipeline.parameters.macos_version >>
- iOS_current:
name: Apollo iOS << pipeline.parameters.ios_current_version >>
name: Apollo Unit Tests - iOS << pipeline.parameters.ios_current_version >>
- iOS_previous:
name: Apollo iOS << pipeline.parameters.ios_previous_version >>
name: Apollo Unit Tests - iOS << pipeline.parameters.ios_previous_version >>
- tvOS_current:
name: Apollo tvOS << pipeline.parameters.tvos_version >>
name: Apollo Unit Tests - tvOS << pipeline.parameters.tvos_version >>
- CodegenLib_macOS_current:
name: Swift Code Generation
- CocoaPodsTrunk:
name: Push Podspec to CocoaPods Trunk
requires:
- Apollo macOS << pipeline.parameters.macos_version >>
- Apollo iOS << pipeline.parameters.ios_current_version >>
- Apollo iOS << pipeline.parameters.ios_previous_version >>
- Apollo tvOS << pipeline.parameters.tvos_version >>
- Swift Code Generation
filters:
# Only build semver tags
tags:
only: /((\d*)\.(\d*)\.(\d*)).*/
# Don't run this on any branches
branches:
ignore: /.*/
name: Codegen Lib Unit Tests - macOS << pipeline.parameters.macos_version >>
- CodegenCLI_macOS_current:
name: Codegen CLI Unit Tests - macOS << pipeline.parameters.macos_version >>
- CodegenIntegration_macOS_current:
name: Codegen CLI Integration Tests - macOS << pipeline.parameters.macos_version >>
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/docc/Apollo.doccarchive/** linguist-generated=true
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@ Example: [0.48.0...main](https://github.com/apollographql/apollo-ios/compare/0.4
#### Other things to do before a release - _these need to be automated by CI_
- [ ] Validate that `main` builds with a test Swift Package Manager project.
- [ ] Validate that `main` builds with a test CocoaPods project.
- [ ] Validate that `main` builds with a test Carthage project (make sure to use `--use-xcframeworks`).

#### Things to do as part of releasing
- [ ] Add tag of format `major.minor.patch` to GitHub for SPM/Carthage.
- [ ] Add tag of format `major.minor.patch` to GitHub.
- [ ] Create a release on GitHub with the new tag, using the latest [`CHANGELOG.md`](https://github.com/apollographql/apollo-ios/blob/main/CHANGELOG.md) contents.
- [ ] Run `pod trunk push Apollo.podspec` to publish to CocoaPods. You will need write permissions for this, please contact one of the [maintainers](https://github.com/apollographql/apollo-ios/blob/main/README.md#maintainers) if you need access to do this.
- [ ] Announce the new version (Twitter, etc.)
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Build generated
build/
DerivedData/
apollo-ios-cli
!apollo-ios-cli/

## Various settings
*.pbxuser
Expand Down Expand Up @@ -64,3 +66,7 @@ SwiftScripts/.build-**

# Local Netlify folder
.netlify

# Local generated packages we don't need in the main project
Sources/AnimalKingdomAPI/Generated/Package.swift
Sources/AnimalKingdomAPI/Generated/Package.resolved
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "docs/renderer"]
path = docs/renderer
url = https://github.com/apollographql/swift-docc-render.git
113 changes: 0 additions & 113 deletions .swiftpm/xcode/xcshareddata/xcschemes/Apollo.xcscheme

This file was deleted.

Loading

0 comments on commit 794ddd4

Please sign in to comment.