Skip to content

Commit

Permalink
Drop support for old xcode version
Browse files Browse the repository at this point in the history
  • Loading branch information
ra1028 committed Jan 26, 2024
1 parent b7f25f0 commit bc0a938
Show file tree
Hide file tree
Showing 28 changed files with 507 additions and 569 deletions.
60 changes: 23 additions & 37 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,46 @@
name: GitHub Actions
name: test
on:
pull_request:
push:
branches:
- master
workflow_dispatch:

env:
DEVELOPER_DIR: /Applications/Xcode_15.2.app

jobs:
validation:
name: Validation
runs-on: macos-11
strategy:
matrix:
xcode_version:
- 12.5.1
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
runs-on: macos-13
steps:
- uses: actions/checkout@v2

- name: Get ruby gem cache
id: gem-cache
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-1-gem-${{ hashFiles('Gemfile.lock') }}
restore-keys: ${{ runner.os }}-1-gem-

- name: Install ruby gems
if: steps.gem-cache.cache.outputs.cache-hit != 'true'
run: make gem

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

- name: Podspec lint
run: make pod-lib-lint
- name: Validate format
run: |
make format
if [ -n "$(git status --porcelain)" ]; then echo "Make sure that the code is formated by 'make format'."; exit 1; fi
make lint
env:
SPM_FORCE_BUILD: 1

- name: Validation
run: make all && [ -z "$(git status --porcelain)" ] && make lint
- name: Validate example project
run: |
make proj
if [ -n "$(git status --porcelain)" ]; then echo "Make sure that example project is formated by 'make proj'."; exit 1; fi
env:
SPM_FORCE_BUILD: 1

test:
name: Test on macOS
runs-on: macos-11
strategy:
matrix:
xcode_version:
- 11.7
- 12.5.1
env:
DEVELOPER_DIR: /Applications/Xcode_${{ matrix.xcode_version }}.app
runs-on: macos-13
steps:
- uses: actions/checkout@v2
- name: Show environments
Expand All @@ -76,13 +63,12 @@ jobs:
run: make npm

- name: Test library & Generate snapshots
run: set -o pipefail && xcodebuild build-for-testing test-without-building -project Playbook.xcodeproj -scheme Playbook -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro' ENABLE_TESTABILITY=YES | xcpretty -c
run: set -o pipefail && xcodebuild test -scheme Playbook -destination 'platform=iOS Simulator,name=iPhone 15 Pro' | xcpretty -c

- name: Generate snapshots of example app
run: set -o pipefail && xcodebuild build-for-testing test-without-building -project Example/PlaybookExample.xcodeproj -scheme SamplePlaybook -configuration Release -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 11 Pro' ENABLE_TESTABILITY=YES | xcpretty -c
run: set -o pipefail && xcodebuild test -project Example/PlaybookExample.xcodeproj -scheme SamplePlaybook -destination 'platform=iOS Simulator,name=iPhone 15 Pro' | xcpretty -c

- name: Visual regression test
if: matrix.xcode_version == '12.5.1'
run: npx percy upload Snapshots
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
3 changes: 0 additions & 3 deletions .swift-format
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@
"AlwaysUseLowerCamelCase": false,
"AmbiguousTrailingClosureOverload": true,
"BeginDocumentationCommentWithOneLineSummary": true,
"BlankLineBetweenMembers": true,
"DoNotUseSemicolons": true,
"DontRepeatTypeInStaticProperties": true,
"FullyIndirectEnum": true,
"GroupNumericLiterals": true,
"IdentifiersMustBeASCII": true,
"MultiLineTrailingCommas": true,
"NeverForceUnwrap": false,
"NeverUseForceTry": false,
"NeverUseImplicitlyUnwrappedOptionals": true,
Expand All @@ -43,7 +41,6 @@
"OnlyOneTrailingClosureArgument": true,
"OrderedImports": true,
"ReturnVoidInsteadOfEmptyTuple": true,
"UseEnumForNamespacing": true,
"UseLetInEveryBoundCaseVariable": false,
"UseShorthandTypeNames": true,
"UseSingleLinePropertyGetter": true,
Expand Down
18 changes: 0 additions & 18 deletions .swift-mod.yml

This file was deleted.

100 changes: 78 additions & 22 deletions Example/PlaybookExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 51;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -196,7 +196,6 @@
4261FFCE72EA7177DD8AAB04 /* ProfileSummary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileSummary.swift; sourceTree = "<group>"; };
484534BAAFC74B2B8E662666 /* HikeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HikeView.swift; sourceTree = "<group>"; };
48CE78CA3B34ACB43113D6E6 /* Data.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Data.swift; sourceTree = "<group>"; };
52F282DBED5FF4C672BAD3F0 /* project.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = project.xcconfig; sourceTree = "<group>"; };
54634E63D9F598E50BFEE94E /* SnapshotTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SnapshotTests.swift; sourceTree = "<group>"; };
54A62FB73D841AF632775CDB /* chilkoottrail.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = chilkoottrail.jpg; sourceTree = "<group>"; };
5AE02FE9D07ABA0A8E18AA5F /* Home.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Home.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -326,7 +325,6 @@
5FAFB2CEC43E1D2B7BCED896 /* SampleComponent */,
5F827EEB63647EAD64D384BD /* SamplePlaybook */,
CB92B516E8A2C48AA06D141A /* SampleSnapshot */,
4FDD44C5407F0BF7B47344B9 /* XCConfigs */,
47BBE7CCAFAEEB881D8EB70F /* Products */,
4BF238D518CAE916C182F0EF /* Projects */,
);
Expand Down Expand Up @@ -359,15 +357,6 @@
name = Projects;
sourceTree = "<group>";
};
4FDD44C5407F0BF7B47344B9 /* XCConfigs */ = {
isa = PBXGroup;
children = (
52F282DBED5FF4C672BAD3F0 /* project.xcconfig */,
);
name = XCConfigs;
path = ../XCConfigs;
sourceTree = "<group>";
};
5F827EEB63647EAD64D384BD /* SamplePlaybook */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -565,7 +554,8 @@
E9CAE2938635D794AD227A39 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1200;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430;
TargetAttributes = {
86A8BD462FB3780C0C066E94 = {
ProvisioningStyle = Manual;
Expand All @@ -582,7 +572,7 @@
};
};
buildConfigurationList = FC8F3989ED6098B8FD993A7E /* Build configuration list for PBXProject "PlaybookExample" */;
compatibilityVersion = "Xcode 10.0";
compatibilityVersion = "Xcode 14.0";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
Expand Down Expand Up @@ -797,85 +787,145 @@
/* Begin XCBuildConfiguration section */
436175B2C36530DD53A5EF1F /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SampleComponent/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleComponent";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
46005BBC60A067CB7CD55711 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = SampleSnapshot/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleSnapshot";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SamplePlaybook.app/SamplePlaybook";
};
name = Release;
};
610042B24C8993BD65811492 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
INFOPLIST_FILE = SamplePlaybook/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SamplePlaybook";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
66320C81143949A6F15DAE68 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
INFOPLIST_FILE = SamplePlaybook/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SamplePlaybook";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
6A3476962ED85A882B26595F /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
INFOPLIST_FILE = SampleApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleApp";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
A2106F23C44C16947D8D78D9 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SampleComponent/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleComponent";
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
AC22B532A4FE57295E8D32D7 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
INFOPLIST_FILE = SampleSnapshot/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleSnapshot";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SamplePlaybook.app/SamplePlaybook";
};
name = Debug;
};
AD279754F095EFB0099A6E6A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 52F282DBED5FF4C672BAD3F0 /* project.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
INFOPLIST_FILE = SampleApp/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = "app.playbook-ui.Example.SampleApp";
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
};
Expand Down Expand Up @@ -912,6 +962,9 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGNING_REQUIRED = NO;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -975,6 +1028,9 @@
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGNING_REQUIRED = NO;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
Expand Down
Loading

0 comments on commit bc0a938

Please sign in to comment.