Skip to content

Commit

Permalink
SPM support (#571)
Browse files Browse the repository at this point in the history
* carthage update.

* build!

* cleanup Package.swift

* repair Xcode build.

* update makefile

* fixed podspec after SPM related changes. PIN xcode version on CI for Carthage and SPM jobs

* fixed Xcode SPM integration
  • Loading branch information
3a4oT authored Oct 6, 2020
1 parent dab6a3c commit 217804d
Show file tree
Hide file tree
Showing 44 changed files with 237 additions and 261 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
platform: ['iOS Simulator,name=iPhone 8']
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Analyze
run: make analyze
test:
Expand All @@ -28,20 +28,31 @@ jobs:
matrix:
platform: ['iOS Simulator,name=iPhone 8']
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Test
run: make test
cocoapods:
name: CocoaPods
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: CocoaPods
run: make cocoapods
carthage:
name: Carthage
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
- name: Carthage
run: make carthage
swift-package-manager:
runs-on: macos-latest
env:
DEVELOPER_DIR: /Applications/Xcode_12.app/Contents/Developer
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Verify that PINRemoteImage can be build by SPM
run: make spm
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@ xcuserdata
Pods/

Carthage/Build

## SPM
.swiftpm/
.build/
Package.resolved
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
git "https://chromium.googlesource.com/webm/libwebp" "v1.1.0"
github "pinterest/PINCache" "3.0.1"
github "pinterest/PINOperation" "1.2"
github "pinterest/PINOperation" "1.2.0"
21 changes: 0 additions & 21 deletions Carthage/Checkouts/PINCache/.buckconfig

This file was deleted.

18 changes: 0 additions & 18 deletions Carthage/Checkouts/PINCache/.travis.yml

This file was deleted.

23 changes: 0 additions & 23 deletions Carthage/Checkouts/PINCache/BUCK

This file was deleted.

4 changes: 0 additions & 4 deletions Carthage/Checkouts/PINCache/CI/build.sh

This file was deleted.

6 changes: 0 additions & 6 deletions Carthage/Checkouts/PINCache/CI/exclude-from-build.json

This file was deleted.

23 changes: 0 additions & 23 deletions Carthage/Checkouts/PINCache/Dangerfile

This file was deleted.

4 changes: 0 additions & 4 deletions Carthage/Checkouts/PINCache/Gemfile

This file was deleted.

23 changes: 0 additions & 23 deletions Carthage/Checkouts/PINOperation/Dangerfile

This file was deleted.

4 changes: 0 additions & 4 deletions Carthage/Checkouts/PINOperation/Gemfile

This file was deleted.

7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PLATFORM="platform=iOS Simulator,name=iPhone 8"
SDK="iphonesimulator"
SHELL=/bin/bash -o pipefail

.PHONY: all webp cocoapods test carthage analyze
.PHONY: all webp cocoapods test carthage analyze spm

cocoapods:
pod lib lint
Expand All @@ -28,5 +28,8 @@ carthage:
webp:
carthage update --no-use-binaries --no-build
cd webp && ../Carthage/Checkouts/libwebp/iosbuild.sh

spm:
swift build

all: carthage test cocoapods analyze
all: carthage test cocoapods analyze spm
4 changes: 2 additions & 2 deletions PINRemoteImage.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Pod::Spec.new do |s|
cs.osx.deployment_target = osx_deployment
cs.source_files = 'Source/Classes/**/*.{h,m}'
cs.public_header_files = 'Source/Classes/**/*.h'
cs.exclude_files = 'Source/Classes/PINCache/*.{h,m}'
cs.exclude_files = 'Source/Classes/PINCache/*.{h,m}', 'Source/Classes/include/PINCache+PINRemoteImageCaching.h'
cs.frameworks = 'ImageIO', 'Accelerate'
end

Expand Down Expand Up @@ -75,7 +75,7 @@ Pod::Spec.new do |s|
pc.ios.deployment_target = ios_deployment
pc.tvos.deployment_target = tvos_deployment
pc.osx.deployment_target = osx_deployment
pc.source_files = 'Source/Classes/PINCache/*.{h,m}'
pc.source_files = 'Source/Classes/PINCache/*.{h,m}', 'Source/Classes/include/PINCache+PINRemoteImageCaching.h'
end

end
Loading

0 comments on commit 217804d

Please sign in to comment.