Skip to content

Commit 6ee953b

Browse files
authored
Merge pull request #22 from playbook-ui/drop-support-for-old-xcode-versions
Drop support for old xcode versions
2 parents 5ddd5db + 0590c2d commit 6ee953b

File tree

14 files changed

+303
-413
lines changed

14 files changed

+303
-413
lines changed

.github/workflows/test.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,49 @@
1-
name: GitHub Actions
1+
name: test
2+
23
on:
34
pull_request:
45
push:
56
branches:
67
- main
8+
workflow_dispatch:
9+
10+
env:
11+
DEVELOPER_DIR: /Applications/Xcode_15.2.app
12+
713
jobs:
814
validation:
915
name: Validation
10-
runs-on: macos-11
11-
strategy:
12-
matrix:
13-
xcode_version:
14-
- 12.5.1
15-
env:
16-
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
16+
runs-on: macos-13
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919

2020
- name: Get SwiftPM cache
2121
uses: actions/cache@v2
2222
with:
23-
path: Tools/.build
24-
key: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-${{ hashFiles('Tools/Package.resolved') }}
25-
restore-keys: ${{ runner.os }}-${{ matrix.xcode_version }}-1-spm-
23+
path: .build
24+
key: ${{ runner.os }}-0-spm-${{ hashFiles('Package.resolved') }}
25+
restore-keys: ${{ runner.os }}-0-spm-
2626

27-
- name: Validation
28-
if: matrix.xcode_version == '12.5.1'
27+
- name: Validate format
2928
run: |
30-
make all && [ -z "$(git status --porcelain)" ]
29+
make format
30+
if [ -n "$(git status --porcelain)" ]; then echo "Make sure that the code is formated by 'make format'."; exit 1; fi
3131
make lint
32+
env:
33+
SPM_FORCE_BUILD: 1
34+
35+
- name: Validate example project
36+
run: |
37+
make proj
38+
if [ -n "$(git status --porcelain)" ]; then echo "Make sure that example project is formated by 'make proj'."; exit 1; fi
39+
env:
40+
SPM_FORCE_BUILD: 1
3241

3342
test:
3443
name: Test on macOS
35-
runs-on: macos-11
36-
strategy:
37-
matrix:
38-
xcode_version:
39-
- 12.4
40-
- 12.5.1
41-
env:
42-
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
44+
runs-on: macos-13
4345
steps:
44-
- uses: actions/checkout@v2
46+
- uses: actions/checkout@v4
4547

4648
- name: Show environments
4749
run: |
@@ -61,11 +63,9 @@ jobs:
6163
run: make npm
6264

6365
- name: Generate snapshots
64-
working-directory: Example
65-
run: xcodebuild test -scheme SampleApp -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 12 Pro' ENABLE_TESTABILITY=YES | xcpretty -c
66+
run: set -o pipefail && xcodebuild test -project Example/Example.xcodeproj -scheme SampleApp -destination 'platform=iOS Simulator,name=iPhone 15 Pro' | xcpretty -c
6667

6768
- name: Visual regression test
68-
if: matrix.xcode_version == '12.5.1'
6969
run: npx percy upload Example/Snapshots
7070
env:
7171
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}

.swift-format

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@
2020
"AlwaysUseLowerCamelCase": false,
2121
"AmbiguousTrailingClosureOverload": true,
2222
"BeginDocumentationCommentWithOneLineSummary": true,
23-
"BlankLineBetweenMembers": true,
2423
"DoNotUseSemicolons": true,
2524
"DontRepeatTypeInStaticProperties": true,
2625
"FullyIndirectEnum": true,
2726
"GroupNumericLiterals": true,
2827
"IdentifiersMustBeASCII": true,
29-
"MultiLineTrailingCommas": true,
3028
"NeverForceUnwrap": false,
3129
"NeverUseForceTry": false,
3230
"NeverUseImplicitlyUnwrappedOptionals": true,
@@ -43,7 +41,6 @@
4341
"OnlyOneTrailingClosureArgument": true,
4442
"OrderedImports": true,
4543
"ReturnVoidInsteadOfEmptyTuple": true,
46-
"UseEnumForNamespacing": true,
4744
"UseLetInEveryBoundCaseVariable": false,
4845
"UseShorthandTypeNames": true,
4946
"UseSingleLinePropertyGetter": true,

Example/Example.xcodeproj/project.pbxproj

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 51;
6+
objectVersion = 54;
77
objects = {
88

99
/* Begin PBXBuildFile section */
@@ -195,7 +195,8 @@
195195
CA8E1E974698BC95958F017F /* Project object */ = {
196196
isa = PBXProject;
197197
attributes = {
198-
LastUpgradeCheck = 1200;
198+
BuildIndependentTargetsInParallel = YES;
199+
LastUpgradeCheck = 1430;
199200
TargetAttributes = {
200201
2988EB7AD33F8FCC59A8289D = {
201202
ProvisioningStyle = Manual;
@@ -206,7 +207,7 @@
206207
};
207208
};
208209
buildConfigurationList = 36FC72E69D906F48675C62BF /* Build configuration list for PBXProject "Example" */;
209-
compatibilityVersion = "Xcode 10.0";
210+
compatibilityVersion = "Xcode 14.0";
210211
developmentRegion = en;
211212
hasScannedForEncodings = 0;
212213
knownRegions = (
@@ -320,6 +321,9 @@
320321
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
321322
CLANG_WARN_UNREACHABLE_CODE = YES;
322323
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
324+
CODE_SIGNING_REQUIRED = NO;
325+
CODE_SIGN_IDENTITY = "-";
326+
CODE_SIGN_STYLE = Manual;
323327
COPY_PHASE_STRIP = NO;
324328
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
325329
ENABLE_NS_ASSERTIONS = NO;
@@ -332,7 +336,7 @@
332336
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
333337
GCC_WARN_UNUSED_FUNCTION = YES;
334338
GCC_WARN_UNUSED_VARIABLE = YES;
335-
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
339+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
336340
MTL_ENABLE_DEBUG_INFO = NO;
337341
MTL_FAST_MATH = YES;
338342
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -442,6 +446,9 @@
442446
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
443447
CLANG_WARN_UNREACHABLE_CODE = YES;
444448
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
449+
CODE_SIGNING_REQUIRED = NO;
450+
CODE_SIGN_IDENTITY = "-";
451+
CODE_SIGN_STYLE = Manual;
445452
COPY_PHASE_STRIP = NO;
446453
DEBUG_INFORMATION_FORMAT = dwarf;
447454
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -460,7 +467,7 @@
460467
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
461468
GCC_WARN_UNUSED_FUNCTION = YES;
462469
GCC_WARN_UNUSED_VARIABLE = YES;
463-
IPHONEOS_DEPLOYMENT_TARGET = 14.2;
470+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
464471
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
465472
MTL_FAST_MATH = YES;
466473
ONLY_ACTIVE_ARCH = YES;

Example/Example.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 38 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Example.xcodeproj/xcshareddata/xcschemes/SampleApp.xcscheme

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1200"
4-
version = "1.3">
3+
LastUpgradeVersion = "1430"
4+
version = "1.7">
55
<BuildAction
66
parallelizeBuildables = "YES"
77
buildImplicitDependencies = "YES"
@@ -27,8 +27,17 @@
2727
buildConfiguration = "Debug"
2828
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2929
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
30-
onlyGenerateCoverageForSpecifiedTargets = "NO"
31-
shouldUseLaunchSchemeArgsEnv = "NO">
30+
shouldUseLaunchSchemeArgsEnv = "NO"
31+
onlyGenerateCoverageForSpecifiedTargets = "NO">
32+
<MacroExpansion>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "2988EB7AD33F8FCC59A8289D"
36+
BuildableName = "SampleApp.app"
37+
BlueprintName = "SampleApp"
38+
ReferencedContainer = "container:Example.xcodeproj">
39+
</BuildableReference>
40+
</MacroExpansion>
3241
<Testables>
3342
<TestableReference
3443
skipped = "NO">
@@ -41,15 +50,6 @@
4150
</BuildableReference>
4251
</TestableReference>
4352
</Testables>
44-
<MacroExpansion>
45-
<BuildableReference
46-
BuildableIdentifier = "primary"
47-
BlueprintIdentifier = "2988EB7AD33F8FCC59A8289D"
48-
BuildableName = "SampleApp.app"
49-
BlueprintName = "SampleApp"
50-
ReferencedContainer = "container:Example.xcodeproj">
51-
</BuildableReference>
52-
</MacroExpansion>
5353
<CommandLineArguments>
5454
<CommandLineArgument
5555
argument = "-AppleLanguages (en)"

Example/project.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
name: Example
22
options:
3+
createIntermediateGroups: true
34
bundleIdPrefix: app.playbook-ui.accessibility.Example
45
deploymentTarget:
5-
iOS: 14.2
6+
iOS: 14.0
7+
8+
settings:
9+
CODE_SIGNING_REQUIRED: NO
10+
CODE_SIGN_IDENTITY: "-"
11+
CODE_SIGN_STYLE: Manual
612

713
packages:
814
PlaybookAccessibilitySnapshot:
@@ -21,8 +27,6 @@ targets:
2127
-AppleLanguages (en): true
2228
environmentVariables:
2329
SNAPSHOT_DIR: $(SOURCE_ROOT)/Snapshots
24-
attributes:
25-
ProvisioningStyle: Manual
2630

2731
SampleAccessibilitySnapshot:
2832
type: bundle.unit-test
@@ -32,5 +36,3 @@ targets:
3236
dependencies:
3337
- target: SampleApp
3438
- package: PlaybookAccessibilitySnapshot
35-
attributes:
36-
ProvisioningStyle: Manual

Makefile

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,23 @@
1-
SWIFT_RUN := swift run -c release
2-
GITHUB_RAW_CONTENT_PATH := https://raw.githubusercontent.com/playbook-ui/accessibility-snapshot-ios/main/
3-
GITHUB_TREE_PATH := https://github.com/playbook-ui/accessibility-snapshot-ios/main/
4-
5-
.PHONY: all
6-
all: proj format
1+
TOOL = PLAYBOOK_DEVELOPMENT=1 swift run -c release
2+
GITHUB_RAW_CONTENT_PATH = https://raw.githubusercontent.com/playbook-ui/accessibility-snapshot-ios/main/
3+
GITHUB_TREE_PATH = https://github.com/playbook-ui/accessibility-snapshot-ios/main/
74

85
.PHONY: proj
96
proj:
10-
$(SWIFT_RUN) --package-path Tools xcodegen --spec Example/project.yml --project Example
7+
$(TOOL) xcodegen --spec Example/project.yml --project Example
118

129
.PHONY: format
1310
format:
14-
$(SWIFT_RUN) --package-path Tools swift-format -i -r -m format Sources Example/SampleAccessibilitySnapshot
11+
$(TOOL) swift-format format -i -p -r Sources Example/SampleAccessibilitySnapshot
1512

1613
.PHONY: lint
1714
lint:
18-
$(SWIFT_RUN) --package-path Tools swift-format -r -m lint Sources Example/SampleAccessibilitySnapshot
15+
$(TOOL) swift-format lint -s -p -r Sources Example/SampleAccessibilitySnapshot
1916

2017
.PHONY: npm
2118
npm:
2219
npm i
2320

24-
.PHONY: docs
25-
docs:
26-
$(SWIFT_RUN) --package-path Tools/Doc swift-doc generate Sources -n PlaybookAccessibilitySnapshot -f html -o docs --base-url https://playbook-ui.github.io/accessibility-snapshot-ios
27-
2821
.PHONY: fix-readme-links
2922
fix-readme-links:
3023
sed -i '' -E '/.?http/!s#(<img src=")([^"]+)#\1$(GITHUB_RAW_CONTENT_PATH)\2#g' README.md

0 commit comments

Comments
 (0)