Skip to content

Commit

Permalink
Add support for TextKit2 (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
zorgiepoo authored Mar 20, 2022
1 parent f18f50b commit 04e7c52
Show file tree
Hide file tree
Showing 10 changed files with 484 additions and 191 deletions.
32 changes: 27 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,37 @@ on:

jobs:
build:
strategy:
matrix:
xcode: ['xcode13.2.1']
include:
- xcode: 'xcode13.2.1'
xcode-path: '/Applications/Xcode_13.2.1.app/Contents/Developer'

name: Build and Test Komet on macOS
runs-on: macos-latest
runs-on: macos-11

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
- name: Build Release
env:
DEVELOPER_DIR: ${{ matrix.xcode-path }}
run: |
xcodebuild build-for-testing -target 'KometUITests' -scheme Komet
- name: Test
xcodebuild build-for-testing -target 'KometUITests' -scheme Komet -configuration Release -derivedDataPath build CODE_SIGN_IDENTITY="-"
- name: Build Debug
env:
DEVELOPER_DIR: ${{ matrix.xcode-path }}
run: |
xcodebuild test-without-building -target 'KometUITests' -scheme Komet
xcodebuild build-for-testing -target 'KometUITests' -scheme Komet -configuration Debug -derivedDataPath build
- name: Test Debug
env:
DEVELOPER_DIR: ${{ matrix.xcode-path }}
run: |
xcodebuild test-without-building -target 'KometUITests' -scheme Komet -configuration Debug -derivedDataPath build
- name: Archive Test Results
if: failure()
uses: actions/upload-artifact@v2
with:
name: build-logs
path: build/Logs
2 changes: 1 addition & 1 deletion Komet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = ZCK58M894E;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>classNames</key>
<dict>
<key>KometUITests</key>
<dict>
<key>testAppLaunchLargeFilePerformance()</key>
<dict>
<key>com.apple.dt.XCTMetric_OSSignpost-ApplicationLaunch.duration</key>
<dict>
<key>baselineAverage</key>
<real>1.110000</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
</dict>
<key>testAppLaunchPerformance()</key>
<dict>
<key>com.apple.dt.XCTMetric_OSSignpost-ApplicationLaunch.duration</key>
<dict>
<key>baselineAverage</key>
<real>0.809000</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
</dict>
<key>testLargeFileCommit()</key>
<dict>
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
<dict>
<key>baselineAverage</key>
<real>0.999338</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
</dict>
<key>testLargeNonVersionControlledFileCommit()</key>
<dict>
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
<dict>
<key>baselineAverage</key>
<real>1.214366</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
</dict>
</dict>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
<dict>
<key>baselineAverage</key>
<real>3</real>
<real>3.000000</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
Expand All @@ -21,7 +21,7 @@
<key>com.apple.XCTPerformanceMetric_WallClockTime</key>
<dict>
<key>baselineAverage</key>
<real>3</real>
<real>3.000000</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>com.apple.dt.XCTMetric_OSSignpost-ApplicationLaunch.duration</key>
<dict>
<key>baselineAverage</key>
<real>1.2349</real>
<real>1.234900</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
Expand All @@ -21,7 +21,7 @@
<key>com.apple.dt.XCTMetric_OSSignpost-ApplicationLaunch.duration</key>
<dict>
<key>baselineAverage</key>
<real>0.82307</real>
<real>0.823070</real>
<key>baselineIntegrationDisplayName</key>
<string>Local Baseline</string>
</dict>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@
<dict>
<key>runDestinationsByUUID</key>
<dict>
<key>317B9D9A-D4BD-4870-8362-CC1A1190C2CA</key>
<dict>
<key>localComputer</key>
<dict>
<key>busSpeedInMHz</key>
<integer>0</integer>
<key>cpuCount</key>
<integer>1</integer>
<key>cpuKind</key>
<string>Apple M1</string>
<key>cpuSpeedInMHz</key>
<integer>0</integer>
<key>logicalCPUCoresPerPackage</key>
<integer>8</integer>
<key>modelCode</key>
<string>MacBookAir10,1</string>
<key>physicalCPUCoresPerPackage</key>
<integer>8</integer>
<key>platformIdentifier</key>
<string>com.apple.platform.macosx</string>
</dict>
<key>targetArchitecture</key>
<string>arm64</string>
</dict>
<key>8603E690-1CEF-42AD-BDFF-FE0F0DE6AF25</key>
<dict>
<key>localComputer</key>
Expand Down
47 changes: 10 additions & 37 deletions Komet/Base.lproj/Commit Editor.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="18122" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="18122"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
Expand All @@ -13,8 +13,7 @@
<outlet property="commitLabelTextField" destination="vV7-fu-K3M" id="cY8-MU-xAx"/>
<outlet property="contentView" destination="5Ms-NX-CHZ" id="a5v-Qc-MbF"/>
<outlet property="horizontalBarDivider" destination="iBM-Yy-b1k" id="mfH-98-euX"/>
<outlet property="scrollView" destination="ZR8-bz-mFA" id="1L6-2R-0nQ"/>
<outlet property="textView" destination="AXg-Fl-XGk" id="Ryb-PN-n6P"/>
<outlet property="scrollViewContainer" destination="38p-dz-bpP" id="OpB-79-CzB"/>
<outlet property="topBar" destination="iuq-58-oil" id="in9-OF-xMR"/>
<outlet property="window" destination="4Y4-O8-fQs" id="9cp-uO-prZ"/>
</connections>
Expand Down Expand Up @@ -86,32 +85,6 @@ DQ
<customView translatesAutoresizingMaskIntoConstraints="NO" id="5Ms-NX-CHZ" userLabel="Content" customClass="NSVisualEffectView">
<rect key="frame" x="0.0" y="0.0" width="500" height="307"/>
<subviews>
<scrollView borderType="none" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZR8-bz-mFA">
<rect key="frame" x="0.0" y="0.0" width="500" height="306"/>
<clipView key="contentView" id="SkQ-6A-FOt">
<rect key="frame" x="0.0" y="0.0" width="500" height="306"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView importsGraphics="NO" richText="NO" verticallyResizable="YES" findStyle="bar" incrementalSearchingEnabled="YES" continuousSpellChecking="YES" allowsUndo="YES" allowsNonContiguousLayout="YES" smartInsertDelete="YES" id="AXg-Fl-XGk" customClass="ZGCommitTextView" customModule="Komet" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="500" height="306"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
<size key="minSize" width="500" height="306"/>
<size key="maxSize" width="532" height="10000000"/>
<color key="insertionPointColor" name="textColor" catalog="System" colorSpace="catalog"/>
</textView>
</subviews>
</clipView>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="nRy-yC-s1m">
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="UZb-Ee-qf6">
<rect key="frame" x="484" y="0.0" width="16" height="306"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
</scrollView>
<box boxType="custom" borderType="line" borderWidth="0.0" titlePosition="noTitle" translatesAutoresizingMaskIntoConstraints="NO" id="iBM-Yy-b1k" userLabel="Horizontal line box">
<rect key="frame" x="0.0" y="306" width="500" height="1"/>
<view key="contentView" focusRingType="none" id="96R-M0-ubo">
Expand All @@ -123,13 +96,16 @@ DQ
</constraints>
<color key="fillColor" red="0.83529411764705885" green="0.83529411764705885" blue="0.83529411764705885" alpha="1" colorSpace="calibratedRGB"/>
</box>
<customView translatesAutoresizingMaskIntoConstraints="NO" id="38p-dz-bpP" userLabel="Scroll view container">
<rect key="frame" x="0.0" y="0.0" width="500" height="306"/>
</customView>
</subviews>
<constraints>
<constraint firstItem="ZR8-bz-mFA" firstAttribute="leading" secondItem="5Ms-NX-CHZ" secondAttribute="leading" id="Ifk-CI-0Or"/>
<constraint firstAttribute="bottom" secondItem="ZR8-bz-mFA" secondAttribute="bottom" id="KAa-3U-Jzu"/>
<constraint firstItem="38p-dz-bpP" firstAttribute="top" secondItem="iBM-Yy-b1k" secondAttribute="bottom" id="7WF-AP-64p"/>
<constraint firstAttribute="bottom" secondItem="38p-dz-bpP" secondAttribute="bottom" id="Krf-MX-B3l"/>
<constraint firstAttribute="trailing" secondItem="38p-dz-bpP" secondAttribute="trailing" id="OYP-vE-Enf"/>
<constraint firstAttribute="trailing" secondItem="iBM-Yy-b1k" secondAttribute="trailing" id="WLf-xu-CEj"/>
<constraint firstAttribute="trailing" secondItem="ZR8-bz-mFA" secondAttribute="trailing" id="eFe-Bd-69a"/>
<constraint firstItem="ZR8-bz-mFA" firstAttribute="top" secondItem="iBM-Yy-b1k" secondAttribute="bottom" id="myJ-zR-RtS"/>
<constraint firstItem="38p-dz-bpP" firstAttribute="leading" secondItem="5Ms-NX-CHZ" secondAttribute="leading" id="uOB-4j-jJm"/>
<constraint firstItem="iBM-Yy-b1k" firstAttribute="leading" secondItem="5Ms-NX-CHZ" secondAttribute="leading" id="xeu-UR-M2U"/>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="300" id="zfz-rS-Fcw"/>
</constraints>
Expand All @@ -146,9 +122,6 @@ DQ
<constraint firstItem="5Ms-NX-CHZ" firstAttribute="top" secondItem="UXa-uU-h9N" secondAttribute="top" constant="22" id="szM-oz-msK"/>
</constraints>
</view>
<connections>
<outlet property="initialFirstResponder" destination="AXg-Fl-XGk" id="prb-ZL-4i4"/>
</connections>
<point key="canvasLocation" x="137" y="-93.5"/>
</window>
</objects>
Expand Down
Loading

0 comments on commit 04e7c52

Please sign in to comment.