Skip to content

Commit 43c7d80

Browse files
authored
Merge branch 'master' into spm
2 parents 74b358f + 33bede0 commit 43c7d80

File tree

3 files changed

+24
-32
lines changed

3 files changed

+24
-32
lines changed

.github/workflows/ci.yaml

+15-23
Original file line numberDiff line numberDiff line change
@@ -11,51 +11,43 @@ on:
1111
- master
1212

1313
jobs:
14-
build:
15-
name: Build
14+
test:
15+
name: Test
1616
runs-on: macOS-latest
1717
strategy:
1818
matrix:
1919
platform: ['iOS Simulator,name=iPhone 8']
2020
steps:
2121
- uses: actions/checkout@v1
22-
- name: Analyze and Test
23-
run: |
24-
xcodebuild clean analyze test \
25-
-destination "platform=${{ matrix.platform }}" \
26-
-sdk "iphonesimulator" \
27-
-project PINCache.xcodeproj \
28-
-scheme PINCache \
29-
ONLY_ACTIVE_ARCH=NO \
30-
CODE_SIGNING_REQUIRED=NO \
31-
CLANG_ANALYZER_OUTPUT=plist-html \
32-
CLANG_ANALYZER_OUTPUT_DIR="$(pwd)/clang" \
33-
| xcpretty
34-
if [[ -n `find $(pwd)/clang -name "*.html"` ]] ; then rm -rf $(pwd)/clang; exit 1; fi
35-
rm -rf $(pwd)/clang
22+
- name: Test
23+
run: make test
24+
analyze:
25+
name: Analyze
26+
runs-on: macOS-latest
27+
steps:
28+
- uses: actions/checkout@v1
29+
- name: analyze
30+
run: make analyze
3631
cocoapods:
3732
name: CocoaPods
3833
runs-on: macOS-latest
3934
steps:
4035
- uses: actions/checkout@v2
4136
- name: Lint
42-
run: pod lib lint
37+
run: make cocoapods
4338
carthage:
4439
name: Carthage
4540
runs-on: macOS-latest
4641
steps:
4742
- uses: actions/checkout@v2
48-
- name: Update
49-
run: carthage update --no-use-binaries --no-build
50-
- name: Build
51-
run: carthage build --no-skip-current
52-
SPM-Build:
43+
- name: carthage
44+
run: make carthage
45+
swift-package-manager:
5346
runs-on: macos-latest
5447
env:
5548
DEVELOPER_DIR: /Applications/Xcode_12.app/Contents/Developer
5649
steps:
5750
- name: Checkout
5851
uses: actions/checkout@v2
59-
6052
- name: Verify that PINCache can be build by SPM
6153
run: make spm

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ PLATFORM="platform=iOS Simulator,name=iPhone 8"
22
SDK="iphonesimulator"
33
SHELL=/bin/bash -o pipefail
44

5-
.PHONY: all lint test carthage analyze spm
5+
.PHONY: all cocoapods test carthage analyze spm
66

7-
lint:
7+
cocoapods:
88
pod lib lint
99

1010
analyze:
@@ -31,4 +31,4 @@ spm:
3131
# https://bugs.swift.org/browse/SR-13560
3232
swift build
3333

34-
all: carthage lint test analyze spm
34+
all: carthage cocoapods test analyze spm

Tests/PINCacheTests.m

+6-6
Original file line numberDiff line numberDiff line change
@@ -742,13 +742,13 @@ - (void)testAgeLimit
742742
}];
743743

744744
dispatch_group_enter(group);
745-
[self.cache.diskCache objectForKeyAsync:key1 completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
745+
[self.cache.diskCache objectForKeyAsync:key1 completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
746746
diskObj1 = object;
747747
dispatch_group_leave(group);
748748
}];
749749

750750
dispatch_group_enter(group);
751-
[self.cache.diskCache objectForKeyAsync:key2 completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
751+
[self.cache.diskCache objectForKeyAsync:key2 completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
752752
diskObj2 = object;
753753
dispatch_group_leave(group);
754754
}];
@@ -785,13 +785,13 @@ - (void)testAgeLimit
785785
}];
786786

787787
dispatch_group_enter(group);
788-
[self.cache.diskCache objectForKeyAsync:key1 completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
788+
[self.cache.diskCache objectForKeyAsync:key1 completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
789789
diskObj1 = object;
790790
dispatch_group_leave(group);
791791
}];
792792

793793
dispatch_group_enter(group);
794-
[self.cache.diskCache objectForKeyAsync:key2 completion:^(PINDiskCache *cache, NSString *key, id<NSCoding> object) {
794+
[self.cache.diskCache objectForKeyAsync:key2 completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
795795
diskObj2 = object;
796796
dispatch_group_leave(group);
797797
}];
@@ -916,7 +916,7 @@ - (void)_testTTLCacheObjectAccess {
916916
}];
917917

918918
dispatch_group_enter(group);
919-
[self.cache.diskCache objectForKeyAsync:key completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
919+
[self.cache.diskCache objectForKeyAsync:key completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
920920
diskObj = object;
921921
dispatch_group_leave(group);
922922
}];
@@ -940,7 +940,7 @@ - (void)_testTTLCacheObjectAccess {
940940
}];
941941

942942
dispatch_group_enter(group);
943-
[self.cache.diskCache objectForKeyAsync:key completion:^(id<PINCaching> cache, NSString *key, id<NSCoding> object) {
943+
[self.cache.diskCache objectForKeyAsync:key completion:^(PINDiskCache * _Nonnull cache, NSString * _Nonnull key, id<NSCoding> _Nullable object) {
944944
diskObj = object;
945945
dispatch_group_leave(group);
946946
}];

0 commit comments

Comments
 (0)