-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Swift Package Manager support #1465
Closed
Closed
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
82378a5
IGListDiffKit:
3a4oT 48ff62b
IGListKit:
3a4oT c2caf74
IGListSwiftKit:
3a4oT 7b111bc
more SPM
3a4oT b1845d2
symlinks
3a4oT f654020
Merge branch 'master' into spmBrain
3a4oT 40b82dd
added spm support for IGListDiffKit
3a4oT d783d79
added SPM support for IGListKit
3a4oT 26d6092
added spm support for IGListSwiftKit
3a4oT 41833cc
fixed pod integration
3a4oT a746022
cxx11
3a4oT 2632f6b
exp 1
3a4oT f8faa5d
podspec
3a4oT b48353c
Merge branch 'moreSPM' into spmBrain
3a4oT b5bf2af
dropped USE_PACKAGE_FROM_XCODE
3a4oT abc97a0
work with podspec
3a4oT 961b4ca
cleanup Package.swift
3a4oT 8d6d2ed
Merge branch 'master' into spmBrain
3a4oT d557d76
run iOS tests on Xcode12. fixed tvOS build on Xcode 12.
3a4oT df4fb90
added github CI workflow for Xcode12
3a4oT f7677da
Merge branch 'master' into spmBrain
3a4oT 4c3dc95
Merge branch 'xcode12' into spmBrain
3a4oT 5f5a1b2
fixed Xcode build
3a4oT 8547433
c11
3a4oT c593f96
fixed yml
3a4oT a40f6c3
fixed tvOS
3a4oT be31a89
Merge branch 'xcode12' into spmBrain
3a4oT c8ce68d
added a test job which can verify SPM variant of build.
3a4oT af24a4f
adjusted new umbrella header path for jazzy docs
3a4oT e565ab3
fixed macOS tests
3a4oT f212406
remove redundent jobs.
3a4oT 072e409
added test project to examples folder to track Xcode's spm integration
3a4oT d6367c5
filled Changelog
3a4oT 5072642
try workaround CI issues for Carthage build
3a4oT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,224 @@ | ||
name: "IGListKit CI" | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
macOS: | ||
name: Unit Test macOS | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_12.1.1.app/Contents/Developer | ||
WORKSPACE_NAME: IGListKit.xcworkspace | ||
SCHEME_NAME: IGListKit-macOS | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache RubyGems | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
|
||
- name: Install ruby gems. | ||
run: bundle install | ||
|
||
- name: Run unit tests for macOS | ||
#DEBUG locally | ||
# xcodebuild build build-for-testing -workspace "IGListKit.xcworkspace" -scheme "IGListKit-macOS" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c | ||
# xcodebuild analyze test-without-building -workspace "IGListKit.xcworkspace" -scheme "IGListKit-macOS" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c | ||
run: | | ||
set -o pipefail | ||
xcodebuild build build-for-testing -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.SCHEME_NAME }}" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c | ||
xcodebuild analyze test-without-building -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.SCHEME_NAME }}" -destination "platform=macOS" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c | ||
|
||
iOS: | ||
name: Unit Test iOS | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_12.1.1.app/Contents/Developer | ||
WORKSPACE_NAME: IGListKit.xcworkspace | ||
SCHEME_NAME: IGListKit | ||
strategy: | ||
matrix: | ||
destination: ["name=iPhone 12 Pro"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache RubyGems | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
|
||
- name: Install ruby gems. | ||
run: bundle install | ||
|
||
- name: iOS - ${{ matrix.destination }} | ||
#DEBUG locally | ||
# xcodebuild build build-for-testing -workspace "IGListKit.xcworkspace" -scheme "IGListKit" -destination "OS=14.1,name=iPhone 12 Pro" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c | ||
# xcodebuild analyze test-without-building -workspace "IGListKit.xcworkspace" -scheme "IGListKit" -destination "OS=14.1,name=iPhone 12 Pro" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c | ||
run: | | ||
set -o pipefail | ||
xcodebuild build build-for-testing -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.SCHEME_NAME }}" -destination "${{ matrix.destination }}" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c | ||
xcodebuild analyze test-without-building -workspace "${{ env.WORKSPACE_NAME }}" -scheme "${{ env.SCHEME_NAME }}" -destination "${{ matrix.destination }}" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=YES GCC_GENERATE_TEST_COVERAGE_FILES=YES ONLY_ACTIVE_ARCH=YES | bundle exec xcpretty -c | ||
|
||
Cocoapods: | ||
name: Cocoapods Lint | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_12.1.1.app/Contents/Developer | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache RubyGems | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
|
||
- name: Install ruby gems. | ||
run: bundle install | ||
|
||
- name: Run IGListDiffKit podspec lint | ||
run: bundle exec pod lib lint IGListDiffKit.podspec --allow-warnings | ||
|
||
- name: Run IGListKit podspec lint | ||
run: bundle exec pod lib lint IGListKit.podspec --allow-warnings "--include-podspecs=IGListDiffKit.podspec" | ||
|
||
- name: Run IGListSwiftKit podspec lint | ||
run: bundle exec pod lib lint IGListSwiftKit.podspec --allow-warnings "--include-podspecs=*.podspec" | ||
|
||
Carthage: | ||
name: Verify Carthage build | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Remove Examples folder | ||
run: rm -rf Examples/ | ||
|
||
- name: Carthage build framework | ||
run: carthage build --no-skip-current | ||
|
||
Build-Examples: | ||
name: Build Examples and UI tests. | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_12.1.1.app/Contents/Developer | ||
IOS_EXAMPLE_WORKSPACE: Examples/Examples-iOS/IGListKitExamples.xcworkspace | ||
TVOS_EXAMPLE_WORKSPACE: Examples/Examples-tvOS/IGListKitExamples.xcworkspace | ||
MACOS_EXAMPLE_WORKSPACE: Examples/Examples-macOS/IGListKitExamples.xcworkspace | ||
EXAMPLE_SCHEME: IGListKitExamples | ||
strategy: | ||
matrix: | ||
iosDestination: ["name=iPhone 12 Pro"] | ||
tvOSDestination: ["name=Apple TV 4K"] | ||
macOSDestination: ["platform=macOS"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache RubyGems | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
|
||
- name: Install ruby gems. | ||
run: bundle install | ||
|
||
- name: Prepare local pods | ||
run: bash scripts/setup.sh | ||
|
||
- name: Build iOS Example - ${{ matrix.iosDestination }} | ||
run: | | ||
set -o pipefail | ||
xcodebuild build -workspace "${{ env.IOS_EXAMPLE_WORKSPACE }}" -scheme "${{ env.EXAMPLE_SCHEME }}" -destination "${{ matrix.iosDestination }}" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c | ||
|
||
- name: Run iOS Example's UI Tests - ${{ matrix.iosDestination }} | ||
run: | | ||
set -o pipefail | ||
xcodebuild build test -workspace "${{ env.IOS_EXAMPLE_WORKSPACE }}" -scheme "${{ env.EXAMPLE_SCHEME }}" -destination "${{ matrix.iosDestination }}" -configuration Debug ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c | ||
|
||
- name: Build tvOS Example - ${{ matrix.tvOSDestination }} | ||
run: | | ||
set -o pipefail | ||
xcodebuild build -workspace "${{ env.TVOS_EXAMPLE_WORKSPACE }}" -scheme "${{ env.EXAMPLE_SCHEME }}" -destination "${{ matrix.tvOSDestination }}" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c | ||
|
||
- name: Build macOS Example - ${{ matrix.macOSDestination }} | ||
run: | | ||
set -o pipefail | ||
xcodebuild build -workspace "${{ env.MACOS_EXAMPLE_WORKSPACE }}" -scheme "${{ env.EXAMPLE_SCHEME }}" -destination "${{ matrix.macOSDestination }}" ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c | ||
|
||
SPM: | ||
name: Build from SPM manifest | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_12.1.1.app/Contents/Developer | ||
strategy: | ||
matrix: | ||
destination: ["platform=iOS Simulator,name=iPhone 12 Pro", "platform=macOS,variant=Mac Catalyst", "platform=tvOS Simulator,name=Apple TV 4k"] | ||
scheme: ["IGListKit"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Starting from Xcode 11 `xcodebuild` supports SwiftPM packages out of the box | ||
# to test that we have valid swift package we need to remove existing *.xcodeproj/xcworkspace | ||
# `xcodebuild` will invoke Package.swift. | ||
- name: spm's xcodebuild - ${{ matrix.destination }} | ||
run: | | ||
set -o pipefail | ||
rm -rf IGListKit.xcodeproj/ | ||
rm -rf IGListKit.xcworkspace/ | ||
xcodebuild clean build -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" | ||
|
||
Build-iOS-SPM-Xcode-Example: | ||
name: Build iOS Example integrated via Xcode's SPM. | ||
runs-on: macOS-latest | ||
env: | ||
DEVELOPER_DIR: /Applications/Xcode_12.1.1.app/Contents/Developer | ||
IOS_EXAMPLE_PROJECT: Examples/Examples-iOS-SPM-Xcode/Examples-iOS-SPM-Xcode.xcodeproj | ||
EXAMPLE_SCHEME: Examples-iOS-SPM-Xcode | ||
strategy: | ||
matrix: | ||
iosDestination: ["name=iPhone 12 Pro"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache RubyGems | ||
uses: actions/cache@v2 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-gems- | ||
|
||
- name: Install ruby gems. | ||
run: bundle install | ||
|
||
- name: Build iOS Example - ${{ matrix.iosDestination }} | ||
run: | | ||
set -o pipefail | ||
xcodebuild clean build -project "${{ env.IOS_EXAMPLE_PROJECT }}" -scheme "${{ env.EXAMPLE_SCHEME }}" -destination "${{ matrix.iosDestination }}" -configuration Release ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO | bundle exec xcpretty -c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this since you created a separate PR here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the mess, it was a hard time put those together and I moved files around with different combinations. I think I found a better solution for it, please see #1487. I tried to keep changes as small as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PS. About CI: while there is another open #1478 only for CI support, this PR was based on it since I need some way to verify my changes. If I remove support (in #1487 I didn't add it at all, for now) how we will see the progress/status? Or your plan is to land #1478 first?